summaryrefslogtreecommitdiff
path: root/security/cyrus-sasl2
diff options
context:
space:
mode:
authorHajimu UMEMOTO <ume@FreeBSD.org>2003-01-17 11:49:04 +0000
committerHajimu UMEMOTO <ume@FreeBSD.org>2003-01-17 11:49:04 +0000
commit438f7f64a504f6f0446e2e829c3873d47d24e580 (patch)
tree66c12f6e7854d5890f431a6ebe15cc43e1efc7bd /security/cyrus-sasl2
parentnew port: comms/bforce-kst (diff)
Add WITH_MYSQL option.
Requested by: Przemyslaw Ciesielski <pck@blue.pl>
Notes
Notes: svn path=/head/; revision=73332
Diffstat (limited to 'security/cyrus-sasl2')
-rw-r--r--security/cyrus-sasl2/Makefile11
-rw-r--r--security/cyrus-sasl2/pkg-plist3
-rw-r--r--security/cyrus-sasl2/scripts/configure.sasl33
3 files changed, 40 insertions, 7 deletions
diff --git a/security/cyrus-sasl2/Makefile b/security/cyrus-sasl2/Makefile
index 2f5b5b3e00ae..f958b763a507 100644
--- a/security/cyrus-sasl2/Makefile
+++ b/security/cyrus-sasl2/Makefile
@@ -56,7 +56,9 @@ SCRIPTS_ENV= WRKDIRPREFIX="${WRKDIRPREFIX}" \
TOUCH="${TOUCH}" \
MKDIR="${MKDIR}" \
REALCURDIR="${.CURDIR}" \
- WITH_DB3="${WITH_DB3}"
+ WITH_DB3="${WITH_DB3}" \
+ WITH_MYSQL="${WITH_MYSQL}" \
+ WITH_LDAP="${WITH_LDAP}"
.if defined(WITHOUT_OTP)
CONFIGURE_ARGS+= --disable-otp
@@ -73,12 +75,6 @@ CONFIGURE_ARGS+= --disable-digest
DIGEST= "@comment "
.endif
-.if defined(WITH_LDAP)
-LIB_DEPENDS+= ldap.2:${PORTSDIR}/net/openldap2
-LIB_DEPENDS+= lber.2:${PORTSDIR}/net/openldap2
-CONFIGURE_ARGS+= --with-ldap=${PREFIX}
-.endif
-
.if defined(KRB5_HOME) && exists(${KRB5_HOME})
CONFIGURE_ARGS+= --enable-gssapi=${KRB5_HOME}
.elif defined(HEIMDAL_HOME) && exists(${HEIMDAL_HOME})
@@ -122,6 +118,7 @@ PLIST_SUB= PREFIX=${PREFIX} \
DIGEST=${DIGEST} \
GSSAPI=${GSSAPI} \
EBONES=${EBONES} \
+ MYSQL=${MYSQL} \
DOCSDIR=${DOCSDIR:S/^${PREFIX}\///} \
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
diff --git a/security/cyrus-sasl2/pkg-plist b/security/cyrus-sasl2/pkg-plist
index 40702b6ddc29..f3e4277d73c5 100644
--- a/security/cyrus-sasl2/pkg-plist
+++ b/security/cyrus-sasl2/pkg-plist
@@ -28,6 +28,9 @@ lib/sasl2/libanonymous.so.2
lib/sasl2/liblogin.a
lib/sasl2/liblogin.so
lib/sasl2/liblogin.so.2
+%%MYSQL%%lib/sasl2/libmysql.a
+%%MYSQL%%lib/sasl2/libmysql.so
+%%MYSQL%%lib/sasl2/libmysql.so.2
%%OTP%%lib/sasl2/libotp.a
%%OTP%%lib/sasl2/libotp.so
%%OTP%%lib/sasl2/libotp.so.2
diff --git a/security/cyrus-sasl2/scripts/configure.sasl b/security/cyrus-sasl2/scripts/configure.sasl
index 1189c5469de1..747eff735b80 100644
--- a/security/cyrus-sasl2/scripts/configure.sasl
+++ b/security/cyrus-sasl2/scripts/configure.sasl
@@ -13,6 +13,12 @@ if [ "${BATCH}" ]; then
else
OPTIONS="\"NDBM\""
fi
+ if [ "${WITH_MYSQL}" ]; then
+ OPTIONS="${OPTIONS} \"MySQL\""
+ fi
+ if [ "${WITH_LDAP}" ]; then
+ OPTIONS="${OPTIONS} \"OpenLDAP\""
+ fi
if [ "${OPTIONS}" != "x" ]; then
OPTIONS="${OPTIONS} \"SASLAUTHD\""
set ${OPTIONS}
@@ -25,12 +31,24 @@ else
SET_DB3="OFF"
SET_NDBM="ON"
fi
+ if [ "${WITH_MYSQL}" -o -f ${PREFIX}/lib/mysql/libmysqlclient.so ] ; then
+ SET_MYSQL="ON"
+ else
+ SET_MYSQL="OFF"
+ fi
+ if [ "${WITH_LDAP}" -o -f ${PREFIX}/lib/libldap.so.2 -a -f ${PREFIX}/lib/liblber.so.2 ] ; then
+ SET_LDAP="ON"
+ else
+ SET_LDAP="OFF"
+ fi
/usr/bin/dialog --title "Additional SASL options" --clear \
--checklist "\n\
Please select desired options:" -1 -1 16 \
NDBM "ndbm DB" ${SET_NDBM} \
DB3 "Berkeley DB, revision 3" ${SET_DB3} \
+MySQL "MySQL password Authentication" ${SET_MYSQL} \
+OpenLDAP "OpenLDAP 2.x password Authentication w/TLS" ${SET_LDAP} \
SASLAUTHD "Use saslauthd for password Authentication" ON \
2> $tempfile
@@ -82,6 +100,18 @@ while [ "$1" ]; do
echo "SASLDB_NAME= sasldb2"
DBLIB=1
;;
+ \"MySQL\")
+ echo "LIB_DEPENDS+= mysqlclient.10:\${PORTSDIR}/databases/mysql323-client"
+ echo "CONFIGURE_ARGS+= --with-mysql=\${PREFIX}"
+ echo "PLIST_SUB+= MYSQL=\"\""
+ DEFMYSQL=1
+ ;;
+ \"OpenLDAP\")
+ echo "LIB_DEPENDS+= ldap.2:\${PORTSDIR}/net/openldap2"
+ echo "LIB_DEPENDS+= lber.2:\${PORTSDIR}/net/openldap2"
+ echo "CONFIGURE_ARGS+= --with-ldap=\${PREFIX}"
+ OPENLDAP=1
+ ;;
\"SASLAUTHD\")
echo "PWCHECK_SUB+= -e \"s;%%PWCHECK%%;saslauthd;g\""
PWCHECK=1
@@ -107,3 +137,6 @@ if [ ! "${DBLIB}" ]; then
echo "CONFIGURE_ARGS+= --with-dblib=ndbm"
echo "SASLDB_NAME= sasldb2.db"
fi
+if [ ! "${DEFMYSQL}" ]; then
+ echo "PLIST_SUB+= MYSQL=\"@comment \""
+fi