summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7ebac99ffece6e1ef31190744380780d26816635 (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
# Maintainer: Behnam Momeni <sbmomeni [at the] gmail [dot] com>
# Contributor: GordonGR <ntheo1979@gmail.com>
# Contributor: Eric BĂ©langer <eric@archlinux.org>

pkgname=lib32-tk
pkgver=8.6.14
pkgrel=1
pkgdesc="A windowing toolkit for use with tcl"
arch=('x86_64')
url="http://tcl.sourceforge.net/"
license=('custom')
depends=('lib32-libxss' 'lib32-libxft' "lib32-tcl-ar>=${pkgver}" 'tk')
options=('staticlibs')
source=("https://cfhcable.dl.sourceforge.net/project/tcl/Tcl/${pkgver}/tk${pkgver}-src.tar.gz")
sha256sums=('8ffdb720f47a6ca6107eac2dd877e30b0ef7fac14f3a84ebbd0b3612cee41a94')

build() {
cd tk${pkgver}/unix
export CC='gcc -m32'
export CXX='g++ -m32'
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
export LDFLAGS+=' -L/usr/lib32'
./configure --prefix=/usr --mandir=/usr/share/man \
  --enable-threads --disable-rpath \
  --libdir=/usr/lib32 \
  --libexecdir=/usr/lib32 \
  --with-tcl=/usr/lib32/
make
}

check() {
cd tk${pkgver}/unix
# make test
}

package() {
cd tk${pkgver}/unix
make INSTALL_ROOT="${pkgdir}" install install-private-headers
mv "${pkgdir}/usr/bin/wish${pkgver%.*}" \
  "${pkgdir}/usr/bin/wish${pkgver%.*}-32"
ln -sf wish${pkgver%.*}-32 "${pkgdir}/usr/bin/wish-32"
ln -sf libtk${pkgver%.*}.so "${pkgdir}/usr/lib32/libtk.so"

rm -rf "${pkgdir}/usr/"{share/man,include,lib}

install -Dm644 license.terms "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

# remove buildroot traces
sed -e "s#${srcdir}/tk${pkgver}/unix#/usr/lib32#" \
    -e "s#${srcdir}/tk${pkgver}#/usr/include#" \
    -i "${pkgdir}/usr/lib32/tkConfig.sh"
}