archrelease: copy trunk to community-any
[arch-community.git] / lib32-tcl / trunk / PKGBUILD
blobffc06f8184b9d61223e8de7c9c8037299bf2974f
1 # Maintainer: Maxime Gauduin <alucryd@archlinux.org>
2 # Contributor: Miguel Revilla <yo@miguelrevilla.com>
3 # Contributor: Eric BĂ©langer <eric@archlinux.org>
5 pkgname=lib32-tcl
6 pkgver=8.6.13
7 pkgrel=1
8 pkgdesc='The Tcl scripting language'
9 arch=(x86_64)
10 url=http://tcl.sourceforge.net/
11 license=(custom)
12 depends=(
13   lib32-glibc
14   lib32-zlib
15   tcl
17 options=(staticlibs)
18 source=(https://downloads.sourceforge.net/sourceforge/tcl/tcl${pkgver}-src.tar.gz)
19 b2sums=('f7d895ee04bf2be2a327a957189a8a4400afae13d065163c4c7b6b5ee909bae2352114843d82d9475046eafd3d288da2c1649fe6285fdb26eb22f0b97e4227ab')
21 prepare() {
22   cd tcl${pkgver}
23   rm -rf pkgs/sqlite3*
26 build() {
27   cd tcl${pkgver}/unix
28   export CC='gcc -m32'
29   export CXX='g++ -m32'
30   export LDFLAGS+=" -lm"
31   export PKG_CONFIG=i686-pc-linux-gnu-pkg-config
32   ./configure \
33     --prefix=/usr \
34     --libdir=/usr/lib32 \
35     --mandir=/usr/share/man \
36     --enable-threads
37   make
40 package() {
41   cd tcl${pkgver}/unix
43   make INSTALL_ROOT="${pkgdir}" install install-private-headers
44   rm -rf "${pkgdir}"/usr/{bin,include,lib,share}
45   find "${pkgdir}" -type f -name '*.a' -delete
46   ln -sf libtcl${pkgver%.*}.so "${pkgdir}"/usr/lib32/libtcl.so
48   sed -e "s#${srcdir}/tcl${pkgver}/unix#/usr/lib32#" \
49       -e "s#${srcdir}/tcl${pkgver}#/usr/include#" \
50       -i "${pkgdir}/usr/lib32/tclConfig.sh"
52   tdbcver=1.1.5
53   sed -e "s#${srcdir}/tcl${pkgver}/unix/pkgs/tdbc${tdbcver}#/usr/lib32/tdbc${tdbcver}#" \
54       -e "s#${srcdir}/tcl${pkgver}/pkgs/tdbc${tdbcver}/generic#/usr/include#" \
55       -e "s#${srcdir}/tcl${pkgver}/pkgs/tdbc${tdbcver}/library#/usr/lib32/tcl${pkgver%.*}#" \
56       -e "s#${srcdir}/tcl${pkgver}/pkgs/tdbc${tdbcver}#/usr/include#" \
57       -i "${pkgdir}/usr/lib32/tdbc${tdbcver}/tdbcConfig.sh"
59   ictlver=4.2.3
60   sed -e "s#${srcdir}/tcl${pkgver}/unix/pkgs/itcl${ictlver}#/usr/lib32/${ictlver}#" \
61       -e "s#${srcdir}/tcl${pkgver}/pkgs/itcl${ictlver}/generic#/usr/include#" \
62       -e "s#${srcdir}/tcl${pkgver}/pkgs/itcl${ictlver}#/usr/include#" \
63       -i "${pkgdir}/usr/lib32/itcl${ictlver}/itclConfig.sh"
65   install -dm 755 -p "${pkgdir}"/usr/share/licenses
66   ln -s tcl "${pkgdir}"/usr/share/licenses/lib32-tcl
69 # vim: ts=2 sw=2 et: