ports/51640: [PATCH] update of port net/openldap20 to 2.0.27
Oliver Eikemeier
eikemeier at fillmore-labs.com
Wed Jun 18 11:40:09 UTC 2003
The following reply was made to PR ports/51640; it has been noted by GNATS.
From: Oliver Eikemeier <eikemeier at fillmore-labs.com>
To: FreeBSD-gnats-submit at FreeBSD.org
Cc:
Subject: Re: ports/51640: [PATCH] update of port net/openldap20 to 2.0.27
Date: Wed, 18 Jun 2003 13:37:48 +0200
chase CVS...
cat openldap20-2.0.27.patch | patch -p0 -d /usr/ports
find /usr/ports/net/openldap20 \( -name '*.orig' -o -empty \) -delete
--- openldap20-2.0.27.patch begins here ---
diff -Nur net/openldap20/Makefile.orig net/openldap20/Makefile
--- net/openldap20/Makefile.orig Fri May 2 12:14:50 2003
+++ net/openldap20/Makefile Fri May 2 12:14:51 2003
@@ -6,8 +6,7 @@
#
PORTNAME= openldap20
-PORTVERSION= 2.0.25
-PORTREVISION= 4
+PORTVERSION= 2.0.27
CATEGORIES= net databases
MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \
http://www.PlanetMirror.com/pub/openldap/%SUBDIR%/ \
@@ -30,42 +29,67 @@
MAINTAINER= ports at FreeBSD.org
COMMENT= Open source LDAP client and server software
-USE_AUTOCONF_VER=213
-USE_LIBTOOL= yes
+.if !defined(WITH_BDB_VER) || ${WITH_BDB_VER} == 3
+LIB_DEPENDS= db3.3:${PORTSDIR}/databases/db3
+.elif defined(WITH_BDB_VER) && ${WITH_BDB_VER} == 4
+LIB_DEPENDS= db4.0:${PORTSDIR}/databases/db4
+.else
+.error WITH_BDB_VER must be 3 or 4
+.endif
+.if defined(WITH_SASL)
+LIB_DEPENDS+= sasl.8:${PORTSDIR}/security/cyrus-sasl
+.endif
+.if defined(WITH_ODBC)
+LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc
+.endif
+
+GNU_CONFIGURE= yes
USE_OPENSSL= yes
USE_REINPLACE= yes
+CONFIGURE_TARGET=
LATEST_LINK= openldap2
-CONFIGURE_ARGS= --localstatedir=/var/db \
+WITH_BDB_VER?= 3
+
+LOCALSTATEDIR?= /var/db
+LDAP_RUN_DIR?= /var/run
+
+PLIST_SUB+= LOCALSTATEDIR=${LOCALSTATEDIR}
+
+CONFIGURE_ARGS= --localstatedir=${LOCALSTATEDIR} \
--with-threads \
--enable-shared \
--enable-dnssrv \
+ --enable-ldap \
+ --enable-shell \
--with-tls=openssl
# Include tcp-wrapper support
-.if exists(/usr/include/tcpd.h)
+.if !defined(WITHOUT_TCP_WRAPPERS) && exists(/usr/include/tcpd.h)
CONFIGURE_ARGS+= --enable-wrappers
.endif
# math.h uses _REENTRANT and stdio.h uses _THREAD_SAFE, so define both.
CPPFLAGS+= -D_REENTRANT ${PTHREAD_CFLAGS} \
-I${LOCALBASE}/include \
- ${DB_CFLAGS}
+ -I${LOCALBASE}/include/db${WITH_BDB_VER}
LDFLAGS+= -L${LOCALBASE}/lib
+LIBS+= -ldb${WITH_BDB_VER}
.if defined(WITH_SASL)
-LIB_DEPENDS+= sasl.8:${PORTSDIR}/security/cyrus-sasl
CPPFLAGS+= -I${LOCALBASE}/include/sasl1
+.else
+CONFIGURE_ARGS+= --without-cyrus-sasl
.endif
.if defined(WITH_ODBC)
-LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc
CONFIGURE_ARGS+=--enable-sql
.endif
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \
- LDFLAGS="${LDFLAGS}"
+ LDFLAGS="${LDFLAGS}" \
+ LIBS="${LIBS}"
INSTALLS_SHLIB= yes
@@ -90,32 +114,33 @@
.include <bsd.port.pre.mk>
.include "${FILESDIR}/manpages"
-.if exists(${LOCALBASE}/lib/libdb4.so)
-DB_CFLAGS= -I${LOCALBASE}/include/db4
-LIB_DEPENDS+= db4.0:${PORTSDIR}/databases/db4
-.else
-DB_CFLAGS= -I${LOCALBASE}/include/db3
-LIB_DEPENDS+= db3.3:${PORTSDIR}/databases/db3
+.if exists(${LOCALBASE}/lib/libdb4.so) && ${WITH_BDB_VER} != 4
+pre-everything::
+ @${ECHO_CMD} "=================================================="
+ @${ECHO_CMD}
+ @${ECHO_CMD} "If you want to build OpenLDAP with Berkeley DB 4.0"
+ @${ECHO_CMD} "hit Ctrl-C right now and type \"make WITH_BDB_VER=4\""
+ @${ECHO_CMD}
+ @${ECHO_CMD} "=================================================="
+ @${ECHO_CMD}
.endif
-post-patch:
- @${REINPLACE_CMD} -e 's@%LOCALSTATEDIR%/slapd[.]pid@/var/run/slapd.pid at g; \
- s@%LOCALSTATEDIR%/slapd[.]args@/var/run/slapd.args at g' ${WRKSRC}/servers/slapd/slapd.conf
-
-post-configure:
- @cd ${WRKSRC} ; ${PATCH} < ${FILESDIR}/libtool.diff
-
pre-build:
@cd ${WRKSRC} ; ${MAKE} depend
post-build:
- @${SED} 's,@@PREFIX@@,${PREFIX},g' ${FILESDIR}/slapd.sh >${WRKDIR}/slapd.sh
+ @${REINPLACE_CMD} -e 's,${LOCALSTATEDIR}/slapd\.,${LDAP_RUN_DIR}/slapd.,g' \
+ ${WRKSRC}/servers/slapd/slapd.conf.tmp
+ @${SED} -e 's,@@PREFIX@@,${PREFIX},g' -e 's,@@LDAP_RUN_DIR@@,${LDAP_RUN_DIR},g' \
+ ${FILESDIR}/slapd.sh >${WRKDIR}/slapd.sh.sample
+ @${SED} -e 's,@@PREFIX@@,${PREFIX},g' -e 's,@@LDAP_RUN_DIR@@,${LDAP_RUN_DIR},g' \
+ ${FILESDIR}/slurpd.sh >${WRKDIR}/slurpd.sh.sample
post-install:
.for f in ${BINS}
@strip ${PREFIX}/${f}
.endfor
- @${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh ${PREFIX}/etc/rc.d/slapd.sh.sample
+ @${INSTALL_SCRIPT} ${WRKDIR}/slapd.sh.sample ${WRKDIR}/slurpd.sh.sample ${PREFIX}/etc/rc.d
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
diff -Nur net/openldap20/distinfo.orig net/openldap20/distinfo
--- net/openldap20/distinfo.orig Thu Jul 18 17:13:29 2002
+++ net/openldap20/distinfo Wed Apr 30 11:01:37 2003
@@ -1 +1 @@
-MD5 (openldap-2.0.25.tgz) = 57ed9ea3d872595076d6eab7b93337bd
+MD5 (openldap-2.0.27.tgz) = a1e6508c471dd47205a3492cf57110a6
diff -Nur net/openldap20/files/libtool.diff.orig net/openldap20/files/libtool.diff
--- net/openldap20/files/libtool.diff.orig Tue Oct 31 12:42:22 2000
+++ net/openldap20/files/libtool.diff Thu Jan 1 01:00:00 1970
@@ -1,19 +0,0 @@
---- libtool.orig Tue Oct 31 01:43:06 2000
-+++ libtool Tue Oct 31 01:44:42 2000
-@@ -448,6 +448,16 @@
- --mode) prevopt="--mode" prev=mode ;;
- --mode=*) mode="$optarg" ;;
-
-+ --only-shared)
-+ build_libtool_libs=yes
-+ build_old_libs=no
-+ ;;
-+
-+ --only-static)
-+ build_libtool_libs=no
-+ build_old_libs=yes
-+ ;;
-+
- --quiet | --silent)
- show=:
- ;;
diff -Nur net/openldap20/files/manpages.orig net/openldap20/files/manpages
--- net/openldap20/files/manpages.orig Tue Oct 31 12:42:22 2000
+++ net/openldap20/files/manpages Wed Apr 30 15:24:48 2003
@@ -77,12 +77,11 @@
MLINKS+= lber-encode.3 ber_put_seq.3
MLINKS+= lber-encode.3 ber_put_set.3
MLINKS+= lber-encode.3 ber_put_string.3
-MLINKS+= lber-decode.3 ber_start_set.3
-MLINKS+= ldap.3 cldap.3
+MLINKS+= lber-encode.3 ber_start_set.3
+MLINKS+= ldap_abandon.3 ldap_abandon_ext.3
+MLINKS+= ldap_add.3 ldap_add_ext.3
+MLINKS+= ldap_add.3 ldap_add_ext_s.3
MLINKS+= ldap_add.3 ldap_add_s.3
-MLINKS+= ldap_bind.3 ldap_abandon_ext.3
-MLINKS+= ldap_bind.3 ldap_add_ext.3
-MLINKS+= ldap_bind.3 ldap_add_ext_s.3
MLINKS+= ldap_bind.3 ldap_bind_s.3
MLINKS+= ldap_bind.3 ldap_kerberos_bind1.3
MLINKS+= ldap_bind.3 ldap_kerberos_bind1_s.3
@@ -91,7 +90,6 @@
MLINKS+= ldap_bind.3 ldap_kerberos_bind_s.3
MLINKS+= ldap_bind.3 ldap_sasl_bind.3
MLINKS+= ldap_bind.3 ldap_sasl_bind_s.3
-MLINKS+= ldap_bind.3 ldap_set_rebind_proc.3
MLINKS+= ldap_bind.3 ldap_simple_bind.3
MLINKS+= ldap_bind.3 ldap_simple_bind_s.3
MLINKS+= ldap_bind.3 ldap_unbind.3
@@ -105,12 +103,6 @@
MLINKS+= ldap_cache.3 ldap_set_cache_options.3
MLINKS+= ldap_cache.3 ldap_uncache_entry.3
MLINKS+= ldap_cache.3 ldap_uncache_request.3
-MLINKS+= ldap_charset.3 ldap_8859_to_t61.3
-MLINKS+= ldap_charset.3 ldap_enable_translation.3
-MLINKS+= ldap_charset.3 ldap_set_string_translators.3
-MLINKS+= ldap_charset.3 ldap_t61_to_8859.3
-MLINKS+= ldap_charset.3 ldap_translate_from_t61.3
-MLINKS+= ldap_charset.3 ldap_translate_to_t61.3
MLINKS+= ldap_compare.3 ldap_compare_ext.3
MLINKS+= ldap_compare.3 ldap_compare_ext_s.3
MLINKS+= ldap_compare.3 ldap_compare_s.3
@@ -145,9 +137,7 @@
MLINKS+= ldap_friendly.3 ldap_friendly_name.3
MLINKS+= ldap_get_dn.3 ldap_dn2ufn.3
MLINKS+= ldap_get_dn.3 ldap_explode_dn.3
-MLINKS+= ldap_get_dn.3 ldap_explode_dns.3
MLINKS+= ldap_get_dn.3 ldap_explode_rdn.3
-MLINKS+= ldap_get_dn.3 ldap_is_dns_dn.3
MLINKS+= ldap_get_values.3 ldap_count_values.3
MLINKS+= ldap_get_values.3 ldap_count_values_len.3
MLINKS+= ldap_get_values.3 ldap_get_values_len.3
@@ -213,7 +203,4 @@
MLINKS+= ldap_url.3 ldap_url_search_s.3
MLINKS+= ldap_url.3 ldap_url_search_st.3
MLINKS+= ldapmodify.1 ldapadd.1
-MLINKS+= ldif2ldbm.8 ldif2id2children.8
-MLINKS+= ldif2ldbm.8 ldif2id2entry.8
-MLINKS+= ldif2ldbm.8 ldif2index.8
MLINKS+= mail500.8 fax500.8
diff -Nur net/openldap20/files/patch-clients_ud_Makefile.in.orig net/openldap20/files/patch-clients_ud_Makefile.in
--- net/openldap20/files/patch-clients_ud_Makefile.in.orig Thu Nov 2 02:42:48 2000
+++ net/openldap20/files/patch-clients_ud_Makefile.in Wed Apr 30 13:21:18 2003
@@ -2,7 +2,9 @@
+++ clients/ud/Makefile.in Wed Jul 26 14:24:14 2000
@@ -26,4 +26,4 @@
install-local: FORCE
- -$(MKDIR) $(bindir)
- -mv -f $(bindir)/ud $(bindir)/ud-
-- $(LTINSTALL) $(INSTALLFLAGS) -m 775 ud $(bindir)
+ -$(MKDIR) $(DESTDIR)$(bindir)
+- -mv -f $(DESTDIR)$(bindir)/ud $(DESTDIR)$(bindir)/ud-
+ $(LTINSTALL) $(INSTALLFLAGS) -m 755 ud $(bindir)
+ @( \
+ for prg in $(PROGRAMS); do \
+ $(LTINSTALL) $(INSTALLFLAGS) -s -m 755 $$prg$(EXEEXT) \
diff -Nur net/openldap20/files/slapd.sh.orig net/openldap20/files/slapd.sh
--- net/openldap20/files/slapd.sh.orig Mon Apr 7 09:29:35 2003
+++ net/openldap20/files/slapd.sh Wed Apr 30 17:06:02 2003
@@ -15,14 +15,16 @@
# IPv6 Only
#slapd_args='-h ldap://[::]'
#
+# Add '-u ldap -g ldap' when you do not want to run
+# slapd as root
#
slapd_args=
-pidfile=/var/run/slapd.pid
+pidfile=@@LDAP_RUN_DIR@@/slapd.pid
case "$1" in
start)
- if [ -x $slapd ]; then
+ if [ -x ${slapd_program} ]; then
echo -n ' slapd'
eval ${slapd_program} ${slapd_args}
diff -Nur net/openldap20/files/slurpd.sh.orig net/openldap20/files/slurpd.sh
--- net/openldap20/files/slurpd.sh.orig Thu Jan 1 01:00:00 1970
+++ net/openldap20/files/slurpd.sh Wed Apr 30 17:27:54 2003
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# $FreeBSD$
+
+slurpd_program=@@PREFIX@@/libexec/slurpd
+
+slurpd_args=
+
+case "$1" in
+start)
+ if [ -x ${slurpd_program} ]; then
+ echo -n ' slurpd'
+ ${slurpd_program} ${slurpd_args}
+ fi
+ ;;
+stop)
+ if ! killall `basename ${slurpd_program}`; then
+ echo ' slurpd: not running'
+ fi
+ ;;
+*)
+ echo "Usage: `basename $0` {start|stop}" >&2
+ exit 64
+ ;;
+esac
+
+exit 0
diff -Nur net/openldap20/pkg-plist.orig net/openldap20/pkg-plist
--- net/openldap20/pkg-plist.orig Tue Jan 15 15:31:00 2002
+++ net/openldap20/pkg-plist Wed Apr 30 21:31:35 2003
@@ -49,7 +49,10 @@
@exec [ -f %B/slapd.conf ] || cp %B/%f %B/slapd.conf
@unexec /bin/rmdir %D/etc/openldap/schema 2>/dev/null || true
@unexec /bin/rmdir %D/etc/openldap 2>/dev/null || true
+ at unexec /bin/rmdir %%LOCALSTATEDIR%%/openldap-ldbm 2>/dev/null || true
+ at unexec /bin/rmdir %%LOCALSTATEDIR%%/openldap-slurp 2>/dev/null || true
etc/rc.d/slapd.sh.sample
+etc/rc.d/slurpd.sh.sample
include/disptmpl.h
include/lber.h
include/lber_types.h
--- openldap20-2.0.27.patch ends here ---
More information about the freebsd-ports-bugs
mailing list