aboutsummaryrefslogtreecommitdiffstats
path: root/main/tcl
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-04-25 08:49:23 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-04-25 08:53:27 +0000
commita3d397676f242ac419490fcef5817008c483ddad (patch)
tree7888565e32b4f0e28d979769ac3d0bc3d2493bd0 /main/tcl
parent784940e59f4765dde82d22b2784e260e77c4a572 (diff)
downloadaports-a3d397676f242ac419490fcef5817008c483ddad.tar.bz2
aports-a3d397676f242ac419490fcef5817008c483ddad.tar.xz
main/tcl: misc fixes
- exist with error if 'make install' fails - add --enable-64bit on x86_64 - move *.c and *Config.sh to -dev subpackage - simplify buildroot sanitazion (similar what arch linux does) - whitespace fixes (use tab instead of 8 spaces)
Diffstat (limited to 'main/tcl')
-rw-r--r--main/tcl/APKBUILD56
1 files changed, 34 insertions, 22 deletions
diff --git a/main/tcl/APKBUILD b/main/tcl/APKBUILD
index 13bdc9f230..5f8f0c5444 100644
--- a/main/tcl/APKBUILD
+++ b/main/tcl/APKBUILD
@@ -1,40 +1,52 @@
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=tcl
pkgver=8.6.0
-pkgrel=0
+pkgrel=1
pkgdesc="The Tcl scripting language"
url="http://tcl.sourceforge.net/"
arch="all"
-license="custom"
+license="TCL"
depends=
makedepends=""
source="http://downloads.sourceforge.net/sourceforge/$pkgname/$pkgname$pkgver-src.tar.gz"
subpackages="$pkgname-doc $pkgname-dev"
-build ()
-{
- cd "$srcdir"/tcl${pkgver}/unix
- ./configure --prefix=/usr \
- --mandir=/usr/share/man \
- --disable-64bit
- make || return 1
+_major=${pkgver%.*}
+
+_builddir="$srcdir"/tcl${pkgver}/unix
+build() {
+ local _64bit="--disable-64bit"
+ case "$CARCH" in
+ x86_64) _64bit="--enable-64bit";;
+ esac
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ $_64bit \
+ || return 1
+ make || return 1
}
package() {
- cd "$srcdir"/tcl${pkgver}/unix
- make INSTALL_ROOT="${pkgdir}" install install-private-headers
- ln -sf tclsh8.5 "${pkgdir}"/usr/bin/tclsh
- install -Dm644 ../license.terms ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
- sed -i \
- -e "s,^TCL_BUILD_LIB_SPEC='-L.*/unix,TCL_BUILD_LIB_SPEC='-L/usr/lib," \
- -e "s,^TCL_SRC_DIR='.*',TCL_SRC_DIR='/usr/include'," \
- -e "s,^TCL_BUILD_STUB_LIB_SPEC='-L.*/unix,TCL_BUILD_STUB_LIB_SPEC='-L/usr/lib," \
- -e "s,^TCL_BUILD_STUB_LIB_PATH='.*/unix,TCL_BUILD_STUB_LIB_PATH='/usr/lib," \
- -e "s,^TCL_LIB_FILE='libtcl8.5..TCL_DBGX..so',TCL_LIB_FILE=\"libtcl8.5\$\{TCL_DBGX\}.so\"," \
- -e "s,^TCL_CC_SEARCH_FLAGS='\(.*\)',TCL_CC_SEARCH_FLAGS='\1:/usr/lib'," \
- -e "s,^TCL_LD_SEARCH_FLAGS='\(.*\)',TCL_LD_SEARCH_FLAGS='\1:/usr/lib'," \
- "${pkgdir}"/usr/lib/tclConfig.sh
+ cd "$_builddir"
+ export LD_LIBRARY_PATH="$_builddir"
+ make -j1 INSTALL_ROOT="${pkgdir}" install install-private-headers || return 1
+
+ ln -sf tclsh${_major} "${pkgdir}"/usr/bin/tclsh
+ install -Dm644 ../license.terms ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ # remove buildroot traces
+ find "$pkgdir" -name '*Config.sh' | xargs sed -i -e "s#${srcdir}#/usr/src#"
}
+
+dev() {
+ default_dev
+ cd $pkgdir
+ for i in $(find . -name '*.c' -o -name '*Config.sh'); do
+ mkdir -p "$subpkgdir"/${i%/*}
+ mv $i "$subpkgdir"/${i%/*}/ || return 1
+ done
+}
+
md5sums="573aa5fe678e9185ef2b3c56b24658d3 tcl8.6.0-src.tar.gz"
sha256sums="354422b9c4791685499123b2dfe01faa98b555c08906c010cb4449ddc75dcade tcl8.6.0-src.tar.gz"
sha512sums="ea64d2bb5b37b55bc424c759c67b5624e7d9a13b8bede744fd635cf668ff9e4a8681e41d94849f6c0a3564ee177268cbc3e5f287448b5a93179098d678e321f8 tcl8.6.0-src.tar.gz"