[php/f17] use libldap_r for ldap extension

Remi Collet remi at fedoraproject.org
Thu Nov 22 09:49:46 UTC 2012


commit f83a361a680adac132a207ad7aedae93c240dabd
Author: Joe Orton <jorton at redhat.com>
Date:   Tue Oct 23 16:35:01 2012 +0100

    use libldap_r for ldap extension

 php-5.4.8-ldap_r.patch |   17 +++++++++++++++++
 php.spec               |    9 ++++++++-
 2 files changed, 25 insertions(+), 1 deletions(-)
---
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 bbb2932..55717a8 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 <jorton at redhat.com> - 5.4.8-2
+- use libldap_r for ldap extension
+
 * Thu Oct 18 2012 Remi Collet <remi at fedoraproject.org> 5.4.8-1
 - update to 5.4.8
 - define both session.save_handler and session.save_path


More information about the scm-commits mailing list