From a5d6737443c08d434c849529fffa64de5907efcd Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Tue, 23 Oct 2012 16:35:01 +0100 Subject: [PATCH] use libldap_r for ldap extension --- php-5.4.8-ldap_r.patch | 17 +++++++++++++++++ php.spec | 9 ++++++++- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 php-5.4.8-ldap_r.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.spec b/php.spec index 6d56f90..14eed33 100644 --- a/php.spec +++ b/php.spec @@ -52,7 +52,7 @@ Summary: PHP scripting language for creating dynamic web sites Name: php Version: 5.4.8 -Release: 1%{?dist} +Release: 2%{?dist} License: PHP Group: Development/Languages URL: http://www.php.net/ @@ -92,6 +92,9 @@ 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 @@ -601,6 +604,7 @@ support for using the enchant library to PHP. %if %{with_libzip} %patch44 -p1 -b .systzip %endif +%patch45 -p1 -b .ldap_r # Prevent %%doc confusion over LICENSE files cp Zend/LICENSE Zend/ZEND_LICENSE @@ -1317,6 +1321,9 @@ fi %changelog +* 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