summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--databases/php-ldap/Makefile5
-rw-r--r--databases/php-ldap/options.mk14
2 files changed, 18 insertions, 1 deletions
diff --git a/databases/php-ldap/Makefile b/databases/php-ldap/Makefile
index cd5ecd222e6..52ff778789a 100644
--- a/databases/php-ldap/Makefile
+++ b/databases/php-ldap/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.11 2008/06/12 02:14:19 joerg Exp $
+# $NetBSD: Makefile,v 1.12 2009/05/29 21:23:58 manu Exp $
MODNAME= ldap
+PKGREVISION= 2
CATEGORIES+= databases
COMMENT= PHP extension for LDAP database access
@@ -10,6 +11,8 @@ CONFLICTS= php-ldap-[0-9]*
USE_PHP_EXT_PATCHES= yes
+.include "options.mk"
+
CONFIGURE_ARGS+= --with-${MODNAME}=shared,${BUILDLINK_PREFIX.openldap-client}
.include "../../lang/php/ext.mk"
diff --git a/databases/php-ldap/options.mk b/databases/php-ldap/options.mk
new file mode 100644
index 00000000000..931dbba1792
--- /dev/null
+++ b/databases/php-ldap/options.mk
@@ -0,0 +1,14 @@
+# $NetBSD: options.mk,v 1.1 2009/05/29 21:23:58 manu Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.php-ldap
+PKG_SUPPORTED_OPTIONS= sasl
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Msasl)
+USE_BUILTIN.openldap-client=no
+. include "../../databases/openldap-client/builtin.mk"
+. include "../../databases/openldap-client/buildlink3.mk"
+. include "../../security/cyrus-sasl/buildlink3.mk"
+CONFIGURE_ARGS+= --with-ldap-sasl=${PREFIX}
+.endif