[arch-commits] CVS update of arch/build/devel/php (PKGBUILD)

Tobias Kieslich tobias at archlinux.org
Fri Apr 27 23:20:14 UTC 2007


    Date: Friday, April 27, 2007 @ 19:20:14
  Author: tobias
    Path: /home/cvs-arch/arch/build/devel/php

Modified: PKGBUILD (1.91 -> 1.92)

php: unify the php and the php-cgi packages since the two always are
supposed to be updated at the same time 

bring in the hardened php patches known as suhoin


----------+
 PKGBUILD |   57 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 53 insertions(+), 4 deletions(-)


Index: arch/build/devel/php/PKGBUILD
diff -u arch/build/devel/php/PKGBUILD:1.91 arch/build/devel/php/PKGBUILD:1.92
--- arch/build/devel/php/PKGBUILD:1.91	Sat Mar 17 04:29:17 2007
+++ arch/build/devel/php/PKGBUILD	Fri Apr 27 19:20:13 2007
@@ -1,8 +1,12 @@
-# $Id: PKGBUILD,v 1.91 2007/03/17 08:29:17 tpowa Exp $
+# $Id: PKGBUILD,v 1.92 2007/04/27 23:20:13 tobias Exp $
 # Maintainer: dorphell <dorphell at archlinux.org>
+
+# since php and php-cgi get always updated at the same time we combine
+# the packages
 pkgname=php
 pkgver=5.2.1
-pkgrel=2
+pkgrel=3
+_suhosinver=0.9.6.2
 pkgdesc="A high-level scripting language"
 arch=(i686 x86_64)
 url="http://www.php.net"
@@ -13,13 +17,57 @@
 makedepends=('apache>=2.2.1' 'imap' 'postgresql-libs>=8.2.3'
              'libmysqlclient' 'libldap' 'smtp-server' 'sqlite3' 'unixodbc'
              'net-snmp' 'libmcrypt')
+conflicts=('php-cgi')
+replaces=('php-cgi')
 source=(http://www.php.net/distributions/${pkgname}-${pkgver}.tar.gz
+        http://www.hardened-php.net/suhosin/_media/suhosin-patch-${pkgver}-${_suhosinver}.patch.gz
         php.ini)
-md5sums=('604eaee2b834bb037d2c83e53e300d3f' 'cc38a0ea96ed67d1e54d2f34adced5e7')
 
 build() {
+  ##############   BUILD php-cgi from here
   export MAKEFLAGS="-j1"
   cd ${startdir}/src/${pkgname}-${pkgver}
+  patch -p 1 -i ../suhosin-patch-${pkgver}-${_suhosinver}.patch || return 1
+  ./configure --prefix=/usr --enable-fastcgi --enable-cgi \
+    --enable-discard-path --enable-force-cgi-redirect \
+    --sysconfdir=/etc --with-layout=PHP \
+    --with-ttf --enable-mailparse --with-config-file-scan-dir=/etc \
+    --enable-bcmath=shared --enable-calendar=shared --enable-ftp=shared \
+    --enable-gd-native-ttf --enable-magic-quotes --enable-posix=shared \
+    --enable-session --enable-shared --enable-shmop=shared --enable-pdo=shared \
+    --enable-sqlite-utf8 --enable-sockets=shared --enable-xml\
+    --enable-sysvsem=shared --enable-sysvshm=shared --enable-sysvmsg=shared \
+    --enable-track-vars --enable-trans-sid --enable-safe-mode \
+    --with-imap --with-imap-ssl --with-ncurses --with-readline \
+    --with-bz2=shared --with-curl --with-mime-magic \
+    --with-freetype-dir=/usr --with-gd=shared --enable-exif --with-jpeg-dir=/usr \
+    --enable-dba --without-db2 --without-db3 --with-inifile --with-flatfile \
+    --with-gdbm --with-ldap=shared --with-openssl --with-gettext \
+    --with-unixODBC=shared,/usr --with-pdo-odbc=shared,unixODBC,/usr \
+    --with-mysqli=shared --with-mysql-sock=/tmp/mysql.sock \
+    --with-pdo-mysql=shared,/usr --with-mysql=shared,/usr \
+    --with-pgsql=shared --with-pgsql-sock=/tmp/pgsql.sock --with-pdo-pgsql=shared,/usr \
+    --with-sqlite=shared --with-pdo-sqlite=shared,/usr \
+    --with-pear=/usr/share/pear --with-dom --with-dom-xslt --with-xsl \
+    --with-png-dir=/usr --with-regex=php --with-zlib --enable-soap=shared \
+    --enable-mbstring=all --enable-mbregex --with-snmp=shared,/usr \
+    --enable-dbase --enable-pcntl
+
+  # fixes a build error in sqlite support
+  ln -s main/php_config.h ./config.h
+  make || return 1
+  make INSTALL_ROOT=$startdir/pkg EXTENSION_DIR=`php-config --extension-dir` install
+
+   # here starts the cleanup
+  cd $startdir/pkg
+  rm -rf etc ./{.registry,.channels,.depdb*,.lock,.file*} usr/{include,share,lib,man}
+  rm $startdir/pkg/usr/bin/{phpize,php-config,pecl,pear*}
+  mv $startdir/pkg/usr/bin/php $startdir/pkg/usr/bin/php-cgi
+#########################################################################################
+
+  ### make standard php
+  cd ${startdir}/src/${pkgname}-${pkgver}
+  make distclean
   ./buildconf --force
   ./configure --with-apxs2 --prefix=/usr --sysconfdir=/etc \
     --with-layout=PHP \
@@ -43,7 +91,8 @@
     --with-sqlite=shared --with-pdo-sqlite=shared,/usr \
     --with-pear=/usr/share/pear --with-dom --with-dom-xslt --with-xsl \
     --with-png-dir=/usr --with-regex=php --with-zlib --enable-soap=shared \
-    --enable-mbstring=all --enable-mbregex --with-snmp=shared,/usr
+    --enable-mbstring=all --enable-mbregex --with-snmp=shared,/usr \
+    --enable-dbase --enable-pcntl
   # fixes a build error in sqlite support
   ln -s main/php_config.h ./config.h
   make || return 1




More information about the arch-commits mailing list