1 # Contributor: Evangelos Foutras <foutrelis@gmail.com>
6 pkgdesc="PHP bindings for the Gtk+ 2 library"
8 url="http://gtk.php.net/"
10 depends=('php>=5.2' 'php<5.3' 'gtk2>=2.12.0' 'libglade>=2.6.2')
11 makedepends=('pkgconfig' 'gtk2+extra' 'gtkhtml' 'libsexy' 'xulrunner'
12 'gtksourceview' 'gtkspell')
13 optdepends=('gtk2+extra: extra extension'
14 'gtkhtml: html extension'
15 'libsexy: libsexy extension'
16 'xulrunner: mozembed extension'
17 'gtksourceview: sourceview extension'
18 'gtkspell: spell extension')
19 backup=(etc/php/php-gtk.ini)
20 install=php-gtk.install
21 source=(http://gtk.php.net/distributions/$pkgname-$pkgver.tar.gz
23 disable-open_basedir.patch
25 md5sums=('d57ce885f32749320765e01c079e113b'
26 '219a7f7f336a4ed3fe27bb352b8199c3'
27 '6a95c4727f9660aec31ec02e9c868ed6'
28 '34a417289deae9655f91b19f399b403c')
31 cd "$srcdir/$pkgname-$pkgver"
33 # Remove pre-generated files
34 find ext -name gen\*.[ch] -exec rm -f {} \;
36 # Use the correct libgtkhtml version
37 sed -i 's|libgtkhtml-3.8|libgtkhtml-3.14|' ext/html/{config.m4,html.defs}
39 # We need to allow php to open files outside of open_basedir (defined
40 # in /etc/php/php.ini) during the build
41 patch -Np1 -i "$srcdir/disable-open_basedir.patch" || return 1
43 # Fix linking for shared modules
44 patch -Np1 -i "$srcdir/shared-link.patch" || return 1
47 ./configure --prefix=/usr \
50 --with-libsexy=shared \
51 --with-mozembed=shared \
52 --with-sourceview=shared \
55 make INSTALL_ROOT="$pkgdir" install
57 install -D -m644 "$srcdir/php.ini-template" "$pkgdir/etc/php/php-gtk.ini"
58 EXTENSION_DIR=$(php-config --extension-dir)
59 sed -i "/^extension_dir/cextension_dir = \"$EXTENSION_DIR\"" \
60 "$pkgdir/etc/php/php-gtk.ini"
63 # vim:set ts=2 sw=2 et: