summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2004-07-31 03:42:52 +0000
committerjlam <jlam@pkgsrc.org>2004-07-31 03:42:52 +0000
commite5db0fd5d75aa7f463633992371fc223eaa856b6 (patch)
treefd84a876743ec5ec5cf60ed59a8576f00c390185 /mail
parent8349293f6a3d488ff1b67d7a9abf09a07babd6cf (diff)
downloadpkgsrc-e5db0fd5d75aa7f463633992371fc223eaa856b6.tar.gz
Convert to use bsd.options.mk.
Diffstat (limited to 'mail')
-rw-r--r--mail/cyrus-imapd21/Makefile77
1 files changed, 53 insertions, 24 deletions
diff --git a/mail/cyrus-imapd21/Makefile b/mail/cyrus-imapd21/Makefile
index 38688fb1463..70ceca93b39 100644
--- a/mail/cyrus-imapd21/Makefile
+++ b/mail/cyrus-imapd21/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.20 2004/03/31 10:38:16 jlam Exp $
+# $NetBSD: Makefile,v 1.21 2004/07/31 03:42:52 jlam Exp $
DISTNAME= cyrus-imapd-2.1.15
PKGREVISION= 3
@@ -24,12 +24,6 @@ DEINSTALL_EXTRA_TMPL+= ${.CURDIR}/DEINSTALL
.include "../../mk/bsd.prefs.mk"
-BUILD_DEFS+= CYRUS_USE_INET6
-.if defined(CYRUS_USE_INET6) && !empty(CYRUS_USE_INET6:M[yY][eE][sS])
-PATCH_SITES= http://www.imasy.or.jp/~ume/ipv6/
-PATCHFILES= ${DISTNAME}-ipv6-20030819.diff.gz
-.endif
-
# CYRUS_USER username of the Cyrus administrator
# CYRUS_GROUP group of the Cyrus administrator
#
@@ -55,12 +49,51 @@ CONFIGURE_ARGS+= --without-notify
CONFIGURE_ARGS+= --without-ucdsnmp
CONFIGURE_ARGS+= --without-zephyr
+# Ensure that we use the db3 library, even if the db4 one gets pulled in
+# as an indirect dependency.
+#
+.include "../../databases/db3/buildlink3.mk"
+CONFIGURE_ARGS+= --with-bdb-libdir=${BUILDLINK_PREFIX.db3}/lib
+CONFIGURE_ARGS+= --with-bdb-incdir=${BUILDLINK_PREFIX.db3}/include/db3
+.for _var_ in db_4_1 db4_1 db41 db_4_0 db4_0 db_4 db40 db4
+CONFIGURE_ENV+= ac_cv_lib_${_var_}_db_create=no
+.endfor
+
+# Global and legacy options
+.if defined(CYRUS_USE_INET6) || defined(CYRUS_DB_RECOMMENDED) || \
+ defined(KERBEROS)
+. if !defined(PKG_OPTIONS.cyrus-imapd)
+. if defined(CYRUS_USE_INET6)
+PKG_OPTIONS.cyrus-imapd+= inet6
+. endif
+. if defined(CYRUS_DB_RECOMMENDED)
+PKG_OPTIONS.cyrus-imapd+= recommended-db
+. endif
+. if defined(KERBEROS)
+. if ${KERBEROS} == "4"
+PKG_OPTIONS.cyrus-imapd+= kerberos4
+. else
+PKG_OPTIONS.cyrus-imapd+= kerberos
+. endif
+. endif
+. endif
+.endif
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.cyrus-imapd
+PKG_SUPPORTED_OPTIONS= gssapi inet6 kerberos kerberos4 recommended-db
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Minet6)
+PATCH_SITES= http://www.imasy.or.jp/~ume/ipv6/
+PATCHFILES= ${DISTNAME}-ipv6-20030819.diff.gz
+.endif
+
+.if !empty(PKG_OPTIONS:Mrecommended-db)
+#
# Follow the recommended methods for database types to use. I'm not
# 100% ready to override the defaults till I've checked any side effects
# - chris@nb.org
#
-BUILD_DEFS+= CYRUS_DB_RECOMMENDED
-.if defined(CYRUS_DB_RECOMMENDED)
CONFIGURE_ARGS+= --with-duplicate-db=db3_nosync
CONFIGURE_ARGS+= --with-mboxlist-db=skiplist
CONFIGURE_ARGS+= --with-seen-db=skiplist
@@ -68,23 +101,20 @@ CONFIGURE_ARGS+= --with-subs-db=flat
CONFIGURE_ARGS+= --with-tls-db=db3_nosync
.endif
-# Ensure that we use the db3 library, even if the db4 one gets pulled in
-# as an indirect dependency.
-#
-.include "../../databases/db3/buildlink3.mk"
-CONFIGURE_ARGS+= --with-bdb-libdir=${BUILDLINK_PREFIX.db3}/lib
-CONFIGURE_ARGS+= --with-bdb-incdir=${BUILDLINK_PREFIX.db3}/include/db3
-.for _var_ in db_4_1 db4_1 db41 db_4_0 db4_0 db_4 db40 db4
-CONFIGURE_ENV+= ac_cv_lib_${_var_}_db_create=no
-.endfor
+.if !empty(PKG_OPTIONS:Mkerberos)
+. if empty(PKG_OPTIONS:Mgssapi)
+PKG_OPTIONS+= gssapi
+. endif
+.endif
-.if defined(KERBEROS)
-. if (${KERBEROS} == 4) && exists(/usr/include/kerberosIV/krb.h)
-PKG_USE_KERBEROS= yes
+.if !empty(PKG_OPTIONS:Mkerberos4)
+. if exists(/usr/include/kerberosIV/krb.h)
+CRYPTO+= uses Kerberos encryption code
CONFIGURE_ARGS+= --with-auth=krb
CONFIGURE_ARGS+= --with-krb=/usr
-. else
-. include "../../mk/krb5.buildlink3.mk"
+. endif
+.elif !empty(PKG_OPTIONS:Mgssapi)
+. include "../../mk/krb5.buildlink3.mk"
CONFIGURE_ARGS+= --with-auth=unix
CONFIGURE_ARGS+= --enable-gssapi=${KRB5BASE}
CONFIGURE_ARGS+= --with-gss_impl=${GSSIMPL.${KRB5_TYPE}}
@@ -92,7 +122,6 @@ GSSIMPL.heimdal= heimdal
GSSIMPL.mit-krb5= mit
CONFIGURE_ENV+= COMPILE_ET=${KRB5BASE}/bin/compile_et
COMERRBASE= ${KRB5BASE}
-. endif
.else
CONFIGURE_ARGS+= --with-auth=unix
CONFIGURE_ARGS+= --without-krb