aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2012-07-27 01:11:07 +0800
committerdinoex <dinoex@FreeBSD.org>2012-07-27 01:11:07 +0800
commit05cd7431427521fa2bd1e77e1c2b8f6985289f80 (patch)
tree9914b982fd5db0703971e03e9cff9042116bd34a
parent75c3a0f260cf010dba6687b73b7a9059471c1743 (diff)
downloadfreebsd-ports-gnome-05cd7431427521fa2bd1e77e1c2b8f6985289f80.tar.gz
freebsd-ports-gnome-05cd7431427521fa2bd1e77e1c2b8f6985289f80.tar.zst
freebsd-ports-gnome-05cd7431427521fa2bd1e77e1c2b8f6985289f80.zip
- use OPTIONS_DEFINE
PR: 169846 Submitted by: Alastair Hogge
-rw-r--r--mail/meta1/Makefile99
1 files changed, 44 insertions, 55 deletions
diff --git a/mail/meta1/Makefile b/mail/meta1/Makefile
index f58ff3d4710b..f00efcd52965 100644
--- a/mail/meta1/Makefile
+++ b/mail/meta1/Makefile
@@ -47,72 +47,63 @@ EXTRA_SBIN= libcheck/noroot libconf/tree libmta/statit \
#GROUPS= meta1s meta1q meta1c meta1m meta1
#USERS= meta1s meta1q meta1c meta1m meta1
-# Options to define Features:
-# META1_WITHOUT_TLS=yes
-# META1_WITHOUT_SASL=yes
-# META1_WITHOUT_PMILTER=yes
-# META1_WITH_INTERNAL_BERKELEYD=yes
-# META1_WITH_BERKELEYDB=yes
-# Set either WITH_BDB_VER or META1_WITH_BDB_VER
-# to the version of Berkely DB to use.
-
# default config:
META1CONFDIR?= ${PREFIX}/etc/meta1
NOLOGIN_CMD?= /usr/sbin/nologin
-.if defined(META1_WITH_BERKELEYDB_VER)
-META1_WITH_BERKELEYDB= yes
-OBSOLETE_BDB_VAR= META1_WITH_BERKELEYDB_VER BERKELEYDB_PORT \
- BERKELEYDB_LIB BERKELEYDB_LIBDIR BERKELEYDB_INCLUDE
-IGNORE= use META1_WITH_BERKELEYDB to select Berkeley DB
-.endif
+OPTIONS_DEFINE= BDB PMILTER SASL2 SASL2AUTHD TLS
+OPTIONS_DEFAULT= BDB PMILTER SASL2 TLS
-.if defined(META1_WITH_INTERNAL_BERKELEYD)
-BERKELEYDB_SUFFIX= -intbdb
-PLIST_SUB+= WITH_BDBINT=""
-.else
-.if defined(META1_WITH_BDB_VER)
-META1_WITH_BERKELEYDB=yes
-.endif
-.if !defined(META1_WITH_BERKELEYDB)
-META1_WITH_BERKELEYDB=yes
-WITH_BDB_VER= 43
-.endif
-USE_BDB= 41+
-IGNORE_WITH_BDB= 2 3 40
-BERKELEYDB_SUFFIX= -${BDB_INCLUDE_DIR:S,^${LOCALBASE}/include/,,}
+BDB_DESC= External Berkeley DB support
+PMILTER_DESC= Adds policy milter support
+SASL2_DESC= Adds SASL2 support
+SASL2AUTHD_DESC= Enable plaintext authentication via SASL2
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MBDB}
+USE_BDB= 42+
+INVALID_BDB_VER= 46 47 48 5
+BERKELEYDB_SUFFIX= -db${BDB_VER}
CONFIGURE_ARGS+= --disable-included-bdb
CONFIGURE_ARGS+= --with-bdb-incdir=${BDB_INCLUDE_DIR}
CONFIGURE_ARGS+= --with-bdb-libdir=${BDB_LIB_DIR}
PLIST_SUB+= WITH_BDBINT="@comment "
+.else
+BERKELEYDB_SUFFIX= -intbdb
+PLIST_SUB+= WITH_BDBINT=""
.endif
-.if defined(META1_WITHOUT_SASL)
-SASL_SUFFIX?= -nosasl
-CONFIGURE_ARGS+= --disable-SASL
+.if ${PORT_OPTIONS:MPMILTER}
+USE_OPENSSL= yes
+CONFIGURE_ARGS+= --enable-pmilter
.else
-LIB_DEPENDS+= sasl2.2:${PORTSDIR}/security/cyrus-sasl2
-.if !defined(META1_WITHOUT_SASLAUTHD)
-RUN_DEPENDS+= ${LOCALBASE}/sbin/saslauthd:${PORTSDIR}/security/cyrus-sasl2-saslauthd
+PMILTER_SUFFIX?= -nopmilter
+CONFIGURE_ARGS+= --disable-pmilter
.endif
+
+.if ${PORT_OPTIONS:MSASL2}
+LIB_DEPENDS+= sasl2.2:${PORTSDIR}/security/cyrus-sasl2
CONFIGURE_ARGS+= --enable-SASL
CONFIGURE_ARGS+= --with-sasl-incdir=${LOCALBASE}/include
CONFIGURE_ARGS+= --with-sasl-libdir=${LOCALBASE}/lib
+.else
+SASL_SUFFIX?= -nosasl
+CONFIGURE_ARGS+= --disable-SASL
.endif
-.if defined(META1_WITHOUT_TLS) || defined(WITHOUT_TLS)
-TLS_SUFFIX?= -notls
-CONFIGURE_ARGS+= --disable-TLS
-.else
-CONFIGURE_ARGS+= --enable-TLS
+.if ${PORT_OPTIONS:MSASL2AUTHD}
+.if empty(PORT_OPTIONS:MSASL2)
+IGNORE= Option SASL2AUTHD needs option SASL2
+.endif
+RUN_DEPENDS+= ${LOCALBASE}/sbin/saslauthd:${PORTSDIR}/security/cyrus-sasl2-saslauthd
.endif
-.if defined(META1_WITHOUT_PMILTER) || defined(WITHOUT_PMILTER)
-PMILTER_SUFFIX?= -nopmilter
-CONFIGURE_ARGS+= --disable-pmilter
+.if ${PORT_OPTIONS:MTLS}
+CONFIGURE_ARGS+= --enable-TLS
.else
-USE_OPENSSL= yes
-CONFIGURE_ARGS+= --enable-pmilter
+TLS_SUFFIX?= -notls
+CONFIGURE_ARGS+= --disable-TLS
.endif
post-patch:
@@ -143,6 +134,13 @@ test:
#fails on bento
#regression-test: test
+.if !defined(UID)
+UID!= ${ID} -u
+.endif
+.if ${UID} != 0
+post-build: test
+.endif
+
pre-install:
if ! pw groupshow meta1s; then pw groupadd meta1s -g 260; fi
if ! pw groupshow meta1q; then pw groupadd meta1q -g 261; fi
@@ -176,13 +174,4 @@ post-install:
@cd ${WRKSRC}/doc && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}/
.endif
-.include <bsd.port.pre.mk>
-
-.if !defined(UID)
-UID!= ${ID} -u
-.endif
-.if ${UID} != 0
-post-build: test
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>