[arch-commits] Commit in php/trunk (PKGBUILD db-configure.patch)

Pierre Schmitz pierre at archlinux.org
Thu Jul 3 10:42:31 UTC 2008


    Date: Thursday, July 3, 2008 @ 06:42:30
  Author: pierre
Revision: 4092

upgpkg: php 5.2.6-4
    added patch to avoid linking against old db versions

Added:
  php/trunk/db-configure.patch
Modified:
  php/trunk/PKGBUILD

--------------------+
 PKGBUILD           |   15 ++++++++-------
 db-configure.patch |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2008-07-03 04:55:58 UTC (rev 4091)
+++ PKGBUILD	2008-07-03 10:42:30 UTC (rev 4092)
@@ -3,7 +3,7 @@
 
 pkgname=php
 pkgver=5.2.6
-pkgrel=3
+pkgrel=4
 _suhosinver=0.9.6.2
 pkgdesc='A high-level scripting language'
 arch=('i686' 'x86_64')
@@ -39,16 +39,14 @@
 options=('emptydirs')
 source=("http://www.php.net/distributions/${pkgname}-${pkgver}.tar.bz2" \
         "http://download.suhosin.org/suhosin-patch-${pkgver}-${_suhosinver}.patch.gz" \
-        'php.ini' 'apache.conf')
+        'php.ini' 'apache.conf' 'db-configure.patch')
 md5sums=('7380ffecebd95c6edb317ef861229ebd'
          'f2ec986341a314c271259dbe4d940858'
          '0ee1dad48f7d67af3d2c78ca6eed68ba'
-         '96ca078be6729b665be8a865535a97bf')
+         '96ca078be6729b665be8a865535a97bf'
+         '74e5ce5a02488ec91b1c59f539e42936')
 
 build() {
-	[ -e /usr/lib/libdb-4.1.so ] && echo 'remove db4.1 package' && return 1
-	[ -e /usr/lib/libdb-4.5.so ] && echo 'remove db4.5 package' && return 1
-
 	phpconfig="--prefix=/usr \
 	--sysconfdir=/etc/php \
 	--with-layout=GNU \
@@ -127,6 +125,9 @@
 
 	cd ${srcdir}/${pkgname}-${pkgver}
 
+	# avoid linking against old db version
+	patch -p0 -i ${srcdir}/db-configure.patch || return 1
+
 	# apply suhosin patch
 	patch -p1 -i ${srcdir}/suhosin-patch-${pkgver}-${_suhosinver}.patch || return 1
 
@@ -170,4 +171,4 @@
 	make || return 1
 	install -D -m644 libs/libphp5.so ${pkgdir}/usr/lib/httpd/modules/libphp5.so || return 1
 	install -D -m644 ${srcdir}/apache.conf ${pkgdir}/etc/httpd/conf/extra/php5_module.conf || return 1
-}
+}
\ No newline at end of file

Added: db-configure.patch
===================================================================
--- db-configure.patch	                        (rev 0)
+++ db-configure.patch	2008-07-03 10:42:30 UTC (rev 4092)
@@ -0,0 +1,51 @@
+--- configure.orig	2008-07-03 10:27:06.000000000 +0000
++++ configure	2008-07-03 10:30:56.000000000 +0000
+@@ -28399,43 +28399,15 @@
+   
+   unset THIS_INCLUDE THIS_LIBS THIS_LFLAGS THIS_PREFIX THIS_RESULT
+ 
+-  dbdp="/usr/local/BerkeleyDB.4."
+-  for i in $PHP_DB4 ${dbdp}6 ${dbdp}5 ${dbdp}4 ${dbdp}3  ${dbdp}2 ${dbdp}1 ${dbdp}0 /usr/local /usr; do
+-    if test -f "$i/db4/db.h"; then
+-      THIS_PREFIX=$i
+-      THIS_INCLUDE=$i/db4/db.h
+-      break
+-    elif test -f "$i/include/db4.6/db.h"; then
+-      THIS_PREFIX=$i
+-      THIS_INCLUDE=$i/include/db4.6/db.h
+-      break
+-    elif test -f "$i/include/db4.5/db.h"; then
+-      THIS_PREFIX=$i
+-      THIS_INCLUDE=$i/include/db4.5/db.h
+-      break
+-    elif test -f "$i/include/db4/db.h"; then
+-      THIS_PREFIX=$i
+-      THIS_INCLUDE=$i/include/db4/db.h
+-      break
+-    elif test -f "$i/include/db/db4.h"; then
+-      THIS_PREFIX=$i
+-      THIS_INCLUDE=$i/include/db/db4.h
+-      break
+-    elif test -f "$i/include/db4.h"; then
+-      THIS_PREFIX=$i
+-      THIS_INCLUDE=$i/include/db4.h
+-      break
+-    elif test -f "$i/include/db.h"; then
+-      THIS_PREFIX=$i
+-      THIS_INCLUDE=$i/include/db.h
+-      break
+-    fi
+-  done
++  if test -f "/usr/include/db.h"; then
++    THIS_PREFIX=/usr
++    THIS_INCLUDE=/usr/include/db.h
++  fi
+   
+   if test -z "$THIS_INCLUDE"; then
+     { echo "configure: error: DBA: Could not find necessary header file(s)." 1>&2; exit 1; }
+   fi
+-  for LIB in db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db; do
++  for LIB in db; do
+     if test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.a || test -f $THIS_PREFIX/$PHP_LIBDIR/lib$LIB.$SHLIB_SUFFIX_NAME; then
+       lib_found="";
+       





More information about the arch-commits mailing list