1 # Maintainer: Evangelos Foutras <foutrelis@gmail.com>
2 # Contributor: Pierre Schmitz <pierre@archlinux.de>
7 _suhosinver=${pkgver}-0.9.7
8 pkgdesc='A high-level scripting language'
11 url='http://www.php.net'
12 backup=('etc/php/php.ini')
13 depends=('glibc' 'readline' 'ncurses' 'libxml2' 'pcre')
14 makedepends=('postgresql-libs' 'mysql' 'libldap' 'smtp-server'
15 'libpng' 'libjpeg' 'sqlite3' 'unixodbc' 'gmp'
16 'tidyhtml' 'aspell' 'libtool' 'freetype2' 'libjpeg'
17 'curl' 'libxslt' 'pam' 'openssl' 'bzip2' 'gdbm' 'db')
18 optdepends=('bzip2: bz2'
28 'libmysqlclient: mysql/mysqli/pdo_mysql'
29 'unixodbc: odbc/pdo_odbc'
31 'postgresql-libs: pgsql/pdo_pgsql'
40 provides=("php=$pkgver")
42 source=("http://www.php.net/distributions/php-${pkgver}.tar.bz2"
43 "http://download.suhosin.org/suhosin-patch-${_suhosinver}.patch.gz"
44 'php.ini' 'db-configure.patch')
45 md5sums=('286bf34630f5643c25ebcedfec5e0a09'
46 '8f9de4d97fae6eba163cf3699509a260'
47 '50b6a4ce330b016e19cb922d202ab170'
48 '74e5ce5a02488ec91b1c59f539e42936')
51 phpconfig="--prefix=/usr \
52 --sysconfdir=/etc/php \
54 --with-config-file-path=/etc/php \
55 --with-config-file-scan-dir=/etc/php/conf.d \
56 --enable-inline-optimization \
61 --mandir=/usr/share/man \
64 phpextensions="--with-openssl=shared \
66 --enable-bcmath=shared \
68 --enable-calendar=shared \
75 --enable-dbase=shared \
76 --enable-exif=shared \
79 --enable-gd-native-ttf \
80 --with-jpeg-dir=shared,/usr \
81 --with-png-dir=shared,/usr \
82 --with-gettext=shared \
86 --enable-mbstring=shared \
89 --with-mysql-sock=/tmp/mysql.sock \
91 --with-mysqli=shared \
92 --with-ncurses=shared \
93 --with-unixODBC=shared,/usr \
95 --with-pdo-mysql=shared \
96 --with-pdo-sqlite=shared,/usr \
97 --with-pdo-odbc=shared,unixODBC,/usr \
98 --with-pdo-pgsql=shared \
99 --with-sqlite=shared \
100 --enable-sqlite-utf8 \
101 --with-pgsql=shared \
102 --enable-shmop=shared \
104 --enable-soap=shared \
105 --enable-sysvmsg=shared \
106 --enable-sysvsem=shared \
107 --enable-sysvshm=shared \
110 --enable-zip=shared \
111 --enable-posix=shared \
112 --enable-sockets=shared \
115 --enable-session=shared \
117 --with-pcre-regex=/usr \
118 --enable-mbstring=all \
120 --enable-json=shared \
121 --with-iconv=shared \
122 --with-xmlrpc=shared \
123 --with-pspell=shared \
124 --with-freetype-dir=shared,/usr \
125 --with-mime-magic=shared \
130 PEAR_INSTALLDIR=/usr/share/pear
131 export PEAR_INSTALLDIR
133 cd ${srcdir}/php-${pkgver}
135 # avoid linking against old db version
136 patch -p0 -i ${srcdir}/db-configure.patch
138 # apply suhosin patch
139 patch -p1 -i ${srcdir}/suhosin-patch-${_suhosinver}.patch
142 ./configure ${phpconfig} \
146 --with-pear=/usr/share/pear \
150 make INSTALL_ROOT=${pkgdir} install
153 rm -f ${pkgdir}`${pkgdir}/usr/bin/php-config --extension-dir`/*.a
155 install -D -m644 ${srcdir}/php.ini ${pkgdir}/etc/php/php.ini
156 install -d -m755 ${pkgdir}/etc/php/conf.d/
159 ./configure ${phpconfig} \
162 --enable-discard-path \
163 --enable-force-cgi-redirect \
167 install -D -m755 sapi/cgi/php-cgi ${pkgdir}/usr/bin/php-cgi
170 # ./configure ${phpconfig} \
175 # install -D -m644 libs/libphp5.so ${pkgdir}/usr/lib/httpd/modules/libphp5.so
176 # install -D -m644 ${srcdir}/apache.conf ${pkgdir}/etc/httpd/conf/extra/php5_module.conf