updated on Wed Jan 18 08:00:29 UTC 2012
[aur-mirror.git] / php-gtk / PKGBUILD
bloba5d5bcd1088ed8b60310bcdde8e864d782f7aeb3
1 # Contributor: Evangelos Foutras <foutrelis@gmail.com>
3 pkgname=php-gtk
4 pkgver=2.0.1
5 pkgrel=3
6 pkgdesc="PHP bindings for the Gtk+ 2 library"
7 arch=('i686' 'x86_64')
8 url="http://gtk.php.net/"
9 license=('LGPL')
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
22         php.ini-template
23         disable-open_basedir.patch
24         shared-link.patch)
25 md5sums=('d57ce885f32749320765e01c079e113b'
26          '219a7f7f336a4ed3fe27bb352b8199c3'
27          '6a95c4727f9660aec31ec02e9c868ed6'
28          '34a417289deae9655f91b19f399b403c')
30 build() {
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
46   ./buildconf
47   ./configure --prefix=/usr \
48               --with-extra=shared \
49               --with-html=shared \
50               --with-libsexy=shared \
51               --with-mozembed=shared \
52               --with-sourceview=shared \
53               --with-spell=shared
54   make || return 1
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: