pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/databases/openldap Reenable the use of GNU pth on syst...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/812c1832b88f
branches:  trunk
changeset: 469159:812c1832b88f
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Fri Feb 20 13:56:15 2004 +0000

description:
Reenable the use of GNU pth on systems without native pthreads.  Bump
the PKGREVISION.  The fix was provided by Nick Hudson and modifies
the libldap initialization routine to call the GNU pth initialization
routine before using it.  The resulting slapd/slurpd passes the test
suite included in the OpenLDAP sources.  This fixes PR 24473.

diffstat:

 databases/openldap/Makefile         |  27 ++++++++++++++++-----------
 databases/openldap/distinfo         |   3 ++-
 databases/openldap/patches/patch-ah |  14 ++++++++++++++
 3 files changed, 32 insertions(+), 12 deletions(-)

diffs (84 lines):

diff -r 05849836abde -r 812c1832b88f databases/openldap/Makefile
--- a/databases/openldap/Makefile       Fri Feb 20 13:44:29 2004 +0000
+++ b/databases/openldap/Makefile       Fri Feb 20 13:56:15 2004 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.69 2004/02/19 14:42:39 jlam Exp $
+# $NetBSD: Makefile,v 1.70 2004/02/20 13:56:15 jlam Exp $
 
 DISTNAME=              openldap-2.1.25
 SVR4_PKGNAME=          oldap
-PKGREVISION=           1
+PKGREVISION=           2
 CATEGORIES=            databases
 MASTER_SITES=          ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/
 EXTRACT_SUFX=          .tgz
@@ -89,16 +89,19 @@
 .endfor
 RCD_SCRIPTS=           slapd
 
-# While the package does build correctly using GNU pth, slapd isn't able to
-# pass "make test" without segfaulting at startup.  For now, just build
-# without threads-support if it's not a native thread library.
+# On some platforms, while the package does build correctly using GNU pth,
+# slapd isn't able to pass "make test".  One those platforms, don't build
+# openldap with threads support unless we're using the native thread
+# library.
 #
-.if defined(_OPENLDAP_REQUIRE_THREADS) && \
-    !empty(_OPENLDAP_REQUIRE_THREADS:M[yY][eE][sS])
-PTHREAD_OPTS+=         require
-.else
-PTHREAD_OPTS+=         native
-.endif
+OPENLDAP_PTH_BROKEN_PLATFORMS?=        # empty
+.for _pattern_ in ${OPENLDAP_PTH_BROKEN_PLATFORMS}
+.  if !empty(MACHINE_PLATFORM:M${_pattern_})
+OPENLDAP_PTHREAD_OPTS?=        native
+.  endif
+.endfor
+OPENLDAP_PTHREAD_OPTS?=        require
+PTHREAD_OPTS+=         ${OPENLDAP_PTHREAD_OPTS}
 
 .include "../../databases/db4/buildlink3.mk"
 .include "../../security/openssl/buildlink3.mk"
@@ -111,6 +114,8 @@
 RCD_SCRIPTS+=          slurpd
 .elif ${PTHREAD_TYPE} == "pth"
 CONFIGURE_ARGS+=       --with-threads=pth
+PLIST_SUBST+=          SLURPD_COMMENT=
+RCD_SCRIPTS+=          slurpd
 .else
 CONFIGURE_ARGS+=       --without-threads
 PLIST_SUBST+=          SLURPD_COMMENT="@comment "
diff -r 05849836abde -r 812c1832b88f databases/openldap/distinfo
--- a/databases/openldap/distinfo       Fri Feb 20 13:44:29 2004 +0000
+++ b/databases/openldap/distinfo       Fri Feb 20 13:56:15 2004 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.22 2004/02/14 11:31:50 jlam Exp $
+$NetBSD: distinfo,v 1.23 2004/02/20 13:56:15 jlam Exp $
 
 SHA1 (openldap-2.1.25.tgz) = 802ad52c0540bf58fbe797fd64804ff0920159d4
 Size (openldap-2.1.25.tgz) = 2038669 bytes
@@ -8,3 +8,4 @@
 SHA1 (patch-ae) = 75f5cb64c78c007f3439ad384b21c5a6ea5e9e3d
 SHA1 (patch-af) = 74edff185f7d5222416023801084c069d08ec057
 SHA1 (patch-ag) = 822efbcc01dfd4b6181c25390761f534aaeb4315
+SHA1 (patch-ah) = 4fd10030b2531c7b4a4461053e5896274b24d5dd
diff -r 05849836abde -r 812c1832b88f databases/openldap/patches/patch-ah
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/openldap/patches/patch-ah       Fri Feb 20 13:56:15 2004 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-ah,v 1.1 2004/02/20 13:56:15 jlam Exp $
+
+--- libraries/libldap/init.c.orig      Tue Dec  2 09:31:54 2003
++++ libraries/libldap/init.c
+@@ -522,6 +522,9 @@ void ldap_int_initialize( struct ldapopt
+ 
+ #if defined(LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND) \
+       || defined(HAVE_TLS) || defined(HAVE_CYRUS_SASL)
++#if defined(LDAP_R_COMPILE)
++      ldap_pvt_thread_initialize();
++#endif
+       ldap_int_hostname = ldap_pvt_get_fqdn( ldap_int_hostname );
+ #endif
+       if ( ldap_int_tblsize == 0 )



Home | Main Index | Thread Index | Old Index