Mike Erdely [2007-08-25, 04:06:49]:
> Hi,
>
> Recently I needed to set up LDAP authentication with Apache2.
> This required adding LDAP support to apr-util. (MAINTAINER CC'd)
>
> The diff below adds ldap support to devel/apr-util as an ldap FLAVOR
> and adds a -ldap subpackage to www/apache-httpd
> (PKGNAME-ldap= ap2-mod_auth_ldap-${V}).
>
> I've tested this on i386 (I also backported and tested it for 4.1 on
> a "production" 4.1 macppc machine - diff not included).
>
> Thoughts? OK?
>
> -ME
>
> Index: devel/apr-util/Makefile
> ===================================================================
> RCS file: /cvs/ports/devel/apr-util/Makefile,v
> retrieving revision 1.15
> diff -u -p -r1.15 Makefile
> --- devel/apr-util/Makefile 5 Jul 2007 16:02:03 -0000 1.15
> +++ devel/apr-util/Makefile 24 Aug 2007 19:55:02 -0000
> @@ -3,7 +3,7 @@
> COMMENT= "companion library to APR"
>
> DISTNAME= apr-util-1.2.8
> -FULLPKGNAME= apr-util${MT}-1.2.8
> +FULLPKGNAME= apr-util${MT}-1.2.8p0${LDAP}
> SHARED_LIBS += aprutil-1${MT} 2.9 # .2.9
>
> CATEGORIES= devel
> @@ -12,7 +12,7 @@ MAINTAINER= Aleksander Piotrowski <alek@
>
> HOMEPAGE= http://apr.apache.org/
>
> -FLAVORS= mt
> +FLAVORS= mt ldap
> FLAVOR?=
>
> # Apache License 2.0
> @@ -36,6 +36,16 @@ CONFIGURE_ARGS= --with-apr=${LOCALBASE}
> --with-iconv=${LOCALBASE} \
> --includedir=${LOCALBASE}/include/apr-1${MT}/ \
> --with-apr=${LOCALBASE}/bin/apr-1${MT}-config
> +
> +LDAP?=
> +.if ${FLAVOR:L:Mldap}
> +LDAP=-ldap
> +CONFIGURE_ARGS+= --with-ldap-include=${LOCALBASE}/include \
> + --with-ldap-lib=${LOCALBASE}/lib \
> + --with-ldap
> +LIB_DEPENDS+= lber,ldap::databases/openldap
> +WANTLIB += asn1 com_err crypto gssapi krb5 sasl2 ssl
> +.endif
>
> MT?=
> .if ${FLAVOR:L:Mmt}
I would prefer to drop the homebrewed FULLPKGNAME and let the
infrastructure handle the flavored pkgnames.