]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
php: Fix build with db6
authorErik Kapfer <erik.kapfer@ipfire.org>
Tue, 7 Jul 2015 21:33:36 +0000 (23:33 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 14 Jul 2015 15:18:01 +0000 (17:18 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/php
src/patches/php-5.3.27_db6.patch [new file with mode: 0644]

diff --git a/lfs/php b/lfs/php
index 8139e2128400e4c6ad77061aad91fbb9e8ac3b27..32e614b14f908862d58cd91570dde7a74e63ca1c 100644 (file)
--- a/lfs/php
+++ b/lfs/php
@@ -78,48 +78,50 @@ $(subst %,%_MD5,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) $(DIR_SRC)/idn-* $(DIR_SRC)/Log-* $(DIR_SRC)/package.xml && \
-               cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
+       cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE)
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/php-5.3.27_db6.patch
        cd $(DIR_APP) && ./configure --prefix=/usr \
-                                                                                           --sysconfdir=/etc \
-                                                                                           --with-apxs2 \
-                                                                                           --enable-force-cgi-redirect \
-                                                                                           --enable-discard-path \
-                                                                                           --enable-fastcgi \
-                                                                                           --with-config-file-path=/etc \
-                                                                                           --with-openssl \
-                                                                                           --with-kerberos \
-                                                                                           --with-zlib \
-                                                                                           --enable-bcmath \
-                                                                                           --with-bz2 \
-                                                                                           --enable-calendar \
-                                                                                           --with-curl \
-                                                                                           --with-curlwrappers \
-                                                                                           --enable-dba=shared \
-                                                                                           --with-gdbm \
-                                                                                           --with-db4 \
-                                                                                           --with-inifile \
-                                                                                           --with-flatfile \
-                                                                                           --enable-exif \
-                                                                                           --enable-ftp \
-                                                                                           --with-openssl-dir=/usr \
-                                                                                           --with-gd=/usr \
-                                                                                           --with-jpeg-dir=/usr \
-                                                                                           --with-png-dir=/usr \
-                                                                                           --with-zlib-dir=/usr \
-                                                                                           --with-freetype-dir=/usr \
-                                                                                           --with-gettext \
-                                                                                           --with-gmp \
-                                                                                           --enable-mbstring \
-                                                                                           --with-mysql \
-                                                                                           --with-mysql-sock=/var/run/mysql \
-                                                                                           --with-ncurses \
-                                                                                           --with-pdo-mysql \
-                                                                                           --with-pdo-sqlite \
-                                                                                           --with-readline \
-                                                                                           --enable-sockets \
-                                                                                           --with-xsl \
-                                                                                           --with-iconv \
-                                                                                           --enable-zip
+                       --sysconfdir=/etc \
+                       --with-apxs2 \
+                       --enable-force-cgi-redirect \
+                       --enable-discard-path \
+                       --enable-fastcgi \
+                       --with-config-file-path=/etc \
+                       --with-openssl \
+                       --with-kerberos \
+                       --with-zlib \
+                       --enable-bcmath \
+                       --with-bz2 \
+                       --enable-calendar \
+                       --with-curl \
+                       --with-curlwrappers \
+                       --enable-dba=shared \
+                       --with-gdbm \
+                       --with-db4 \
+                       --with-inifile \
+                       --with-flatfile \
+                       --enable-exif \
+                       --enable-ftp \
+                       --with-openssl-dir=/usr \
+                       --with-gd=/usr \
+                       --with-jpeg-dir=/usr \
+                       --with-png-dir=/usr \
+                       --with-zlib-dir=/usr \
+                       --with-freetype-dir=/usr \
+                       --with-gettext \
+                       --with-gmp \
+                       --enable-mbstring \
+                       --with-mysql \
+                       --with-mysql-sock=/var/run/mysql \
+                       --with-ncurses \
+                       --with-pdo-mysql \
+                       --with-pdo-sqlite \
+                       --with-readline \
+                       --enable-sockets \
+                       --with-xsl \
+                       --with-iconv \
+                       --enable-zip
+
        cd $(DIR_APP) && make $(MAKETUNING)
        cd $(DIR_APP) && make install
        cd $(DIR_APP) && install -v -m644 $(DIR_SRC)/config/php/php.ini /etc/php.ini
diff --git a/src/patches/php-5.3.27_db6.patch b/src/patches/php-5.3.27_db6.patch
new file mode 100644 (file)
index 0000000..8bca125
--- /dev/null
@@ -0,0 +1,66 @@
+Revision 2013-08-09 07:24 UTC by pierre at archlinux dot de
+Patch db6.patch for DBM/DBA related Bug #65426
+Modified for version 5.3.27 by ummeegge  at ipfire dot org on 05.07.2015
+
+--- php-5.3.27_orig/configure  2013-07-10 17:47:16.000000000 +0000
++++ php-5.3.27/configure       2015-06-29 08:43:59.894592563 +0000
+@@ -30928,7 +30928,7 @@
+ #include "confdefs.h"
+ #include "$THIS_INCLUDE"
+-#if DB_VERSION_MAJOR == 4 || (4 == 4 && DB_VERSION_MAJOR == 5)
++#if DB_VERSION_MAJOR == 4 || (4 == 4 && DB_VERSION_MAJOR >= 5)
+             yes
+ #endif
+           
+@@ -31251,7 +31251,7 @@
+ #include "confdefs.h"
+ #include "$THIS_INCLUDE"
+-#if DB_VERSION_MAJOR == 3 || (3 == 4 && DB_VERSION_MAJOR == 5)
++#if DB_VERSION_MAJOR == 3 || (3 == 4 && DB_VERSION_MAJOR >= 5)
+             yes
+ #endif
+           
+@@ -31574,7 +31574,7 @@
+ #include "confdefs.h"
+ #include "$THIS_INCLUDE"
+-#if DB_VERSION_MAJOR == 2 || (2 == 4 && DB_VERSION_MAJOR == 5)
++#if DB_VERSION_MAJOR == 2 || (2 == 4 && DB_VERSION_MAJOR >= 5)
+             yes
+ #endif
+           
+diff -Nur php-5.3.27_orig/ext/dba/config.m4 php-5.3.27/ext/dba/config.m4
+--- php-5.3.27_orig/ext/dba/config.m4  2013-07-10 17:43:08.000000000 +0000
++++ php-5.3.27/ext/dba/config.m4       2015-06-29 08:45:05.084239400 +0000
+@@ -210,7 +210,7 @@
+         ],[
+           AC_EGREP_CPP(yes,[
+ #include "$THIS_INCLUDE"
+-#if DB_VERSION_MAJOR == $1 || ($1 == 4 && DB_VERSION_MAJOR == 5)
++#if DB_VERSION_MAJOR == $1 || ($1 == 4 && DB_VERSION_MAJOR >= 5)
+             yes
+ #endif
+           ],[
+diff -Nur php-5.3.27_orig/ext/dba/dba_db4.c php-5.3.27/ext/dba/dba_db4.c
+--- php-5.3.27_orig/ext/dba/dba_db4.c  2013-07-10 17:43:08.000000000 +0000
++++ php-5.3.27/ext/dba/dba_db4.c       2015-06-29 08:46:05.000581472 +0000
+@@ -44,7 +44,7 @@
+ {
+       TSRMLS_FETCH();
+-#if (DB_VERSION_MAJOR == 5 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8))
++#if (DB_VERSION_MAJOR >= 5 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8))
+ /* Bug 51086, Berkeley DB 4.8.26 */
+ /* This code suppresses a BDB 4.8+ error message, thus keeping PHP test compatibility */
+       {
+diff -Nur php-5.3.27_orig/ext/dba/tests/dba_db4_handlers.phpt php-5.3.27/ext/dba/tests/dba_db4_handlers.phpt
+--- php-5.3.27_orig/ext/dba/tests/dba_db4_handlers.phpt        2013-07-10 17:43:08.000000000 +0000
++++ php-5.3.27/ext/dba/tests/dba_db4_handlers.phpt     2015-06-29 08:46:29.007118085 +0000
+@@ -47,4 +47,4 @@
+ Test 1
+ Success: db4 enabled
+ Test 2 - full info
+-.*Berkeley DB (4|5).*
++.*Berkeley DB (4|5|6).*