summaryrefslogtreecommitdiff
path: root/extra/tcl/PKGBUILD
blob: bf83d62be4c3f9ba71597ea9dcb138c482d2ca2c (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
# $Id: PKGBUILD 173926 2012-12-28 05:57:13Z andyrtr $
# Maintainer: Allan McRae <allan@archlinux.org>
# Committer: Judd Vinet <jvinet@zeroflux.org>

pkgname=tcl
pkgver=8.6.0
pkgrel=3
pkgdesc="The Tcl scripting language"
arch=('i686' 'x86_64')
url="http://tcl.sourceforge.net/"
license=('custom')
source=(http://downloads.sourceforge.net/sourceforge/tcl/tcl${pkgver}-src.tar.gz)
md5sums=('573aa5fe678e9185ef2b3c56b24658d3')

build() {
  cd ${srcdir}/tcl${pkgver}/unix

  # we build the tcl sqlite interface in sqlite-tcl package
  rm -rf ${srcdir}/tcl${pkgver}/pkgs/sqlite3*
  
  [[ $CARCH == "x86_64" ]] && BIT="--enable-64bit"
  ./configure --prefix=/usr --mandir=/usr/share/man --enable-threads $BIT
  
  make
}

check() {
  cd ${srcdir}/tcl${pkgver}/unix
  make test
}

package()
{
  cd ${srcdir}/tcl${pkgver}/unix
  
  make INSTALL_ROOT=${pkgdir} install install-private-headers
  ln -sf tclsh8.6 ${pkgdir}/usr/bin/tclsh
  
  # install license
  install -Dm644 ../license.terms ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE

  # remove buildroot traces
  sed -i "s#${srcdir}#/usr/src#" ${pkgdir}/usr/lib/{tcl,tdbc1.0.0/tdbc,itcl4.0.0/itcl}Config.sh
}