updated on Sun Jan 15 16:02:00 UTC 2012
[aur-mirror.git] / mingw32-tk / PKGBUILD
blob45e5de7e29b5c668a1fddb042e0ad1cad668af13
1 # Maintainer: Andreas Krinke <andreas dot krinke at gmx dot de>
3 pkgname=mingw32-tk
4 pkgver=8.5.10
5 pkgrel=1
6 pkgdesc="A windowing toolkit for use with tcl (mingw32)"
7 arch=('any')
8 url="http://tcl.sourceforge.net/"
9 license=('custom')
10 makedepends=('mingw32-gcc')
11 depends=('mingw32-runtime' "mingw32-tcl=${pkgver}")
12 options=('!strip' '!buildflags')
13 source=("http://downloads.sourceforge.net/sourceforge/tcl/tk${pkgver}-src.tar.gz")
14 md5sums=('adfdaca46cc95fec8557df8ecdb0715c')
16 build() {
17   cd "${srcdir}/tk${pkgver}/win"
19   # mingw32 have problems with --hash-style=gnu (default value)
20   unset LDFLAGS
22   ./configure --host=i486-mingw32 --prefix=/usr/i486-mingw32 --with-tcl=/usr/i486-mingw32/lib --enable-threads
23   
24   make
25   make INSTALL_ROOT=${pkgdir} install install-private-headers
26   ln -sf wish85.exe ${pkgdir}/usr/i486-mingw32/bin/wish.exe
27   
28   # install private headers (FS#14388)
29   cd "${srcdir}/tk${pkgver}"
30   for dir in compat generic generic/ttk win; do
31     install -dm755 ${pkgdir}/usr/i486-mingw32/include/tk-private/$dir
32     install -m644 -t ${pkgdir}/usr/i486-mingw32/include/tk-private/$dir $dir/*.h
33   done
35   # install license
36   install -Dm644 license.terms ${pkgdir}/usr/i486-mingw32/share/licenses/${pkgname}/LICENSE
38   # remove buildroot traces / fixes #3602
39   sed -i \
40   -e "s,^TK_BUILD_LIB_SPEC='-L.*/win,TK_BUILD_LIB_SPEC='-L/usr/i486-mingw32/lib," \
41   -e "s,^TK_SRC_DIR='.*',TK_SRC_DIR='/usr/i486-mingw32/include'," \
42   -e "s,^TK_BUILD_STUB_LIB_SPEC='-L.*/win,TK_BUILD_STUB_LIB_SPEC='-L/usr/i486-mingw32/lib," \
43   -e "s,^TK_BUILD_STUB_LIB_PATH='.*/win,TK_BUILD_STUB_LIB_PATH='/usr/i486-mingw32/lib," \
44   "${pkgdir}/usr/i486-mingw32/lib/tkConfig.sh"