summaryrefslogtreecommitdiff
path: root/user/tk/APKBUILD
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-07-06 05:18:46 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-07-06 05:19:14 -0500
commit2904f28e9c4b9611ccbf54e034691fde4d3c340c (patch)
treed370a99409fa7675d0acb0d679a5920d3d3dc921 /user/tk/APKBUILD
parent1b003691f4c0b002481fc174e77f241d14e22c1d (diff)
downloadpackages-2904f28e9c4b9611ccbf54e034691fde4d3c340c.tar.gz
packages-2904f28e9c4b9611ccbf54e034691fde4d3c340c.tar.bz2
packages-2904f28e9c4b9611ccbf54e034691fde4d3c340c.tar.xz
packages-2904f28e9c4b9611ccbf54e034691fde4d3c340c.zip
user/tk: pull in, fix, bump, assign to Tcl maintainer
Diffstat (limited to 'user/tk/APKBUILD')
-rw-r--r--user/tk/APKBUILD57
1 files changed, 57 insertions, 0 deletions
diff --git a/user/tk/APKBUILD b/user/tk/APKBUILD
new file mode 100644
index 000000000..3b92a3dda
--- /dev/null
+++ b/user/tk/APKBUILD
@@ -0,0 +1,57 @@
+# Maintainer:
+pkgname=tk
+pkgver=8.6.8
+pkgrel=0
+pkgdesc="GUI toolkit for the Tcl scripting language"
+url="http://tcl.sourceforge.net/"
+arch="all"
+options="!check" # Requires a running X11 server.
+license="TCL"
+depends=
+depends_dev="tcl-dev libx11-dev libxft-dev fontconfig-dev"
+makedepends="$depends_dev libpng-dev"
+subpackages="$pkgname-doc $pkgname-dev"
+source="http://downloads.sourceforge.net/sourceforge/tcl/$pkgname$pkgver-src.tar.gz
+ "
+
+_major=${pkgver%.*}
+builddir="$srcdir"/tk${pkgver}/unix
+
+build() {
+ cd "$builddir"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --mandir=/usr/share/man
+ make
+}
+
+package() {
+ cd "$builddir"
+ export LD_LIBRARY_PATH="$builddir"
+ make -j1 INSTALL_ROOT="${pkgdir}" install install-private-headers
+
+ ln -sf wish${_major} "${pkgdir}"/usr/bin/wish
+ 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#"
+
+ # move demos to -doc directory
+ mkdir -p "$pkgdir"/usr/share/doc/$pkgname/examples/
+ mv "$pkgdir"/usr/lib/tk${_major}/demos/ \
+ "$pkgdir"/usr/share/doc/$pkgname/examples/
+}
+
+dev() {
+ default_dev
+ cd $pkgdir
+ for i in $(find . -name '*.c' -o -name '*Config.sh'); do
+ mkdir -p "$subpkgdir"/${i%/*}
+ mv $i "$subpkgdir"/${i%/*}/
+ done
+}
+
+sha512sums="d0d30637b733fb0b0d38461b6d872934c04af422fcdb7ec41a72331b2529cc94414e6f441f95a98642d69505e4f41469847fedd1cbe58bd08cdd818fcabd1db9 tk8.6.8-src.tar.gz"