summaryrefslogtreecommitdiff
path: root/extra/tk/PKGBUILD
blob: c5116f60c1d2a5cef5ee396a7b5dc9bd83b47dde (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 194259 2013-09-11 22:03:31Z eric $
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=tk
pkgver=8.6.0
pkgrel=4
pkgdesc="A windowing toolkit for use with tcl"
arch=('i686' 'x86_64')
url="http://tcl.sourceforge.net/"
license=('custom')
depends=("tcl=${pkgver}" 'libxss' 'libxft')
source=(http://downloads.sourceforge.net/sourceforge/tcl/tk${pkgver}-src.tar.gz tk-xcircuit.patch)
sha1sums=('c42e160285e2d26eae8c2a1e6c6f86db4fa7663b'
          'e0e75044d4e33533b0114d3c142b40b7280c364f')

prepare() {
  cd tk${pkgver}
  patch -p0 -i "${srcdir}/tk-xcircuit.patch"
}

build() {
  cd tk${pkgver}/unix
  [[ $CARCH == "x86_64" ]] && BIT="--enable-64bit"
  ./configure --prefix=/usr --mandir=/usr/share/man --enable-threads --disable-rpath $BIT
  make
}

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

package() {
  cd tk${pkgver}/unix
  make INSTALL_ROOT="${pkgdir}" install install-private-headers
  ln -sf wish8.6 "${pkgdir}/usr/bin/wish"
  ln -sf libtk${pkgver%.*}.so "${pkgdir}/usr/lib/libtk.so"
  install -Dm644 license.terms "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

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