1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-20 00:21:35 +00:00

- Separate OpenLDAP related code into bsd.ldap.mk

- Change default OpenLDAP version to 2.4
- Remove OpenLDAP 2.2 support, the port has been gone for some time now
- Add -DDEPRECATED to CFLAGS for all OpenLDAP using ports

PR:		ports/123602, ports/124115, ports/125605
Submitted by:	delphij, Jens Rehsack <rehsack@web.de>,
		Yuri Pankov <yuri.pankov@gmail.com>

- Remove USE_GTK, it's no longer used

PR:		ports/123528
Submitted by:	mezz

- Use PATCH_WRKSRC instead of WRKSRC in do-patch target

PR:		ports/124169
Submitted by:	Max Brazhnikov <makc@issp.ac.ru>

- Remove USE_XPM, it's been replaced by USE_XORG+=xpm

PR:		ports/124506
Submitted by:	Alex Kozlov <spam@rm-rf.kiev.ua>

- Minor fixups for bsd.port.mk

PR:		ports/122675
Submitted by:	linimon

- Remove stale comment about USE_GETOPT_LONG

PR:		ports/124521
Submitted by:	Alex Kozlov <spam@rm-rf.kiev.ua>

- Correct comment about default fetch arguments

PR:		ports/125334
Submitted by:	Gary Palmer <freebsd-gnats@in-addr.com>
This commit is contained in:
Pav Lucistnik 2008-07-21 22:29:22 +00:00
parent cd44a8ba7f
commit 7336164f49
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=217264
5 changed files with 110 additions and 45 deletions

95
Mk/bsd.ldap.mk Normal file
View File

@ -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)

View File

@ -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?=

View File

@ -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

View File

@ -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

View File

@ -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