--- ../../../arch/devel/tk/PKGBUILD	2006-10-24 14:05:14.000000000 +0100
+++ PKGBUILD	2007-04-07 23:19:25.000000000 +0100
@@ -3,18 +3,24 @@
 # Committer: Judd Vinet <jvinet@zeroflux.org>
 pkgname=tk
 pkgver=8.4.14
-pkgrel=1
+pkgrel=2
 pkgdesc="A windowing toolkit for use with tcl"
 arch=(i686 x86_64)
+license=('custom')
 depends=("tcl>=${pkgver}" 'libx11')
-source=(http://heanet.dl.sourceforge.net/sourceforge/tcl/tk${pkgver}-src.tar.gz)
+source=(http://downloads.dl.sourceforge.net/sourceforge/tcl/tk${pkgver}-src.tar.gz)
 md5sums=('d12f591f5689f95c82bfb9c1015407bb')
 
 build() {
-  cd ${startdir}/src/tk${pkgver}/unix
+  cd "${startdir}"/src/tk${pkgver}/unix
   sed -i "s/relid'/relid/" configure
   ./configure --prefix=/usr
   make
-  make INSTALL_ROOT=${startdir}/pkg install install-private-headers
-  ln -sf wish8.4 ${startdir}/pkg/usr/bin/wish
+  make INSTALL_ROOT="${startdir}"/pkg install install-private-headers
+  ln -sf wish8.4 "${startdir}"/pkg/usr/bin/wish
+
+  sed -i \
+    -e "/SRC/ s#$startdir/src#/usr/lib#" \
+    -e "/LIB/ s#$startdir/src/tk$pkgver/unix#/usr/lib#" \
+    "$startdir"/pkg/usr/lib/tkConfig.sh
 }
