aboutsummaryrefslogtreecommitdiffstats
path: root/net/openldap21-server
diff options
context:
space:
mode:
Diffstat (limited to 'net/openldap21-server')
-rw-r--r--net/openldap21-server/Makefile84
-rw-r--r--net/openldap21-server/distinfo4
-rw-r--r--net/openldap21-server/files/patch-build::ltmain.sh17
-rw-r--r--net/openldap21-server/pkg-install7
4 files changed, 76 insertions, 36 deletions
diff --git a/net/openldap21-server/Makefile b/net/openldap21-server/Makefile
index cc11a5d39707..2f936d8c43b0 100644
--- a/net/openldap21-server/Makefile
+++ b/net/openldap21-server/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= openldap
-PORTVERSION= 2.1.28
+PORTVERSION= 2.1.29
PORTREVISION= ${OPENLDAP_PORTREVISION}
CATEGORIES= net databases
MASTER_SITES= ftp://ftp.OpenLDAP.org/pub/OpenLDAP/%SUBDIR%/ \
@@ -33,17 +33,25 @@ MAINTAINER= eik@FreeBSD.org
COMMENT?= Open source LDAP server implementation
LATEST_LINK= ${PKGNAMEPREFIX}openldap21${PKGNAMESUFFIX}
-CONFLICTS= ${PKGNAMEPREFIX}${PORTNAME}-client-2.[02-9].*
WANT_OPENLDAP_VER?= 21
.if ${WANT_OPENLDAP_VER} != 21
BROKEN= "incompatible OpenLDAP version: ${WANT_OPENLDAP_VER}"
.endif
+PORTREVISION_CLIENT= 0
+PORTREVISION_SERVER= 0
+
+PKGNAMESUFFIX_CLIENT= -client
+PKGNAMESUFFIX_SERVER= -server
+
.if defined(CLIENT_ONLY)
-OPENLDAP_PORTREVISION= 1
-OPENLDAP_PKGNAMESUFFIX?=-client
-OPENLDAP_PKGFILESUFX?= .client
+OPENLDAP_PORTREVISION= ${PORTREVISION_CLIENT}
+OPENLDAP_PKGNAMESUFFIX= ${PKGNAMESUFFIX_CLIENT}
+OPENLDAP_PKGFILESUFX= .client
+
+CONFLICTS= ${PKGNAMEPREFIX}${PORTNAME}-client-2.[02-9].* \
+ ${PKGNAMEPREFIX}${PORTNAME}-sasl-client-2.[02-9].*
.if !defined(NOPORTDOCS)
PORTDOCS= drafts rfc
@@ -53,12 +61,19 @@ PORTDOCS= drafts rfc
.error You have `USE_OPENLDAP' defined either in your environment or in make(1) arguments.
.endif
.else
-OPENLDAP_PORTREVISION= 1
-OPENLDAP_PKGNAMESUFFIX?=-server
-OPENLDAP_PKGFILESUFX?=
+OPENLDAP_PORTREVISION= ${PORTREVISION_SERVER}
+OPENLDAP_PKGNAMESUFFIX= ${PKGNAMESUFFIX_SERVER}
+OPENLDAP_PKGFILESUFX=
RUN_DEPENDS= ${LOCALBASE}/lib/libldap.so.2:${PORTSDIR}/net/openldap21-client
-CONFLICTS+= ${PKGNAMEPREFIX}${PORTNAME}-server-2.[02-9].*
+CONFLICTS= ${PKGNAMEPREFIX}${PORTNAME}-server-2.[02-9].* \
+ ${PKGNAMEPREFIX}${PORTNAME}-sasl-server-2.[02-9].*
+
+.if ${PORTREVISION_CLIENT} != 0
+SUF1_CLIENT= _${PORTREVISION_CLIENT}
+.endif
+
+PKGNAME_CLIENT= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX_CLIENT}-${PORTVERSION}${SUF1_CLIENT}
.endif
USE_OPENSSL= yes
@@ -84,7 +99,8 @@ PLIST_SUB+= LDAP_RUN_DIR=${LDAP_RUN_DIR} \
DATABASEDIR=${DATABASEDIR} \
SLURPDIR=${SLURPDIR} \
-SED_SCRIPT= -e 's,%%PREFIX%%,${PREFIX},g' \
+SED_SCRIPT= -e 's,%%PKGNAME%%,${PKGNAME},g' \
+ -e 's,%%PREFIX%%,${PREFIX},g' \
-e 's,%%LDAP_RUN_DIR%%,${LDAP_RUN_DIR},g' \
-e 's,%%DATABASEDIR%%,${DATABASEDIR},g' \
-e 's,%%SLURPDIR%%,${SLURPDIR},g'
@@ -94,6 +110,8 @@ CONFIGURE_ARGS= --with-threads=posix \
--enable-dynamic
.if defined(WITH_SASL)
+PKGNAMESUFFIX_CLIENT:= -sasl${PKGNAMESUFFIX_CLIENT}
+PKGNAMESUFFIX_SERVER:= -sasl${PKGNAMESUFFIX_SERVER}
LIB_DEPENDS+= sasl2.2:${PORTSDIR}/security/cyrus-sasl2
CONFIGURE_ARGS+= --with-cyrus-sasl
.else
@@ -110,6 +128,15 @@ INSTALLS_SHLIB= yes
.else
# server specific configuration
+USE_RC_SUBR= yes
+
+SED_SCRIPT+= -e 's,%%PKGNAME_CLIENT%%,${PKGNAME_CLIENT},g' \
+ -e 's,%%RC_SUBR%%,${RC_SUBR},g' \
+ -e 's,%%RC_DIR%%,${RC_DIR},g' \
+ -e 's,%%RC_SUFX%%,${RC_SUFX},g'
+PLIST_SUB+= RC_DIR=${RC_DIR} \
+ RC_SUFX=${RC_SUFX}
+
EXTRA_PATCHES+= ${FILESDIR}/extrapatch-Makefile.in
CONFIGURE_ARGS+= --localstatedir=${LOCALSTATEDIR} \
@@ -126,31 +153,29 @@ CONFIGURE_ARGS+= --localstatedir=${LOCALSTATEDIR} \
CONFIGURE_ARGS+= --with-ldbm-api=bcompat \
--disable-bdb
.else
-CONFIGURE_ARGS+= --with-ldbm-api=berkeley
-
WITH_BDB_VER?= 41
.if ${WITH_BDB_VER} == 42
-LIB_DEPENDS+= db-4.2.2:${PORTSDIR}/databases/db42
CONFIGURE_ARGS+= --enable-bdb
+BDBLIB= db-4.2.2
.elif ${WITH_BDB_VER} == 41
-LIB_DEPENDS+= db41.1:${PORTSDIR}/databases/db41
CONFIGURE_ARGS+= --enable-bdb
+BDBLIB= db41.1
.elif ${WITH_BDB_VER} == 4
-LIB_DEPENDS+= db4.0:${PORTSDIR}/databases/db4
CONFIGURE_ARGS+= --disable-bdb
+BDBLIB= db4.0
.elif ${WITH_BDB_VER} == 3
-LIB_DEPENDS+= db3.3:${PORTSDIR}/databases/db3
CONFIGURE_ARGS+= --disable-bdb
+BDBLIB= db3.3
.else
.error WITH_BDB_VER must be 3, 4, 41 or 42
.endif
-.if ${WITH_BDB_VER} == 42
-LIBS+= -ldb-4.2
-.else
-LIBS+= -ldb${WITH_BDB_VER}
-.endif
+
+LIB_DEPENDS+= ${BDBLIB}:${PORTSDIR}/databases/db${WITH_BDB_VER}
CPPFLAGS+= -I${LOCALBASE}/include/db${WITH_BDB_VER}
+CONFIGURE_ARGS+= --with-ldbm-api=berkeley
+CONFIGURE_SED+= -e 's,ol_DB_LIB=$$,&-l${BDBLIB:R},' \
+ -e 's,(ol_cv_lib_db=)yes$$,\1-l${BDBLIB:R},'
.endif
.if defined(WITH_SHELL)
@@ -170,12 +195,11 @@ CONFIGURE_ARGS+= --enable-spasswd
WITH_ODBC_TYPE?= iODBC
.endif
.if defined(WITH_ODBC_TYPE)
+CONFIGURE_ARGS+= --enable-sql
.if ${WITH_ODBC_TYPE:L} == iodbc
LIB_DEPENDS+= iodbc.3:${PORTSDIR}/databases/libiodbc
-CONFIGURE_ARGS+= --enable-sql
.elif ${WITH_ODBC_TYPE:L} == unixodbc
LIB_DEPENDS+= odbc.1:${PORTSDIR}/databases/unixODBC
-CONFIGURE_ARGS+= --enable-sql
.else
.error WITH_ODBC_TYPE must be iODBC or unixODBC
.endif
@@ -192,7 +216,7 @@ CONFIGURE_ARGS+= --enable-wrappers
CPPFLAGS+= ${PTHREAD_CFLAGS} \
-I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
-LIBS+= ${PTHREAD_LIBS}
+#LIBS+= ${PTHREAD_LIBS}
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \
@@ -205,20 +229,12 @@ CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \
.include "${FILESDIR}/manpages"
.else
.if ${OSVERSION} >= 500038
-RC_SUBR?= ${DESTDIR}/etc/rc.subr
RC_DIR= ${DESTDIR}/etc/rc.d
RC_SUFX=
.else
-USE_RC_SUBR= yes
RC_DIR= ${PREFIX}/etc/rc.d
RC_SUFX= .sh
.endif
-
-SED_SCRIPT+= -e 's,%%RC_SUBR%%,${RC_SUBR},g' \
- -e 's,%%RC_DIR%%,${RC_DIR},g' \
- -e 's,%%RC_SUFX%%,${RC_SUFX},g'
-PLIST_SUB+= RC_DIR=${RC_DIR} \
- RC_SUFX=${RC_SUFX}
.endif
pre-everything::
@@ -245,6 +261,10 @@ pre-everything::
post-patch:
@${REINPLACE_CMD} -e 's,%LOCALSTATEDIR%/slapd\.,${LDAP_RUN_DIR}/slapd.,g' \
${WRKSRC}/servers/slapd/slapd.conf
+.if defined(CONFIGURE_SED)
+ @${REINPLACE_CMD} -E ${CONFIGURE_SED} \
+ ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
+.endif
pre-configure:
@if [ -n "`${PKG_INFO} -xI '^bind\(84\)\{0,1\}-base-8\.' 2>/dev/null`" ]; then \
diff --git a/net/openldap21-server/distinfo b/net/openldap21-server/distinfo
index c0ae2c25da44..3b0da2337ede 100644
--- a/net/openldap21-server/distinfo
+++ b/net/openldap21-server/distinfo
@@ -1,2 +1,2 @@
-MD5 (openldap-2.1.28.tgz) = d2e8c48a65ef28dea44df1b4b0a21023
-SIZE (openldap-2.1.28.tgz) = 2044540
+MD5 (openldap-2.1.29.tgz) = 94de77f0efedeaacb2a78aab919aafbd
+SIZE (openldap-2.1.29.tgz) = 2044665
diff --git a/net/openldap21-server/files/patch-build::ltmain.sh b/net/openldap21-server/files/patch-build::ltmain.sh
index 53bc16473d95..ddc096d63b3c 100644
--- a/net/openldap21-server/files/patch-build::ltmain.sh
+++ b/net/openldap21-server/files/patch-build::ltmain.sh
@@ -1,5 +1,5 @@
--- build/ltmain.sh.orig Mon Feb 10 20:24:24 2003
-+++ build/ltmain.sh Thu Mar 25 02:17:45 2004
++++ build/ltmain.sh Sun Mar 28 19:11:24 2004
@@ -1066,7 +1066,7 @@
esac
elif test "X$arg" = "X-lc_r"; then
@@ -9,7 +9,20 @@
# Do not include libc_r directly, use -pthread flag.
continue
;;
-@@ -4286,10 +4286,17 @@
+@@ -1078,6 +1078,12 @@
+
+ -module)
+ module=yes
++ case $host in
++ *-*-freebsd*)
++ # Do not build the useless static library
++ build_old_libs=no
++ ;;
++ esac
+ continue
+ ;;
+
+@@ -4286,10 +4292,17 @@
fi
# Install the pseudo-library for information purposes.
diff --git a/net/openldap21-server/pkg-install b/net/openldap21-server/pkg-install
index ee0a9e8588bd..593e92c14a5e 100644
--- a/net/openldap21-server/pkg-install
+++ b/net/openldap21-server/pkg-install
@@ -6,12 +6,19 @@
CHOWN=/usr/sbin/chown
ECHO_CMD=echo
GREP=/usr/bin/grep
+PKG_INFO=/usr/sbin/pkg_info
PW=/usr/sbin/pw
FTPUSERS=/etc/ftpusers
case $2 in
PRE-INSTALL)
+ if ! ${PKG_INFO} -e '%%PKGNAME_CLIENT%%'; then
+ ${ECHO_CMD} "===> %%PKGNAME%% requires %%PKGNAME_CLIENT%%."
+ ${ECHO_CMD}
+ ${ECHO_CMD} " Please install %%PKGNAME_CLIENT%% manually."
+ exit 1
+ fi
if ! ${PW} usershow -n ldap >/dev/null 2>&1; then
${ECHO_CMD}
if ! ${PW} groupshow -n ldap >/dev/null 2>&1; then