aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/openldap22-server/Makefile38
-rw-r--r--net/openldap22-server/files/patch-build::ltmain.sh15
-rw-r--r--net/openldap22-server/files/patch-build::top.mk11
-rw-r--r--net/openldap22-server/files/patch-libraries::liblunicode::ucstr.c16
-rw-r--r--net/openldap22-server/files/patch-servers::slapd::back-perl302
-rw-r--r--net/openldap22-server/pkg-plist10
-rw-r--r--net/openldap22/Makefile38
-rw-r--r--net/openldap22/files/patch-build::ltmain.sh15
-rw-r--r--net/openldap22/files/patch-build::top.mk11
-rw-r--r--net/openldap22/files/patch-libraries::liblunicode::ucstr.c16
-rw-r--r--net/openldap22/files/patch-servers::slapd::back-perl302
-rw-r--r--net/openldap22/pkg-plist10
-rw-r--r--net/openldap23-server/Makefile38
-rw-r--r--net/openldap23-server/files/patch-build::ltmain.sh15
-rw-r--r--net/openldap23-server/files/patch-build::top.mk11
-rw-r--r--net/openldap23-server/files/patch-libraries::liblunicode::ucstr.c16
-rw-r--r--net/openldap23-server/files/patch-servers::slapd::back-perl302
-rw-r--r--net/openldap23-server/pkg-plist10
-rw-r--r--net/openldap24-server/Makefile38
-rw-r--r--net/openldap24-server/files/patch-build::ltmain.sh15
-rw-r--r--net/openldap24-server/files/patch-build::top.mk11
-rw-r--r--net/openldap24-server/files/patch-libraries::liblunicode::ucstr.c16
-rw-r--r--net/openldap24-server/files/patch-servers::slapd::back-perl302
-rw-r--r--net/openldap24-server/pkg-plist10
24 files changed, 1404 insertions, 164 deletions
diff --git a/net/openldap22-server/Makefile b/net/openldap22-server/Makefile
index bccf8e39955d..f13c39a1e86f 100644
--- a/net/openldap22-server/Makefile
+++ b/net/openldap22-server/Makefile
@@ -7,7 +7,7 @@
PORTNAME= openldap
PORTVERSION= ${OPENLDAP_VERSION}.a
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net databases
MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \
http://public.planetmirror.com/pub/openldap/%SUBDIR%/ \
@@ -41,15 +41,17 @@ USE_OPENSSL= yes
USE_REINPLACE= yes
USE_LIBTOOL_VER= 14
+PLIST= ${WRKDIR}/pkg-plist
PKGINSTALL= ${WRKDIR}/pkg-install
PKGMESSAGE= ${WRKDIR}/pkg-message
-LOCALSTATEDIR?= /var/db
-LDAP_RUN_DIR?= /var/run/openldap
+LOCALSTATEDIR?= ${DESTDIR}/var/db
+LDAP_RUN_DIR?= ${DESTDIR}/var/run/openldap
WITH_BDB_VER?= 41
-CONFIGURE_ARGS= --with-threads \
+CONFIGURE_ARGS= --enable-dynamic \
+ --with-threads \
--with-tls=openssl
SED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \
@@ -61,7 +63,7 @@ PKGNAMESUFFIX= -client
CONFIGURE_ARGS+= --disable-slapd
PLIST_SUB+= SERVER="@comment " \
SLAPI="@comment "
-SED_SCRIPT+= -e '/^%%SERVER%%/d'
+SED_SCRIPT+= -e '/^%%SERVER%%/d'
.else
CONFIGURE_ARGS+= --localstatedir=${LOCALSTATEDIR} \
--enable-lmpasswd \
@@ -93,7 +95,6 @@ CONFIGURE_ARGS+= --enable-shell
.endif
.if defined(WITH_PERL)
-.error build with Perl backend broken: <http://www.openldap.org/its/index.cgi/Development?id=2513>
USE_PERL5= yes
CONFIGURE_ARGS+= --enable-perl
.endif
@@ -114,7 +115,6 @@ CONFIGURE_ARGS+= --enable-sql
.if defined(WITH_SLAPI)
LIB_DEPENDS+= ltdl.4:${PORTSDIR}/devel/libltdl
CONFIGURE_ARGS+= --enable-slapi
-LIBS+= -lltdl
PLIST_SUB+= SLAPI=""
.else
PLIST_SUB+= SLAPI="@comment "
@@ -137,7 +137,7 @@ CPPFLAGS+= -D_REENTRANT ${PTHREAD_CFLAGS} \
-I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
-CONFIGURE_TARGET= --host=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \
LDFLAGS="${LDFLAGS}" \
LIBS="${LIBS}"
@@ -167,6 +167,10 @@ post-patch:
@${REINPLACE_CMD} -e 's,%LOCALSTATEDIR%/slapd\.,${LDAP_RUN_DIR}/slapd.,g' \
${WRKSRC}/servers/slapd/slapd.conf
+pre-configure:
+ @${REINPLACE_CMD} -e '/^LIBTOOL=/s^\$$(top_builddir)/libtool^${LIBTOOL}^g' \
+ ${WRKSRC}/configure
+
post-build:
.for script in slapd.sh slurpd.sh
@${SED} ${SED_SCRIPT} ${FILESDIR}/${script} >${WRKDIR}/${script}
@@ -175,6 +179,18 @@ post-build:
@${SED} ${SED_SCRIPT} ${.CURDIR}/${text} >${WRKDIR}/${text}
.endfor
+pre-install:
+ @${CP} ${.CURDIR}/pkg-plist ${PLIST}
+.if !defined(NOPORTDOCS)
+ @for dir in rfc drafts; do \
+ ${FIND} ${WRKSRC}/doc/$${dir} -maxdepth 1 -type f \
+ | ${SED} -e "s,^${WRKSRC}/doc/,%%DOCSDIR%%/," \
+ >>${PLIST}; \
+ ${ECHO_CMD} "@dirrm %%DOCSDIR%%/$${dir}" >>${PLIST}; \
+ done
+ @${ECHO_CMD} "@dirrm %%DOCSDIR%%" >>${PLIST}
+.endif
+
post-install:
.if !defined(CLIENT_ONLY)
@${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${WRKDIR}/slurpd.sh ${PREFIX}/etc/rc.d
@@ -185,12 +201,8 @@ post-install:
@for dir in rfc drafts; do \
${MKDIR} ${DOCSDIR}/$${dir}; \
${FIND} ${WRKSRC}/doc/$${dir} -maxdepth 1 -type f \
- -exec ${INSTALL_DATA} {} ${DOCSDIR}/$${dir} \; -print \
- | ${SED} -e "s,^${WRKSRC}/doc/,${DOCSDIR:S,^${PREFIX}/,,}/," \
- >>${TMPPLIST}; \
- ${ECHO_CMD} "@dirrm ${DOCSDIR:S,^${PREFIX}/,,}/$${dir}" >>${TMPPLIST}; \
+ -exec ${INSTALL_DATA} {} ${DOCSDIR}/$${dir} \; ; \
done
- @${ECHO_CMD} "@dirrm ${DOCSDIR:S,^${PREFIX}/,,}" >>${TMPPLIST}
.endif
@${CAT} ${PKGMESSAGE}
diff --git a/net/openldap22-server/files/patch-build::ltmain.sh b/net/openldap22-server/files/patch-build::ltmain.sh
deleted file mode 100644
index 502d6b5db739..000000000000
--- a/net/openldap22-server/files/patch-build::ltmain.sh
+++ /dev/null
@@ -1,15 +0,0 @@
---- build/ltmain.sh.orig Sun Feb 9 23:24:29 2003
-+++ build/ltmain.sh Fri Jun 20 21:37:02 2003
-@@ -4285,12 +4285,6 @@
- IFS="$save_ifs"
- fi
-
-- # Install the pseudo-library for information purposes.
-- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-- instname="$dir/$name"i
-- $show "$install_prog $instname $destdir/$name"
-- $run eval "$install_prog $instname $destdir/$name" || exit $?
--
- # Maybe install the static library, too.
- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
- ;;
diff --git a/net/openldap22-server/files/patch-build::top.mk b/net/openldap22-server/files/patch-build::top.mk
new file mode 100644
index 000000000000..94551ea27b27
--- /dev/null
+++ b/net/openldap22-server/files/patch-build::top.mk
@@ -0,0 +1,11 @@
+--- build/top.mk.orig Mon Apr 7 22:23:26 2003
++++ build/top.mk Mon Jul 7 05:35:52 2003
+@@ -192,6 +192,8 @@
+ SLAPD_LIBS = @SLAPD_LIBS@ @SLAPD_PERL_LDFLAGS@ @SLAPD_SQL_LDFLAGS@ @SLAPD_SQL_LIBS@ @SLAPD_SLP_LIBS@
+ SLURPD_LIBS = @SLURPD_LIBS@
+
++SLAPI_LIBS = @SLAPI_LIBS@
++
+ # Our Defaults
+ CC = $(AC_CC)
+ DEFS = $(LDAP_INCPATH) $(XINCPATH) $(XDEFS) $(AC_DEFS) $(DEFINES)
diff --git a/net/openldap22-server/files/patch-libraries::liblunicode::ucstr.c b/net/openldap22-server/files/patch-libraries::liblunicode::ucstr.c
index f1074e1fe6d8..b8044b524697 100644
--- a/net/openldap22-server/files/patch-libraries::liblunicode::ucstr.c
+++ b/net/openldap22-server/files/patch-libraries::liblunicode::ucstr.c
@@ -1,11 +1,11 @@
--- libraries/liblunicode/ucstr.c.orig Fri Apr 11 03:57:10 2003
-+++ libraries/liblunicode/ucstr.c Sat Jul 5 10:53:04 2003
-@@ -15,6 +15,8 @@
++++ libraries/liblunicode/ucstr.c Sun Jul 6 02:50:32 2003
+@@ -10,7 +10,7 @@
+ #include <ac/string.h>
+ #include <ac/stdlib.h>
+
+-#include <lber.h>
++#include <lber_pvt.h>
+
#include <ldap_utf8.h>
#include <ldap_pvt_uc.h>
-
-+#include "lber_pvt.h"
-+
- #define malloc(x) ber_memalloc_x(x,ctx)
- #define realloc(x,y) ber_memrealloc_x(x,y,ctx)
- #define free(x) ber_memfree_x(x,ctx)
diff --git a/net/openldap22-server/files/patch-servers::slapd::back-perl b/net/openldap22-server/files/patch-servers::slapd::back-perl
new file mode 100644
index 000000000000..c6d024df3ed0
--- /dev/null
+++ b/net/openldap22-server/files/patch-servers::slapd::back-perl
@@ -0,0 +1,302 @@
+diff -Nur servers/slapd/back-perl/add.c.orig servers/slapd/back-perl/add.c
+--- servers/slapd/back-perl/add.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/add.c Thu Jun 5 11:44:06 2003
+@@ -13,17 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/bind.c.orig servers/slapd/back-perl/bind.c
+--- servers/slapd/back-perl/bind.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/bind.c Thu Jun 5 11:44:06 2003
+@@ -13,18 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-/* init.c - initialize Perl backend */
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/close.c.orig servers/slapd/back-perl/close.c
+--- servers/slapd/back-perl/close.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/close.c Thu Jun 5 11:44:06 2003
+@@ -13,18 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-/* init.c - initialize shell backend */
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/compare.c.orig servers/slapd/back-perl/compare.c
+--- servers/slapd/back-perl/compare.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/compare.c Thu Jun 5 11:44:06 2003
+@@ -13,17 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "lutil.h"
+ #include "perl_back.h"
+diff -Nur servers/slapd/back-perl/config.c.orig servers/slapd/back-perl/config.c
+--- servers/slapd/back-perl/config.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/config.c Thu Jun 5 11:44:06 2003
+@@ -13,17 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/delete.c.orig servers/slapd/back-perl/delete.c
+--- servers/slapd/back-perl/delete.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/delete.c Thu Jun 5 11:44:06 2003
+@@ -13,17 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/init.c.orig servers/slapd/back-perl/init.c
+--- servers/slapd/back-perl/init.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/init.c Thu Jun 12 22:25:21 2003
+@@ -13,18 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+- /* init.c - initialize shell backend */
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+@@ -37,7 +38,7 @@
+
+ #ifdef SLAPD_PERL_DYNAMIC
+
+-int back_perl_LTX_init_module(int argc, char *argv[])
++int init_module(int argc, char *argv[])
+ {
+ BackendInfo bi;
+
+diff -Nur servers/slapd/back-perl/modify.c.orig servers/slapd/back-perl/modify.c
+--- servers/slapd/back-perl/modify.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/modify.c Thu Jun 5 11:44:06 2003
+@@ -13,17 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/modrdn.c.orig servers/slapd/back-perl/modrdn.c
+--- servers/slapd/back-perl/modrdn.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/modrdn.c Thu Jun 5 11:44:06 2003
+@@ -26,17 +26,19 @@
+ *
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/search.c.orig servers/slapd/back-perl/search.c
+--- servers/slapd/back-perl/search.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/search.c Thu Jun 5 11:44:06 2003
+@@ -13,17 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
diff --git a/net/openldap22-server/pkg-plist b/net/openldap22-server/pkg-plist
index ff9ec200b978..9306575d05f9 100644
--- a/net/openldap22-server/pkg-plist
+++ b/net/openldap22-server/pkg-plist
@@ -39,8 +39,8 @@ etc/openldap/ldap.conf.default
%%SERVER%%@unexec if cmp -s %D/etc/openldap/slapd.conf %D/etc/openldap/slapd.conf.default; then rm -f %D/etc/openldap/slapd.conf; fi
%%SERVER%%etc/openldap/slapd.conf.default
%%SERVER%%@exec [ -f %B/slapd.conf ] || cp %B/%f %B/slapd.conf
-%%SERVER%%@unexec /bin/rmdir %D/etc/openldap/schema 2>/dev/null || true
-@unexec /bin/rmdir %D/etc/openldap 2>/dev/null || true
+%%SERVER%%@unexec rmdir %D/etc/openldap/schema 2>/dev/null || true
+@unexec rmdir %D/etc/openldap 2>/dev/null || true
%%SERVER%%etc/rc.d/slapd.sh
%%SERVER%%etc/rc.d/slurpd.sh
include/lber.h
@@ -78,6 +78,6 @@ share/openldap/ucdata/kdecomp.dat
share/openldap/ucdata/num.dat
@dirrm share/openldap/ucdata
@dirrm share/openldap
-%%SERVER%%@unexec /bin/rmdir %%LOCALSTATEDIR%%/openldap-slurp 2>/dev/null || true
-%%SERVER%%@unexec /bin/rmdir %%LOCALSTATEDIR%%/openldap-data 2>/dev/null || true
-%%SERVER%%@unexec /bin/rmdir %%LDAP_RUN_DIR%% 2>/dev/null || true
+%%SERVER%%@unexec rmdir %%LOCALSTATEDIR%%/openldap-slurp 2>/dev/null || true
+%%SERVER%%@unexec rmdir %%LOCALSTATEDIR%%/openldap-data 2>/dev/null || true
+%%SERVER%%@unexec rmdir %%LDAP_RUN_DIR%% 2>/dev/null || true
diff --git a/net/openldap22/Makefile b/net/openldap22/Makefile
index bccf8e39955d..f13c39a1e86f 100644
--- a/net/openldap22/Makefile
+++ b/net/openldap22/Makefile
@@ -7,7 +7,7 @@
PORTNAME= openldap
PORTVERSION= ${OPENLDAP_VERSION}.a
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net databases
MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \
http://public.planetmirror.com/pub/openldap/%SUBDIR%/ \
@@ -41,15 +41,17 @@ USE_OPENSSL= yes
USE_REINPLACE= yes
USE_LIBTOOL_VER= 14
+PLIST= ${WRKDIR}/pkg-plist
PKGINSTALL= ${WRKDIR}/pkg-install
PKGMESSAGE= ${WRKDIR}/pkg-message
-LOCALSTATEDIR?= /var/db
-LDAP_RUN_DIR?= /var/run/openldap
+LOCALSTATEDIR?= ${DESTDIR}/var/db
+LDAP_RUN_DIR?= ${DESTDIR}/var/run/openldap
WITH_BDB_VER?= 41
-CONFIGURE_ARGS= --with-threads \
+CONFIGURE_ARGS= --enable-dynamic \
+ --with-threads \
--with-tls=openssl
SED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \
@@ -61,7 +63,7 @@ PKGNAMESUFFIX= -client
CONFIGURE_ARGS+= --disable-slapd
PLIST_SUB+= SERVER="@comment " \
SLAPI="@comment "
-SED_SCRIPT+= -e '/^%%SERVER%%/d'
+SED_SCRIPT+= -e '/^%%SERVER%%/d'
.else
CONFIGURE_ARGS+= --localstatedir=${LOCALSTATEDIR} \
--enable-lmpasswd \
@@ -93,7 +95,6 @@ CONFIGURE_ARGS+= --enable-shell
.endif
.if defined(WITH_PERL)
-.error build with Perl backend broken: <http://www.openldap.org/its/index.cgi/Development?id=2513>
USE_PERL5= yes
CONFIGURE_ARGS+= --enable-perl
.endif
@@ -114,7 +115,6 @@ CONFIGURE_ARGS+= --enable-sql
.if defined(WITH_SLAPI)
LIB_DEPENDS+= ltdl.4:${PORTSDIR}/devel/libltdl
CONFIGURE_ARGS+= --enable-slapi
-LIBS+= -lltdl
PLIST_SUB+= SLAPI=""
.else
PLIST_SUB+= SLAPI="@comment "
@@ -137,7 +137,7 @@ CPPFLAGS+= -D_REENTRANT ${PTHREAD_CFLAGS} \
-I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
-CONFIGURE_TARGET= --host=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \
LDFLAGS="${LDFLAGS}" \
LIBS="${LIBS}"
@@ -167,6 +167,10 @@ post-patch:
@${REINPLACE_CMD} -e 's,%LOCALSTATEDIR%/slapd\.,${LDAP_RUN_DIR}/slapd.,g' \
${WRKSRC}/servers/slapd/slapd.conf
+pre-configure:
+ @${REINPLACE_CMD} -e '/^LIBTOOL=/s^\$$(top_builddir)/libtool^${LIBTOOL}^g' \
+ ${WRKSRC}/configure
+
post-build:
.for script in slapd.sh slurpd.sh
@${SED} ${SED_SCRIPT} ${FILESDIR}/${script} >${WRKDIR}/${script}
@@ -175,6 +179,18 @@ post-build:
@${SED} ${SED_SCRIPT} ${.CURDIR}/${text} >${WRKDIR}/${text}
.endfor
+pre-install:
+ @${CP} ${.CURDIR}/pkg-plist ${PLIST}
+.if !defined(NOPORTDOCS)
+ @for dir in rfc drafts; do \
+ ${FIND} ${WRKSRC}/doc/$${dir} -maxdepth 1 -type f \
+ | ${SED} -e "s,^${WRKSRC}/doc/,%%DOCSDIR%%/," \
+ >>${PLIST}; \
+ ${ECHO_CMD} "@dirrm %%DOCSDIR%%/$${dir}" >>${PLIST}; \
+ done
+ @${ECHO_CMD} "@dirrm %%DOCSDIR%%" >>${PLIST}
+.endif
+
post-install:
.if !defined(CLIENT_ONLY)
@${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${WRKDIR}/slurpd.sh ${PREFIX}/etc/rc.d
@@ -185,12 +201,8 @@ post-install:
@for dir in rfc drafts; do \
${MKDIR} ${DOCSDIR}/$${dir}; \
${FIND} ${WRKSRC}/doc/$${dir} -maxdepth 1 -type f \
- -exec ${INSTALL_DATA} {} ${DOCSDIR}/$${dir} \; -print \
- | ${SED} -e "s,^${WRKSRC}/doc/,${DOCSDIR:S,^${PREFIX}/,,}/," \
- >>${TMPPLIST}; \
- ${ECHO_CMD} "@dirrm ${DOCSDIR:S,^${PREFIX}/,,}/$${dir}" >>${TMPPLIST}; \
+ -exec ${INSTALL_DATA} {} ${DOCSDIR}/$${dir} \; ; \
done
- @${ECHO_CMD} "@dirrm ${DOCSDIR:S,^${PREFIX}/,,}" >>${TMPPLIST}
.endif
@${CAT} ${PKGMESSAGE}
diff --git a/net/openldap22/files/patch-build::ltmain.sh b/net/openldap22/files/patch-build::ltmain.sh
deleted file mode 100644
index 502d6b5db739..000000000000
--- a/net/openldap22/files/patch-build::ltmain.sh
+++ /dev/null
@@ -1,15 +0,0 @@
---- build/ltmain.sh.orig Sun Feb 9 23:24:29 2003
-+++ build/ltmain.sh Fri Jun 20 21:37:02 2003
-@@ -4285,12 +4285,6 @@
- IFS="$save_ifs"
- fi
-
-- # Install the pseudo-library for information purposes.
-- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-- instname="$dir/$name"i
-- $show "$install_prog $instname $destdir/$name"
-- $run eval "$install_prog $instname $destdir/$name" || exit $?
--
- # Maybe install the static library, too.
- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
- ;;
diff --git a/net/openldap22/files/patch-build::top.mk b/net/openldap22/files/patch-build::top.mk
new file mode 100644
index 000000000000..94551ea27b27
--- /dev/null
+++ b/net/openldap22/files/patch-build::top.mk
@@ -0,0 +1,11 @@
+--- build/top.mk.orig Mon Apr 7 22:23:26 2003
++++ build/top.mk Mon Jul 7 05:35:52 2003
+@@ -192,6 +192,8 @@
+ SLAPD_LIBS = @SLAPD_LIBS@ @SLAPD_PERL_LDFLAGS@ @SLAPD_SQL_LDFLAGS@ @SLAPD_SQL_LIBS@ @SLAPD_SLP_LIBS@
+ SLURPD_LIBS = @SLURPD_LIBS@
+
++SLAPI_LIBS = @SLAPI_LIBS@
++
+ # Our Defaults
+ CC = $(AC_CC)
+ DEFS = $(LDAP_INCPATH) $(XINCPATH) $(XDEFS) $(AC_DEFS) $(DEFINES)
diff --git a/net/openldap22/files/patch-libraries::liblunicode::ucstr.c b/net/openldap22/files/patch-libraries::liblunicode::ucstr.c
index f1074e1fe6d8..b8044b524697 100644
--- a/net/openldap22/files/patch-libraries::liblunicode::ucstr.c
+++ b/net/openldap22/files/patch-libraries::liblunicode::ucstr.c
@@ -1,11 +1,11 @@
--- libraries/liblunicode/ucstr.c.orig Fri Apr 11 03:57:10 2003
-+++ libraries/liblunicode/ucstr.c Sat Jul 5 10:53:04 2003
-@@ -15,6 +15,8 @@
++++ libraries/liblunicode/ucstr.c Sun Jul 6 02:50:32 2003
+@@ -10,7 +10,7 @@
+ #include <ac/string.h>
+ #include <ac/stdlib.h>
+
+-#include <lber.h>
++#include <lber_pvt.h>
+
#include <ldap_utf8.h>
#include <ldap_pvt_uc.h>
-
-+#include "lber_pvt.h"
-+
- #define malloc(x) ber_memalloc_x(x,ctx)
- #define realloc(x,y) ber_memrealloc_x(x,y,ctx)
- #define free(x) ber_memfree_x(x,ctx)
diff --git a/net/openldap22/files/patch-servers::slapd::back-perl b/net/openldap22/files/patch-servers::slapd::back-perl
new file mode 100644
index 000000000000..c6d024df3ed0
--- /dev/null
+++ b/net/openldap22/files/patch-servers::slapd::back-perl
@@ -0,0 +1,302 @@
+diff -Nur servers/slapd/back-perl/add.c.orig servers/slapd/back-perl/add.c
+--- servers/slapd/back-perl/add.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/add.c Thu Jun 5 11:44:06 2003
+@@ -13,17 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/bind.c.orig servers/slapd/back-perl/bind.c
+--- servers/slapd/back-perl/bind.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/bind.c Thu Jun 5 11:44:06 2003
+@@ -13,18 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-/* init.c - initialize Perl backend */
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/close.c.orig servers/slapd/back-perl/close.c
+--- servers/slapd/back-perl/close.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/close.c Thu Jun 5 11:44:06 2003
+@@ -13,18 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-/* init.c - initialize shell backend */
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/compare.c.orig servers/slapd/back-perl/compare.c
+--- servers/slapd/back-perl/compare.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/compare.c Thu Jun 5 11:44:06 2003
+@@ -13,17 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "lutil.h"
+ #include "perl_back.h"
+diff -Nur servers/slapd/back-perl/config.c.orig servers/slapd/back-perl/config.c
+--- servers/slapd/back-perl/config.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/config.c Thu Jun 5 11:44:06 2003
+@@ -13,17 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/delete.c.orig servers/slapd/back-perl/delete.c
+--- servers/slapd/back-perl/delete.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/delete.c Thu Jun 5 11:44:06 2003
+@@ -13,17 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/init.c.orig servers/slapd/back-perl/init.c
+--- servers/slapd/back-perl/init.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/init.c Thu Jun 12 22:25:21 2003
+@@ -13,18 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+- /* init.c - initialize shell backend */
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+@@ -37,7 +38,7 @@
+
+ #ifdef SLAPD_PERL_DYNAMIC
+
+-int back_perl_LTX_init_module(int argc, char *argv[])
++int init_module(int argc, char *argv[])
+ {
+ BackendInfo bi;
+
+diff -Nur servers/slapd/back-perl/modify.c.orig servers/slapd/back-perl/modify.c
+--- servers/slapd/back-perl/modify.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/modify.c Thu Jun 5 11:44:06 2003
+@@ -13,17 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/modrdn.c.orig servers/slapd/back-perl/modrdn.c
+--- servers/slapd/back-perl/modrdn.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/modrdn.c Thu Jun 5 11:44:06 2003
+@@ -26,17 +26,19 @@
+ *
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/search.c.orig servers/slapd/back-perl/search.c
+--- servers/slapd/back-perl/search.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/search.c Thu Jun 5 11:44:06 2003
+@@ -13,17 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
diff --git a/net/openldap22/pkg-plist b/net/openldap22/pkg-plist
index ff9ec200b978..9306575d05f9 100644
--- a/net/openldap22/pkg-plist
+++ b/net/openldap22/pkg-plist
@@ -39,8 +39,8 @@ etc/openldap/ldap.conf.default
%%SERVER%%@unexec if cmp -s %D/etc/openldap/slapd.conf %D/etc/openldap/slapd.conf.default; then rm -f %D/etc/openldap/slapd.conf; fi
%%SERVER%%etc/openldap/slapd.conf.default
%%SERVER%%@exec [ -f %B/slapd.conf ] || cp %B/%f %B/slapd.conf
-%%SERVER%%@unexec /bin/rmdir %D/etc/openldap/schema 2>/dev/null || true
-@unexec /bin/rmdir %D/etc/openldap 2>/dev/null || true
+%%SERVER%%@unexec rmdir %D/etc/openldap/schema 2>/dev/null || true
+@unexec rmdir %D/etc/openldap 2>/dev/null || true
%%SERVER%%etc/rc.d/slapd.sh
%%SERVER%%etc/rc.d/slurpd.sh
include/lber.h
@@ -78,6 +78,6 @@ share/openldap/ucdata/kdecomp.dat
share/openldap/ucdata/num.dat
@dirrm share/openldap/ucdata
@dirrm share/openldap
-%%SERVER%%@unexec /bin/rmdir %%LOCALSTATEDIR%%/openldap-slurp 2>/dev/null || true
-%%SERVER%%@unexec /bin/rmdir %%LOCALSTATEDIR%%/openldap-data 2>/dev/null || true
-%%SERVER%%@unexec /bin/rmdir %%LDAP_RUN_DIR%% 2>/dev/null || true
+%%SERVER%%@unexec rmdir %%LOCALSTATEDIR%%/openldap-slurp 2>/dev/null || true
+%%SERVER%%@unexec rmdir %%LOCALSTATEDIR%%/openldap-data 2>/dev/null || true
+%%SERVER%%@unexec rmdir %%LDAP_RUN_DIR%% 2>/dev/null || true
diff --git a/net/openldap23-server/Makefile b/net/openldap23-server/Makefile
index bccf8e39955d..f13c39a1e86f 100644
--- a/net/openldap23-server/Makefile
+++ b/net/openldap23-server/Makefile
@@ -7,7 +7,7 @@
PORTNAME= openldap
PORTVERSION= ${OPENLDAP_VERSION}.a
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net databases
MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \
http://public.planetmirror.com/pub/openldap/%SUBDIR%/ \
@@ -41,15 +41,17 @@ USE_OPENSSL= yes
USE_REINPLACE= yes
USE_LIBTOOL_VER= 14
+PLIST= ${WRKDIR}/pkg-plist
PKGINSTALL= ${WRKDIR}/pkg-install
PKGMESSAGE= ${WRKDIR}/pkg-message
-LOCALSTATEDIR?= /var/db
-LDAP_RUN_DIR?= /var/run/openldap
+LOCALSTATEDIR?= ${DESTDIR}/var/db
+LDAP_RUN_DIR?= ${DESTDIR}/var/run/openldap
WITH_BDB_VER?= 41
-CONFIGURE_ARGS= --with-threads \
+CONFIGURE_ARGS= --enable-dynamic \
+ --with-threads \
--with-tls=openssl
SED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \
@@ -61,7 +63,7 @@ PKGNAMESUFFIX= -client
CONFIGURE_ARGS+= --disable-slapd
PLIST_SUB+= SERVER="@comment " \
SLAPI="@comment "
-SED_SCRIPT+= -e '/^%%SERVER%%/d'
+SED_SCRIPT+= -e '/^%%SERVER%%/d'
.else
CONFIGURE_ARGS+= --localstatedir=${LOCALSTATEDIR} \
--enable-lmpasswd \
@@ -93,7 +95,6 @@ CONFIGURE_ARGS+= --enable-shell
.endif
.if defined(WITH_PERL)
-.error build with Perl backend broken: <http://www.openldap.org/its/index.cgi/Development?id=2513>
USE_PERL5= yes
CONFIGURE_ARGS+= --enable-perl
.endif
@@ -114,7 +115,6 @@ CONFIGURE_ARGS+= --enable-sql
.if defined(WITH_SLAPI)
LIB_DEPENDS+= ltdl.4:${PORTSDIR}/devel/libltdl
CONFIGURE_ARGS+= --enable-slapi
-LIBS+= -lltdl
PLIST_SUB+= SLAPI=""
.else
PLIST_SUB+= SLAPI="@comment "
@@ -137,7 +137,7 @@ CPPFLAGS+= -D_REENTRANT ${PTHREAD_CFLAGS} \
-I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
-CONFIGURE_TARGET= --host=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \
LDFLAGS="${LDFLAGS}" \
LIBS="${LIBS}"
@@ -167,6 +167,10 @@ post-patch:
@${REINPLACE_CMD} -e 's,%LOCALSTATEDIR%/slapd\.,${LDAP_RUN_DIR}/slapd.,g' \
${WRKSRC}/servers/slapd/slapd.conf
+pre-configure:
+ @${REINPLACE_CMD} -e '/^LIBTOOL=/s^\$$(top_builddir)/libtool^${LIBTOOL}^g' \
+ ${WRKSRC}/configure
+
post-build:
.for script in slapd.sh slurpd.sh
@${SED} ${SED_SCRIPT} ${FILESDIR}/${script} >${WRKDIR}/${script}
@@ -175,6 +179,18 @@ post-build:
@${SED} ${SED_SCRIPT} ${.CURDIR}/${text} >${WRKDIR}/${text}
.endfor
+pre-install:
+ @${CP} ${.CURDIR}/pkg-plist ${PLIST}
+.if !defined(NOPORTDOCS)
+ @for dir in rfc drafts; do \
+ ${FIND} ${WRKSRC}/doc/$${dir} -maxdepth 1 -type f \
+ | ${SED} -e "s,^${WRKSRC}/doc/,%%DOCSDIR%%/," \
+ >>${PLIST}; \
+ ${ECHO_CMD} "@dirrm %%DOCSDIR%%/$${dir}" >>${PLIST}; \
+ done
+ @${ECHO_CMD} "@dirrm %%DOCSDIR%%" >>${PLIST}
+.endif
+
post-install:
.if !defined(CLIENT_ONLY)
@${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${WRKDIR}/slurpd.sh ${PREFIX}/etc/rc.d
@@ -185,12 +201,8 @@ post-install:
@for dir in rfc drafts; do \
${MKDIR} ${DOCSDIR}/$${dir}; \
${FIND} ${WRKSRC}/doc/$${dir} -maxdepth 1 -type f \
- -exec ${INSTALL_DATA} {} ${DOCSDIR}/$${dir} \; -print \
- | ${SED} -e "s,^${WRKSRC}/doc/,${DOCSDIR:S,^${PREFIX}/,,}/," \
- >>${TMPPLIST}; \
- ${ECHO_CMD} "@dirrm ${DOCSDIR:S,^${PREFIX}/,,}/$${dir}" >>${TMPPLIST}; \
+ -exec ${INSTALL_DATA} {} ${DOCSDIR}/$${dir} \; ; \
done
- @${ECHO_CMD} "@dirrm ${DOCSDIR:S,^${PREFIX}/,,}" >>${TMPPLIST}
.endif
@${CAT} ${PKGMESSAGE}
diff --git a/net/openldap23-server/files/patch-build::ltmain.sh b/net/openldap23-server/files/patch-build::ltmain.sh
deleted file mode 100644
index 502d6b5db739..000000000000
--- a/net/openldap23-server/files/patch-build::ltmain.sh
+++ /dev/null
@@ -1,15 +0,0 @@
---- build/ltmain.sh.orig Sun Feb 9 23:24:29 2003
-+++ build/ltmain.sh Fri Jun 20 21:37:02 2003
-@@ -4285,12 +4285,6 @@
- IFS="$save_ifs"
- fi
-
-- # Install the pseudo-library for information purposes.
-- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-- instname="$dir/$name"i
-- $show "$install_prog $instname $destdir/$name"
-- $run eval "$install_prog $instname $destdir/$name" || exit $?
--
- # Maybe install the static library, too.
- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
- ;;
diff --git a/net/openldap23-server/files/patch-build::top.mk b/net/openldap23-server/files/patch-build::top.mk
new file mode 100644
index 000000000000..94551ea27b27
--- /dev/null
+++ b/net/openldap23-server/files/patch-build::top.mk
@@ -0,0 +1,11 @@
+--- build/top.mk.orig Mon Apr 7 22:23:26 2003
++++ build/top.mk Mon Jul 7 05:35:52 2003
+@@ -192,6 +192,8 @@
+ SLAPD_LIBS = @SLAPD_LIBS@ @SLAPD_PERL_LDFLAGS@ @SLAPD_SQL_LDFLAGS@ @SLAPD_SQL_LIBS@ @SLAPD_SLP_LIBS@
+ SLURPD_LIBS = @SLURPD_LIBS@
+
++SLAPI_LIBS = @SLAPI_LIBS@
++
+ # Our Defaults
+ CC = $(AC_CC)
+ DEFS = $(LDAP_INCPATH) $(XINCPATH) $(XDEFS) $(AC_DEFS) $(DEFINES)
diff --git a/net/openldap23-server/files/patch-libraries::liblunicode::ucstr.c b/net/openldap23-server/files/patch-libraries::liblunicode::ucstr.c
index f1074e1fe6d8..b8044b524697 100644
--- a/net/openldap23-server/files/patch-libraries::liblunicode::ucstr.c
+++ b/net/openldap23-server/files/patch-libraries::liblunicode::ucstr.c
@@ -1,11 +1,11 @@
--- libraries/liblunicode/ucstr.c.orig Fri Apr 11 03:57:10 2003
-+++ libraries/liblunicode/ucstr.c Sat Jul 5 10:53:04 2003
-@@ -15,6 +15,8 @@
++++ libraries/liblunicode/ucstr.c Sun Jul 6 02:50:32 2003
+@@ -10,7 +10,7 @@
+ #include <ac/string.h>
+ #include <ac/stdlib.h>
+
+-#include <lber.h>
++#include <lber_pvt.h>
+
#include <ldap_utf8.h>
#include <ldap_pvt_uc.h>
-
-+#include "lber_pvt.h"
-+
- #define malloc(x) ber_memalloc_x(x,ctx)
- #define realloc(x,y) ber_memrealloc_x(x,y,ctx)
- #define free(x) ber_memfree_x(x,ctx)
diff --git a/net/openldap23-server/files/patch-servers::slapd::back-perl b/net/openldap23-server/files/patch-servers::slapd::back-perl
new file mode 100644
index 000000000000..c6d024df3ed0
--- /dev/null
+++ b/net/openldap23-server/files/patch-servers::slapd::back-perl
@@ -0,0 +1,302 @@
+diff -Nur servers/slapd/back-perl/add.c.orig servers/slapd/back-perl/add.c
+--- servers/slapd/back-perl/add.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/add.c Thu Jun 5 11:44:06 2003
+@@ -13,17 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/bind.c.orig servers/slapd/back-perl/bind.c
+--- servers/slapd/back-perl/bind.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/bind.c Thu Jun 5 11:44:06 2003
+@@ -13,18 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-/* init.c - initialize Perl backend */
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/close.c.orig servers/slapd/back-perl/close.c
+--- servers/slapd/back-perl/close.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/close.c Thu Jun 5 11:44:06 2003
+@@ -13,18 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-/* init.c - initialize shell backend */
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/compare.c.orig servers/slapd/back-perl/compare.c
+--- servers/slapd/back-perl/compare.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/compare.c Thu Jun 5 11:44:06 2003
+@@ -13,17 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "lutil.h"
+ #include "perl_back.h"
+diff -Nur servers/slapd/back-perl/config.c.orig servers/slapd/back-perl/config.c
+--- servers/slapd/back-perl/config.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/config.c Thu Jun 5 11:44:06 2003
+@@ -13,17 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/delete.c.orig servers/slapd/back-perl/delete.c
+--- servers/slapd/back-perl/delete.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/delete.c Thu Jun 5 11:44:06 2003
+@@ -13,17 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/init.c.orig servers/slapd/back-perl/init.c
+--- servers/slapd/back-perl/init.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/init.c Thu Jun 12 22:25:21 2003
+@@ -13,18 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+- /* init.c - initialize shell backend */
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+@@ -37,7 +38,7 @@
+
+ #ifdef SLAPD_PERL_DYNAMIC
+
+-int back_perl_LTX_init_module(int argc, char *argv[])
++int init_module(int argc, char *argv[])
+ {
+ BackendInfo bi;
+
+diff -Nur servers/slapd/back-perl/modify.c.orig servers/slapd/back-perl/modify.c
+--- servers/slapd/back-perl/modify.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/modify.c Thu Jun 5 11:44:06 2003
+@@ -13,17 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/modrdn.c.orig servers/slapd/back-perl/modrdn.c
+--- servers/slapd/back-perl/modrdn.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/modrdn.c Thu Jun 5 11:44:06 2003
+@@ -26,17 +26,19 @@
+ *
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/search.c.orig servers/slapd/back-perl/search.c
+--- servers/slapd/back-perl/search.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/search.c Thu Jun 5 11:44:06 2003
+@@ -13,17 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
diff --git a/net/openldap23-server/pkg-plist b/net/openldap23-server/pkg-plist
index ff9ec200b978..9306575d05f9 100644
--- a/net/openldap23-server/pkg-plist
+++ b/net/openldap23-server/pkg-plist
@@ -39,8 +39,8 @@ etc/openldap/ldap.conf.default
%%SERVER%%@unexec if cmp -s %D/etc/openldap/slapd.conf %D/etc/openldap/slapd.conf.default; then rm -f %D/etc/openldap/slapd.conf; fi
%%SERVER%%etc/openldap/slapd.conf.default
%%SERVER%%@exec [ -f %B/slapd.conf ] || cp %B/%f %B/slapd.conf
-%%SERVER%%@unexec /bin/rmdir %D/etc/openldap/schema 2>/dev/null || true
-@unexec /bin/rmdir %D/etc/openldap 2>/dev/null || true
+%%SERVER%%@unexec rmdir %D/etc/openldap/schema 2>/dev/null || true
+@unexec rmdir %D/etc/openldap 2>/dev/null || true
%%SERVER%%etc/rc.d/slapd.sh
%%SERVER%%etc/rc.d/slurpd.sh
include/lber.h
@@ -78,6 +78,6 @@ share/openldap/ucdata/kdecomp.dat
share/openldap/ucdata/num.dat
@dirrm share/openldap/ucdata
@dirrm share/openldap
-%%SERVER%%@unexec /bin/rmdir %%LOCALSTATEDIR%%/openldap-slurp 2>/dev/null || true
-%%SERVER%%@unexec /bin/rmdir %%LOCALSTATEDIR%%/openldap-data 2>/dev/null || true
-%%SERVER%%@unexec /bin/rmdir %%LDAP_RUN_DIR%% 2>/dev/null || true
+%%SERVER%%@unexec rmdir %%LOCALSTATEDIR%%/openldap-slurp 2>/dev/null || true
+%%SERVER%%@unexec rmdir %%LOCALSTATEDIR%%/openldap-data 2>/dev/null || true
+%%SERVER%%@unexec rmdir %%LDAP_RUN_DIR%% 2>/dev/null || true
diff --git a/net/openldap24-server/Makefile b/net/openldap24-server/Makefile
index bccf8e39955d..f13c39a1e86f 100644
--- a/net/openldap24-server/Makefile
+++ b/net/openldap24-server/Makefile
@@ -7,7 +7,7 @@
PORTNAME= openldap
PORTVERSION= ${OPENLDAP_VERSION}.a
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= net databases
MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \
http://public.planetmirror.com/pub/openldap/%SUBDIR%/ \
@@ -41,15 +41,17 @@ USE_OPENSSL= yes
USE_REINPLACE= yes
USE_LIBTOOL_VER= 14
+PLIST= ${WRKDIR}/pkg-plist
PKGINSTALL= ${WRKDIR}/pkg-install
PKGMESSAGE= ${WRKDIR}/pkg-message
-LOCALSTATEDIR?= /var/db
-LDAP_RUN_DIR?= /var/run/openldap
+LOCALSTATEDIR?= ${DESTDIR}/var/db
+LDAP_RUN_DIR?= ${DESTDIR}/var/run/openldap
WITH_BDB_VER?= 41
-CONFIGURE_ARGS= --with-threads \
+CONFIGURE_ARGS= --enable-dynamic \
+ --with-threads \
--with-tls=openssl
SED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \
@@ -61,7 +63,7 @@ PKGNAMESUFFIX= -client
CONFIGURE_ARGS+= --disable-slapd
PLIST_SUB+= SERVER="@comment " \
SLAPI="@comment "
-SED_SCRIPT+= -e '/^%%SERVER%%/d'
+SED_SCRIPT+= -e '/^%%SERVER%%/d'
.else
CONFIGURE_ARGS+= --localstatedir=${LOCALSTATEDIR} \
--enable-lmpasswd \
@@ -93,7 +95,6 @@ CONFIGURE_ARGS+= --enable-shell
.endif
.if defined(WITH_PERL)
-.error build with Perl backend broken: <http://www.openldap.org/its/index.cgi/Development?id=2513>
USE_PERL5= yes
CONFIGURE_ARGS+= --enable-perl
.endif
@@ -114,7 +115,6 @@ CONFIGURE_ARGS+= --enable-sql
.if defined(WITH_SLAPI)
LIB_DEPENDS+= ltdl.4:${PORTSDIR}/devel/libltdl
CONFIGURE_ARGS+= --enable-slapi
-LIBS+= -lltdl
PLIST_SUB+= SLAPI=""
.else
PLIST_SUB+= SLAPI="@comment "
@@ -137,7 +137,7 @@ CPPFLAGS+= -D_REENTRANT ${PTHREAD_CFLAGS} \
-I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
-CONFIGURE_TARGET= --host=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \
LDFLAGS="${LDFLAGS}" \
LIBS="${LIBS}"
@@ -167,6 +167,10 @@ post-patch:
@${REINPLACE_CMD} -e 's,%LOCALSTATEDIR%/slapd\.,${LDAP_RUN_DIR}/slapd.,g' \
${WRKSRC}/servers/slapd/slapd.conf
+pre-configure:
+ @${REINPLACE_CMD} -e '/^LIBTOOL=/s^\$$(top_builddir)/libtool^${LIBTOOL}^g' \
+ ${WRKSRC}/configure
+
post-build:
.for script in slapd.sh slurpd.sh
@${SED} ${SED_SCRIPT} ${FILESDIR}/${script} >${WRKDIR}/${script}
@@ -175,6 +179,18 @@ post-build:
@${SED} ${SED_SCRIPT} ${.CURDIR}/${text} >${WRKDIR}/${text}
.endfor
+pre-install:
+ @${CP} ${.CURDIR}/pkg-plist ${PLIST}
+.if !defined(NOPORTDOCS)
+ @for dir in rfc drafts; do \
+ ${FIND} ${WRKSRC}/doc/$${dir} -maxdepth 1 -type f \
+ | ${SED} -e "s,^${WRKSRC}/doc/,%%DOCSDIR%%/," \
+ >>${PLIST}; \
+ ${ECHO_CMD} "@dirrm %%DOCSDIR%%/$${dir}" >>${PLIST}; \
+ done
+ @${ECHO_CMD} "@dirrm %%DOCSDIR%%" >>${PLIST}
+.endif
+
post-install:
.if !defined(CLIENT_ONLY)
@${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${WRKDIR}/slurpd.sh ${PREFIX}/etc/rc.d
@@ -185,12 +201,8 @@ post-install:
@for dir in rfc drafts; do \
${MKDIR} ${DOCSDIR}/$${dir}; \
${FIND} ${WRKSRC}/doc/$${dir} -maxdepth 1 -type f \
- -exec ${INSTALL_DATA} {} ${DOCSDIR}/$${dir} \; -print \
- | ${SED} -e "s,^${WRKSRC}/doc/,${DOCSDIR:S,^${PREFIX}/,,}/," \
- >>${TMPPLIST}; \
- ${ECHO_CMD} "@dirrm ${DOCSDIR:S,^${PREFIX}/,,}/$${dir}" >>${TMPPLIST}; \
+ -exec ${INSTALL_DATA} {} ${DOCSDIR}/$${dir} \; ; \
done
- @${ECHO_CMD} "@dirrm ${DOCSDIR:S,^${PREFIX}/,,}" >>${TMPPLIST}
.endif
@${CAT} ${PKGMESSAGE}
diff --git a/net/openldap24-server/files/patch-build::ltmain.sh b/net/openldap24-server/files/patch-build::ltmain.sh
deleted file mode 100644
index 502d6b5db739..000000000000
--- a/net/openldap24-server/files/patch-build::ltmain.sh
+++ /dev/null
@@ -1,15 +0,0 @@
---- build/ltmain.sh.orig Sun Feb 9 23:24:29 2003
-+++ build/ltmain.sh Fri Jun 20 21:37:02 2003
-@@ -4285,12 +4285,6 @@
- IFS="$save_ifs"
- fi
-
-- # Install the pseudo-library for information purposes.
-- name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-- instname="$dir/$name"i
-- $show "$install_prog $instname $destdir/$name"
-- $run eval "$install_prog $instname $destdir/$name" || exit $?
--
- # Maybe install the static library, too.
- test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
- ;;
diff --git a/net/openldap24-server/files/patch-build::top.mk b/net/openldap24-server/files/patch-build::top.mk
new file mode 100644
index 000000000000..94551ea27b27
--- /dev/null
+++ b/net/openldap24-server/files/patch-build::top.mk
@@ -0,0 +1,11 @@
+--- build/top.mk.orig Mon Apr 7 22:23:26 2003
++++ build/top.mk Mon Jul 7 05:35:52 2003
+@@ -192,6 +192,8 @@
+ SLAPD_LIBS = @SLAPD_LIBS@ @SLAPD_PERL_LDFLAGS@ @SLAPD_SQL_LDFLAGS@ @SLAPD_SQL_LIBS@ @SLAPD_SLP_LIBS@
+ SLURPD_LIBS = @SLURPD_LIBS@
+
++SLAPI_LIBS = @SLAPI_LIBS@
++
+ # Our Defaults
+ CC = $(AC_CC)
+ DEFS = $(LDAP_INCPATH) $(XINCPATH) $(XDEFS) $(AC_DEFS) $(DEFINES)
diff --git a/net/openldap24-server/files/patch-libraries::liblunicode::ucstr.c b/net/openldap24-server/files/patch-libraries::liblunicode::ucstr.c
index f1074e1fe6d8..b8044b524697 100644
--- a/net/openldap24-server/files/patch-libraries::liblunicode::ucstr.c
+++ b/net/openldap24-server/files/patch-libraries::liblunicode::ucstr.c
@@ -1,11 +1,11 @@
--- libraries/liblunicode/ucstr.c.orig Fri Apr 11 03:57:10 2003
-+++ libraries/liblunicode/ucstr.c Sat Jul 5 10:53:04 2003
-@@ -15,6 +15,8 @@
++++ libraries/liblunicode/ucstr.c Sun Jul 6 02:50:32 2003
+@@ -10,7 +10,7 @@
+ #include <ac/string.h>
+ #include <ac/stdlib.h>
+
+-#include <lber.h>
++#include <lber_pvt.h>
+
#include <ldap_utf8.h>
#include <ldap_pvt_uc.h>
-
-+#include "lber_pvt.h"
-+
- #define malloc(x) ber_memalloc_x(x,ctx)
- #define realloc(x,y) ber_memrealloc_x(x,y,ctx)
- #define free(x) ber_memfree_x(x,ctx)
diff --git a/net/openldap24-server/files/patch-servers::slapd::back-perl b/net/openldap24-server/files/patch-servers::slapd::back-perl
new file mode 100644
index 000000000000..c6d024df3ed0
--- /dev/null
+++ b/net/openldap24-server/files/patch-servers::slapd::back-perl
@@ -0,0 +1,302 @@
+diff -Nur servers/slapd/back-perl/add.c.orig servers/slapd/back-perl/add.c
+--- servers/slapd/back-perl/add.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/add.c Thu Jun 5 11:44:06 2003
+@@ -13,17 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/bind.c.orig servers/slapd/back-perl/bind.c
+--- servers/slapd/back-perl/bind.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/bind.c Thu Jun 5 11:44:06 2003
+@@ -13,18 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-/* init.c - initialize Perl backend */
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/close.c.orig servers/slapd/back-perl/close.c
+--- servers/slapd/back-perl/close.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/close.c Thu Jun 5 11:44:06 2003
+@@ -13,18 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-/* init.c - initialize shell backend */
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/compare.c.orig servers/slapd/back-perl/compare.c
+--- servers/slapd/back-perl/compare.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/compare.c Thu Jun 5 11:44:06 2003
+@@ -13,17 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "lutil.h"
+ #include "perl_back.h"
+diff -Nur servers/slapd/back-perl/config.c.orig servers/slapd/back-perl/config.c
+--- servers/slapd/back-perl/config.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/config.c Thu Jun 5 11:44:06 2003
+@@ -13,17 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/delete.c.orig servers/slapd/back-perl/delete.c
+--- servers/slapd/back-perl/delete.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/delete.c Thu Jun 5 11:44:06 2003
+@@ -13,17 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/init.c.orig servers/slapd/back-perl/init.c
+--- servers/slapd/back-perl/init.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/init.c Thu Jun 12 22:25:21 2003
+@@ -13,18 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+- /* init.c - initialize shell backend */
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+@@ -37,7 +38,7 @@
+
+ #ifdef SLAPD_PERL_DYNAMIC
+
+-int back_perl_LTX_init_module(int argc, char *argv[])
++int init_module(int argc, char *argv[])
+ {
+ BackendInfo bi;
+
+diff -Nur servers/slapd/back-perl/modify.c.orig servers/slapd/back-perl/modify.c
+--- servers/slapd/back-perl/modify.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/modify.c Thu Jun 5 11:44:06 2003
+@@ -13,17 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/modrdn.c.orig servers/slapd/back-perl/modrdn.c
+--- servers/slapd/back-perl/modrdn.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/modrdn.c Thu Jun 5 11:44:06 2003
+@@ -26,17 +26,19 @@
+ *
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
+diff -Nur servers/slapd/back-perl/search.c.orig servers/slapd/back-perl/search.c
+--- servers/slapd/back-perl/search.c.orig Sun May 25 03:56:59 2003
++++ servers/slapd/back-perl/search.c Thu Jun 5 11:44:06 2003
+@@ -13,17 +13,19 @@
+ * in file LICENSE in the top-level directory of the distribution.
+ */
+
+-#include "portable.h"
+-
+-#include <stdio.h>
++#include <EXTERN.h>
++#include <perl.h>
++#undef _ /* #defined used by both Perl and ac/localize.h */
+
+-#include "slap.h"
+ #ifdef HAVE_WIN32_ASPERL
+ #include "asperl_undefs.h"
+ #endif
+
+-#include <EXTERN.h>
+-#include <perl.h>
++#include "portable.h"
++
++#include <stdio.h>
++
++#include "slap.h"
+
+ #include "perl_back.h"
+
diff --git a/net/openldap24-server/pkg-plist b/net/openldap24-server/pkg-plist
index ff9ec200b978..9306575d05f9 100644
--- a/net/openldap24-server/pkg-plist
+++ b/net/openldap24-server/pkg-plist
@@ -39,8 +39,8 @@ etc/openldap/ldap.conf.default
%%SERVER%%@unexec if cmp -s %D/etc/openldap/slapd.conf %D/etc/openldap/slapd.conf.default; then rm -f %D/etc/openldap/slapd.conf; fi
%%SERVER%%etc/openldap/slapd.conf.default
%%SERVER%%@exec [ -f %B/slapd.conf ] || cp %B/%f %B/slapd.conf
-%%SERVER%%@unexec /bin/rmdir %D/etc/openldap/schema 2>/dev/null || true
-@unexec /bin/rmdir %D/etc/openldap 2>/dev/null || true
+%%SERVER%%@unexec rmdir %D/etc/openldap/schema 2>/dev/null || true
+@unexec rmdir %D/etc/openldap 2>/dev/null || true
%%SERVER%%etc/rc.d/slapd.sh
%%SERVER%%etc/rc.d/slurpd.sh
include/lber.h
@@ -78,6 +78,6 @@ share/openldap/ucdata/kdecomp.dat
share/openldap/ucdata/num.dat
@dirrm share/openldap/ucdata
@dirrm share/openldap
-%%SERVER%%@unexec /bin/rmdir %%LOCALSTATEDIR%%/openldap-slurp 2>/dev/null || true
-%%SERVER%%@unexec /bin/rmdir %%LOCALSTATEDIR%%/openldap-data 2>/dev/null || true
-%%SERVER%%@unexec /bin/rmdir %%LDAP_RUN_DIR%% 2>/dev/null || true
+%%SERVER%%@unexec rmdir %%LOCALSTATEDIR%%/openldap-slurp 2>/dev/null || true
+%%SERVER%%@unexec rmdir %%LOCALSTATEDIR%%/openldap-data 2>/dev/null || true
+%%SERVER%%@unexec rmdir %%LDAP_RUN_DIR%% 2>/dev/null || true