archrelease: copy trunk to extra-x86_64
[arch-packages.git] / tcl / trunk / PKGBUILD
blob8711cf8803014f60ff16d017a4ba076f57a9ace2
1 # Maintainer: Eric BĂ©langer <eric@archlinux.org>
3 pkgname=tcl
4 pkgver=8.6.13
5 pkgrel=1
6 pkgdesc="Powerful, easy-to-learn dynamic programming language"
7 arch=('x86_64')
8 url="http://tcl.sourceforge.net/"
9 license=('custom')
10 depends=('zlib')
11 options=('staticlibs' '!lto')
12 source=(https://downloads.sourceforge.net/sourceforge/tcl/tcl${pkgver}-src.tar.gz)
13 sha256sums=('43a1fae7412f61ff11de2cfd05d28cfc3a73762f354a417c62370a54e2caf066')
15 prepare() {
16   cd tcl${pkgver}
17   # we build the tcl sqlite interface in sqlite-tcl package
18   rm -rf pkgs/sqlite3*
21 build() {
22   cd tcl${pkgver}/unix
23   ./configure --prefix=/usr --mandir=/usr/share/man --enable-threads --enable-64bit
24   make
27 check() {
28   cd tcl${pkgver}/unix
29   make test
32 package() {
33   cd tcl${pkgver}/unix
34   make INSTALL_ROOT="${pkgdir}" install install-private-headers
35   ln -sf tclsh${pkgver%.*} "${pkgdir}/usr/bin/tclsh"
36   ln -sf libtcl${pkgver%.*}.so "${pkgdir}/usr/lib/libtcl.so"
37   install -Dm644 ../license.terms "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
38   install -Dm644 tcl.m4 -t "$pkgdir"/usr/share/aclocal
39   chmod 644 "$pkgdir/usr/lib/libtclstub8.6.a"
41   # remove buildroot traces
42   _tclver=8.6
43   sed -e "s#${srcdir}/tcl${pkgver}/unix#/usr/lib#" \
44       -e "s#${srcdir}/tcl${pkgver}#/usr/include#" \
45       -e "s#'{/usr/lib} '#'/usr/lib/tcl$_tclver'#" \
46       -i "${pkgdir}/usr/lib/tclConfig.sh"
48   tdbcver=tdbc1.1.5
49   sed -e "s#${srcdir}/tcl${pkgver}/unix/pkgs/$tdbcver#/usr/lib/$tdbcver#" \
50       -e "s#${srcdir}/tcl${pkgver}/pkgs/$tdbcver/generic#/usr/include#" \
51       -e "s#${srcdir}/tcl${pkgver}/pkgs/$tdbcver/library#/usr/lib/tcl${pkgver%.*}#" \
52       -e "s#${srcdir}/tcl${pkgver}/pkgs/$tdbcver#/usr/include#" \
53       -i "${pkgdir}/usr/lib/$tdbcver/tdbcConfig.sh"
55   itclver=itcl4.2.3
56   sed -e "s#${srcdir}/tcl${pkgver}/unix/pkgs/$itclver#/usr/lib/$itclver#" \
57       -e "s#${srcdir}/tcl${pkgver}/pkgs/$itclver/generic#/usr/include#" \
58       -e "s#${srcdir}/tcl${pkgver}/pkgs/$itclver#/usr/include#" \
59       -i "${pkgdir}/usr/lib/$itclver/itclConfig.sh"