summaryrefslogtreecommitdiff
path: root/extra/lesstif/PKGBUILD
blob: 2ec414b6b983dea48eeab6bac9a5cb145ac2c149 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# $Id: PKGBUILD 197577 2013-10-27 02:25:22Z eric $
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=lesstif
pkgver=0.95.2
pkgrel=6
pkgdesc="LGPL'd re-implementation of Motif"
arch=('i686' 'x86_64')
url="http://sourceforge.net/projects/lesstif/"
license=('LGPL' 'MIT')
depends=('freetype2' 'libxt' 'libxp')
options=('!makeflags' '!buildflags')
source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2"
        'LICENSE'
        '040_fedora_XxxxProperty-64bit.diff')
md5sums=('754187dbac09fcf5d18296437e72a32f'
         'b1f320192a9154f72d83e9d3d5a25a2f'
         '30e2c0babc84696af089d55cb9cb2908')

prepare() {
  cd ${pkgname}-${pkgver}

  # https://bugs.archlinux.org/task/17712
  patch -p1 -i "${srcdir}"/040_fedora_XxxxProperty-64bit.diff
}

build() {
  cd ${pkgname}-${pkgver}

  ./configure --prefix=/usr \
    --enable-production \
    --enable-nonstandard-conversions \
    --enable-editres \
    --with-xdnd \
    --enable-build-21 \
    --disable-debug

  # fix linkage against already installed version
  perl -pi -e 's/^(hardcode_into_libs)=.*/$1=no/' libtool

  make

  # fix linkage against already installed version
  for f in $(find . -name \*.la -type f) ; do
    perl -pi -e 's/^(relink_command=.*)/# $1/' $f
  done

  make -C lib/Mrm-2.1
}

package() {
  cd ${pkgname}-${pkgver}

  make -C lib/Mrm-2.1 DESTDIR="${pkgdir}" install
  make DESTDIR="${pkgdir}" appdir=/usr/share/X11/app-defaults rootdir=/usr/share/doc/LessTif install
  install -Dm644 "${srcdir}"/LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
}