aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2008-07-21 22:29:22 +0000
committerPav Lucistnik <pav@FreeBSD.org>2008-07-21 22:29:22 +0000
commit7336164f4912e81b6d20fc99305dbca3957b1cc0 (patch)
treee5592006c4bd4c3fec5754c407713575b5a5193b
parentcd44a8ba7fa73965fa44d20e48a63adfc0a37102 (diff)
downloadports-7336164f4912e81b6d20fc99305dbca3957b1cc0.tar.gz
ports-7336164f4912e81b6d20fc99305dbca3957b1cc0.zip
Notes
-rw-r--r--Mk/bsd.ldap.mk95
-rw-r--r--Mk/bsd.port.mk52
-rw-r--r--dns/bind9-dlz/Makefile2
-rw-r--r--mail/postfix1/Makefile3
-rw-r--r--security/seahorse/Makefile3
5 files changed, 110 insertions, 45 deletions
diff --git a/Mk/bsd.ldap.mk b/Mk/bsd.ldap.mk
new file mode 100644
index 000000000000..f507c3922e4c
--- /dev/null
+++ b/Mk/bsd.ldap.mk
@@ -0,0 +1,95 @@
+# -*- mode: Makefile; tab-width: 4; -*-
+# ex: ts=4
+#
+# $FreeBSD$
+#
+
+.if defined(_POSTMKINCLUDED) && !defined(Ldap_Post_Include)
+
+Ldap_Post_Include= bsd.ldap.mk
+Database_Include_MAINTAINER= ports@FreeBSD.org
+
+# This file contains some routines to interact with different databases, such
+# as mysql, postgresql and berkley DB. For including this file define macro
+# USE_[LDAP], for example USE_OPENLDAP. Defining macro like USE_[LDAP]_VER or
+# WANT_[LDAP]_VER will include this file too.
+#
+##
+# USE_OPENLDAP - Add OpenLDAP client dependency.
+# If no version is given (by the maintainer via the port or
+# by the user via defined variable), try to find the
+# currently installed version. Fall back to default if
+# necessary (OpenLDAP 2.4 = 24).
+# DEFAULT_OPENLDAP_VER
+# - OpenLDAP default version. Can be overriden within a port.
+# Default: 24.
+# WANT_OPENLDAP_VER
+# - Maintainer can set an arbitrary version of OpenLDAP by using it.
+# IGNORE_OPENLDAP_OPENLDAP
+# - This variable can be defined if the ports doesn't support
+# one or more version of OpenLDAP.
+# WITH_OPENLDAP_VER
+# - User defined variable to set OpenLDAP version.
+# OPENLDAP_VER
+# - Detected OpenLDAP version.
+
+.if defined(USE_OPENLDAP)
+DEFAULT_OPENLPAP_VER?= 24
+# OpenLDAP client versions currently supported
+OPENLDAP23_LIBVER= 2.3.2
+OPENLDAP24_LIBVER= 2.4.3
+
+.if exists(${LOCALBASE}/bin/ldapwhoami)
+_OPENLDAP_VER!= ${LOCALBASE}/bin/ldapwhoami -VV 2>&1 | ${GREP} ldapwhoami | ${SED} -E 's/.*OpenLDAP: ldapwhoami (2)\.(3|4).*/\1\2/'
+.endif
+
+.if defined(WANT_OPENLDAP_VER)
+.if defined(WITH_OPENLDAP_VER) && ${WITH_OPENLDAP_VER} != ${WANT_OPENLDAP_VER}
+IGNORE= cannot install: the port wants openldap${WANT_OPENLDAP_VER}-client and you try to install openldap${WITH_OPENLDAP_VER}-client.
+.endif
+OPENLDAP_VER= ${WANT_OPENLDAP_VER}
+.elif defined(WITH_OPENLDAP_VER)
+OPENLDAP_VER= ${WITH_OPENLDAP_VER}
+.else
+.if defined(_OPENLDAP_VER)
+OPENLDAP_VER= ${_OPENLDAP_VER}
+.else
+OPENLDAP_VER= ${DEFAULT_OPENLDAP_VER}
+.endif
+.endif # WANT_OPENLDAP_VER
+
+.if defined(_OPENLDAP_VER)
+.if ${_OPENLDAP_VER} != ${OPENLDAP_VER}
+IGNORE= cannot install: OpenLDAP versions mismatch: openldap${_OPENLDAP_VER}-client is installed and wanted version is openldap${OPENLDAP_VER}-client
+.endif
+.endif
+
+CFLAGS+= -DLDAP_DEPRECATED
+
+.if defined(WANT_OPENLDAP_SASL)
+_OPENLDAP_FLAVOUR= -sasl
+.else
+_OPENLDAP_FLAVOUR=
+.endif
+
+# And now we are checking if we can use it
+.if defined(OPENLDAP${OPENLDAP_VER}_LIBVER)
+# compatability shim
+.if defined(BROKEN_WITH_OPENLDAP)
+IGNORE_WITH_OPENLDAP=${BROKEN_WITH_OPENLDAP}
+.endif
+.if defined(IGNORE_WITH_OPENLDAP)
+. for VER in ${IGNORE_WITH_OPENLDAP}
+. if (${OPENLDAP_VER} == "${VER}")
+IGNORE= cannot install: doesn't work with OpenLDAP version: ${OPENLDAP_VER} (Doesn't support OpenLDAP ${IGNORE_WITH_OPENLDAP})
+. endif
+. endfor
+.endif # IGNORE_WITH_OPENLDAP
+LIB_DEPENDS+= ldap-${OPENLDAP${OPENLDAP_VER}_LIBVER}:${PORTSDIR}/net/openldap${OPENLDAP_VER}${_OPENLDAP_FLAVOUR}-client
+.else
+IGNORE= cannot install: unknown OpenLDAP version: ${OPENLDAP_VER}
+.endif # Check for correct libs
+
+.endif # defined(USE_OPENLDAP)
+
+.endif # defined(_POSTMKINCLUDED) && !defined(Ldap_Post_Include)
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index f8f2c716c5bb..ed54092c6013 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -312,9 +312,6 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# GMAKE - Set to path of GNU make if not in $PATH.
# Default: gmake
##
-# USE_GETOPT_LONG
-# - If set, this port uses getopt_long. May be obsolete.
-##
# USE_ICONV - If set, this port uses libiconv.
# USE_GETTEXT - If set, this port uses GNU gettext (libintl).
##
@@ -384,7 +381,7 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# Supported components are: glut, glu, glw, gl and linux.
# If set to "yes", this is equivalent to "glu". Note that
# glut depends on glu, glw and glu depend on gl.
-# USE_MOTIF - If set, this port uses a Motif toolkit. Implies USE_XPM.
+# USE_MOTIF - If set, this port uses a Motif toolkit. Implies USE_XORG+= xpm
# NO_OPENMOTIF - If set, this port uses a custom Motif toolkit
# instead of Openmotif.
# Used only when USE_MOTIF is set.
@@ -394,14 +391,13 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
##
# USE_SDL - If set, this port uses the sdl libraries.
# See bsd.sdl.mk for more information.
-# USE_XPM - If set, this port uses the xpm graphics libraries.
##
# USE_OPENSSL - If set, this port relies on the OpenSSL package.
##
# USE_OPENLDAP - If set, this port uses the OpenLDAP libraries.
# Implies: WANT_OPENLDAP_VER?=23
# WANT_OPENLDAP_VER
-# - Legal values are: 22, 23, 24
+# - Legal values are: 23, 24
# If set to an unkown value, the port is marked BROKEN.
# WANT_OPENLDAP_SASL
# - If set, the system should use OpenLDAP libraries
@@ -594,7 +590,7 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# - A command to install binary executables. (By
# default, also strips them, unless ${STRIP} is
# overridden to be the empty string).
-# INSTALL_KLD - As INSTALL_KLD, but without the STRIP.
+# INSTALL_KLD - As INSTALL_PROGRAM, but without the STRIP.
# INSTALL_SCRIPT
# - A command to install executable scripts.
# INSTALL_DATA - A command to install sharable data.
@@ -807,7 +803,7 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# FETCH_BINARY - Path to ftp/http fetch command if not in $PATH.
# Default: "/usr/bin/fetch"
# FETCH_ARGS - Arguments to ftp/http fetch command.
-# Default: "-ARr"
+# Default: "-ApRr"
# FETCH_CMD - ftp/http fetch command.
# Default: ${FETCH_BINARY} ${FETCH_ARGS}
# FETCH_BEFORE_ARGS
@@ -1129,13 +1125,13 @@ INDEXDIR?= ${PORTSDIR}
.else
-# Look for ${WRKSRC}/.../*.orig files, and (re-)create
+# Look for ${PATCH_WRKSRC}/.../*.orig files, and (re-)create
# ${FILEDIR}/patch-* files from them.
.if !target(makepatch)
makepatch:
@cd ${.CURDIR} && ${MKDIR} ${FILESDIR}
- @(cd ${WRKSRC}; \
+ @(cd ${PATCH_WRKSRC}; \
for i in `find . -type f -name '*.orig'`; do \
ORG=$$i; \
NEW=$${i%.orig}; \
@@ -1503,7 +1499,7 @@ PERL= ${LOCALBASE}/bin/perl
.include "${PORTSDIR}/Mk/bsd.gecko.mk"
.endif
-.if defined(WANT_GNOME) || defined(USE_GNOME) || defined(USE_GTK)
+.if defined(WANT_GNOME) || defined(USE_GNOME)
.include "${PORTSDIR}/Mk/bsd.gnome.mk"
.endif
@@ -1544,8 +1540,6 @@ PERL= ${LOCALBASE}/bin/perl
# Location of mounted CDROM(s) to search for files
CD_MOUNTPTS?= /cdrom ${CD_MOUNTPT}
-WANT_OPENLDAP_VER?= 23
-
# Owner and group of the WWW user
WWWOWN?= www
WWWGRP?= www
@@ -1689,26 +1683,8 @@ CONFIGURE_ENV+= MAKE=${GMAKE}
.include "${PORTSDIR}/Mk/bsd.gcc.mk"
.endif
-.if defined(USE_OPENLDAP_VER)
-USE_OPENLDAP?= yes
-WANT_OPENLDAP_VER= ${USE_OPENLDAP_VER}
-.endif
-
-.if defined(USE_OPENLDAP)
-.if defined(WANT_OPENLDAP_SASL)
-_OPENLDAP_FLAVOUR= -sasl
-.else
-_OPENLDAP_FLAVOUR=
-.endif
-.if ${WANT_OPENLDAP_VER} == 22
-LIB_DEPENDS+= ldap-2.2.7:${PORTSDIR}/net/openldap22${_OPENLDAP_FLAVOUR}-client
-.elif ${WANT_OPENLDAP_VER} == 23
-LIB_DEPENDS+= ldap-2.3.2:${PORTSDIR}/net/openldap23${_OPENLDAP_FLAVOUR}-client
-.elif ${WANT_OPENLDAP_VER} == 24
-LIB_DEPENDS+= ldap-2.4.3:${PORTSDIR}/net/openldap24${_OPENLDAP_FLAVOUR}-client
-.else
-IGNORE= cannot be built with unknown OpenLDAP version: ${WANT_OPENLDAP_VER}
-.endif
+.if defined(USE_OPENLDAP) || defined(WANT_OPENLDAP_VER)
+.include "${PORTSDIR}/Mk/bsd.ldap.mk"
.endif
.if defined(USE_FAM)
@@ -1833,7 +1809,7 @@ RUN_DEPENDS+= ${LINUX_BASE_PORT}
.endif
.if defined(USE_MOTIF)
-USE_XPM= yes
+USE_XORG+= xpm
.if defined(WANT_LESSTIF)
LIB_DEPENDS+= Xm:${PORTSDIR}/x11-toolkits/lesstif
NO_OPENMOTIF= yes
@@ -1879,7 +1855,7 @@ MAKE_ENV+= DISPLAY="localhost:1001"
.endif
.if defined(USE_XPM)
-USE_XORG+= xpm
+IGNORE= USE_XPM is deprecated. Use USE_XORG=xpm instead.
.endif
XAWVER= 8
@@ -2016,7 +1992,7 @@ PLIST_SUB+= PERL_VERSION=${PERL_VERSION} \
.include "${PORTSDIR}/Mk/bsd.gecko.mk"
.endif
-.if defined(WANT_GNOME) || defined(USE_GNOME) || defined(USE_GTK)
+.if defined(WANT_GNOME) || defined(USE_GNOME)
.include "${PORTSDIR}/Mk/bsd.gnome.mk"
.endif
@@ -2256,7 +2232,7 @@ INSTALL_MACROS= BSD_INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
MAKE_ENV+= ${INSTALL_MACROS}
SCRIPTS_ENV+= ${INSTALL_MACROS}
-# Macro for coping entire directory tree with correct permissions
+# Macro for copying entire directory tree with correct permissions
.if ${UID} == 0
COPYTREE_BIN= ${SH} -c '(${FIND} -d $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null \
2>&1) && \
@@ -2353,7 +2329,7 @@ ALL_TARGET?= all
INSTALL_TARGET?= install
# Popular master sites
-.include "bsd.sites.mk"
+.include "${PORTSDIR}/Mk/bsd.sites.mk"
# Empty declaration to avoid "variable MASTER_SITES recursive" error
MASTER_SITES?=
diff --git a/dns/bind9-dlz/Makefile b/dns/bind9-dlz/Makefile
index 3dec610a232a..9c55762f3d57 100644
--- a/dns/bind9-dlz/Makefile
+++ b/dns/bind9-dlz/Makefile
@@ -88,7 +88,7 @@ CONFIGURE_ARGS+= --with-dlz-mysql
.if defined(WITH_LDAP)
LDAP_SUFFIX= +ldap
-USE_OPENLDAP_VER?= 23
+WITH_OPENLDAP_VER?= 23
CONFIGURE_ARGS+= --with-dlz-ldap
.endif
diff --git a/mail/postfix1/Makefile b/mail/postfix1/Makefile
index 485dfe3ccbcf..b91ddf8cad66 100644
--- a/mail/postfix1/Makefile
+++ b/mail/postfix1/Makefile
@@ -116,9 +116,6 @@ _REQUIRE+= postgresql
.if defined(WITH_OPENLDAP)
BROKEN= does not support OPENLDAP
USE_OPENLDAP= yes
-.if defined(WITH_OPENLDAP_VER)
-USE_OPENLDAP_VER= ${WITH_OPENLDAP_VER}
-.endif
POSTFIX_CCARGS+= -DHAS_LDAP -I${LOCALBASE}/include
POSTFIX_AUXLIBS+= -L${LOCALBASE}/lib -lldap -llber
_REQUIRE+= slapd
diff --git a/security/seahorse/Makefile b/security/seahorse/Makefile
index f6abf34f1563..e2e5a710666b 100644
--- a/security/seahorse/Makefile
+++ b/security/seahorse/Makefile
@@ -68,9 +68,6 @@ CONFIGURE_ARGS+=--disable-nautilus
.if !defined(WITHOUT_LDAP)
USE_OPENLDAP= yes
-.if ${WANT_OPENLDAP_VER} >= 23
-CFLAGS+= -DLDAP_DEPRECATED
-.endif
.else
CONFIGURE_ARGS+=--disable-ldap
.endif