From 79fbdf9cc97d1b419fc56bf8b20a05df8e3644c2 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 25 Oct 2012 15:45:29 +0200 Subject: PHP: use libldap_r for ldap extension, fix installed headers --- php-5.4.8-ldap_r.patch | 17 +++++++++++++++++ php-5.4.8-mysqli.patch | 11 +++++++++++ php54.spec | 25 ++++++++++++++++++++++++- 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 php-5.4.8-ldap_r.patch create mode 100644 php-5.4.8-mysqli.patch diff --git a/php-5.4.8-ldap_r.patch b/php-5.4.8-ldap_r.patch new file mode 100644 index 0000000..6d6924f --- /dev/null +++ b/php-5.4.8-ldap_r.patch @@ -0,0 +1,17 @@ + +Use -lldap_r by default. + +--- php-5.4.8/ext/ldap/config.m4.ldap_r ++++ php-5.4.8/ext/ldap/config.m4 +@@ -95,7 +95,10 @@ if test "$PHP_LDAP" != "no"; then + LDAP_PTHREAD= + fi + +- if test -f $LDAP_LIBDIR/liblber.a || test -f $LDAP_LIBDIR/liblber.$SHLIB_SUFFIX_NAME; then ++ if test -f $LDAP_LIBDIR/libldap_r.$SHLIB_SUFFIX_NAME; then ++ PHP_ADD_LIBRARY_WITH_PATH(lber, $LDAP_LIBDIR, LDAP_SHARED_LIBADD) ++ PHP_ADD_LIBRARY_WITH_PATH(ldap_r, $LDAP_LIBDIR, LDAP_SHARED_LIBADD) ++ elif test -f $LDAP_LIBDIR/liblber.a || test -f $LDAP_LIBDIR/liblber.$SHLIB_SUFFIX_NAME; then + PHP_ADD_LIBRARY_WITH_PATH(lber, $LDAP_LIBDIR, LDAP_SHARED_LIBADD) + PHP_ADD_LIBRARY_WITH_PATH(ldap, $LDAP_LIBDIR, LDAP_SHARED_LIBADD) + diff --git a/php-5.4.8-mysqli.patch b/php-5.4.8-mysqli.patch new file mode 100644 index 0000000..b65189a --- /dev/null +++ b/php-5.4.8-mysqli.patch @@ -0,0 +1,11 @@ +--- php-5.4.8/ext/mysqli/config.m4.orig 2012-10-25 14:36:21.560016333 +0200 ++++ php-5.4.8/ext/mysqli/config.m4 2012-10-25 14:37:04.706164258 +0200 +@@ -81,5 +81,8 @@ + if test "$PHP_MYSQLI" = "yes" || test "$PHP_MYSQLI" = "mysqlnd"; then + PHP_ADD_EXTENSION_DEP(mysqli, mysqlnd) + AC_DEFINE([MYSQLI_USE_MYSQLND], 1, [Whether mysqlnd is enabled]) ++ PHP_INSTALL_HEADERS([ext/mysqli/mysqli_mysqlnd.h]) ++ else ++ PHP_INSTALL_HEADERS([ext/mysqli/mysqli_libmysql.h]) + fi + fi diff --git a/php54.spec b/php54.spec index f5f1150..128956c 100644 --- a/php54.spec +++ b/php54.spec @@ -65,7 +65,7 @@ Version: 5.4.8 %if 0%{?snapdate:1}%{?rcver:1} Release: 0.3.%{?snapdate}%{?rcver}%{?dist} %else -Release: 1%{?dist} +Release: 3%{?dist} %endif License: PHP Group: Development/Languages @@ -92,6 +92,8 @@ Patch5: php-5.2.0-includedir.patch Patch6: php-5.2.4-embed.patch Patch7: php-5.3.0-recode.patch Patch8: php-5.4.7-libdb.patch +# https://bugs.php.net/63361 - Header not installed +Patch9: php-5.4.8-mysqli.patch # Fixes for extension modules # https://bugs.php.net/63126 - DISABLE_AUTHENTICATOR ignores array @@ -111,6 +113,8 @@ Patch42: php-5.3.1-systzdata-v10.patch Patch43: php-5.4.0-phpize.patch # Use system libzip instead of bundled one Patch44: php-5.4.5-system-libzip.patch +# Use -lldap_r for OpenLDAP +Patch45: php-5.4.8-ldap_r.patch # Fixes for tests @@ -684,6 +688,7 @@ httpd -V | grep -q 'threaded:.*yes' && exit 1 %patch6 -p1 -b .embed %patch7 -p1 -b .recode %patch8 -p1 -b .libdb +%patch9 -p1 -b .mysqliheaders %patch20 -p1 -b .imap %patch21 -p1 -b .odbctimer @@ -699,6 +704,7 @@ httpd -V | grep -q 'threaded:.*yes' && exit 1 %if %{with_libzip} %patch44 -p1 -b .systzip %endif +%patch45 -p1 -b .ldap_r %patch91 -p1 -b .remi-oci8 @@ -785,6 +791,17 @@ if test "$ver" != "%{jsonver}"; then exit 1 fi +# https://bugs.php.net/63362 - Not needed but installed headers. +# Drop some Windows specific headers to avoid installation, +# before build to ensure they are really not needed. +rm -f TSRM/tsrm_win32.h \ + TSRM/tsrm_config.w32.h \ + Zend/zend_config.w32.h \ + ext/mysqlnd/config-win.h \ + ext/standard/winver.h \ + main/win32_internal_function_disabled.h \ + main/win95nt.h + # Fix some bogus permissions find . -name \*.[ch] -exec chmod 644 {} \; chmod 644 README.* @@ -1512,6 +1529,12 @@ fi %changelog +* Tue Oct 25 2012 Remi Collet 5.4.8-3 +- fix installed headers + +* Tue Oct 23 2012 Joe Orton - 5.4.8-2 +- use libldap_r for ldap extension + * Thu Oct 18 2012 Remi Collet 5.4.8-1 - update to 5.4.8 - define both session.save_handler and session.save_path -- cgit