aboutsummaryrefslogtreecommitdiff
path: root/mail/anubis
diff options
context:
space:
mode:
authorJason E. Hale <jhale@FreeBSD.org>2016-01-07 17:26:33 +0000
committerJason E. Hale <jhale@FreeBSD.org>2016-01-07 17:26:33 +0000
commit781dae49d7e0242f8a87ca023cc26a956bc83c3b (patch)
tree905cf0d374bf4cd21f604cca05bc10d4686b98ab /mail/anubis
parent8eff792d53e16f0d09ade603b2dda498f64e6960 (diff)
downloadports-781dae49d7e0242f8a87ca023cc26a956bc83c3b.tar.gz
ports-781dae49d7e0242f8a87ca023cc26a956bc83c3b.zip
- Convert to OPTIONS helpers where possible
- Rename GPGME option to GNUPG as it better describes the functionality provided - Bump PORTREVISION due to option name change
Notes
Notes: svn path=/head/; revision=405477
Diffstat (limited to 'mail/anubis')
-rw-r--r--mail/anubis/Makefile137
1 files changed, 55 insertions, 82 deletions
diff --git a/mail/anubis/Makefile b/mail/anubis/Makefile
index a0651ebebe3e..d6c5b06910bd 100644
--- a/mail/anubis/Makefile
+++ b/mail/anubis/Makefile
@@ -3,7 +3,7 @@
PORTNAME= anubis
PORTVERSION= 4.2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= mail
MASTER_SITES= GNU
@@ -13,16 +13,6 @@ COMMENT= Outgoing SMTP mail processor
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/COPYING
-OPTIONS_DEFINE= NLS EXAMPLES GUILE GPGME GNUTLS GSASL \
- GDBM MYSQL PGSQL PCRE PAM SOCKS LIBWRAP
-OPTIONS_DEFAULT=GUILE GPGME GNUTLS GSASL
-NO_OPTIONS_SORT=yes
-
-GPGME_DESC= GnuPG support via GPGME
-GSASL_DESC= GSASL support (required for databases)
-GDBM_DESC= GDBM backend
-SOCKS_DESC= SOCKS proxy support
-
USES= autoreconf charsetfix cpe makeinfo pkgconfig shebangfix
CHARSETFIX_MAKEFILEIN= gnulib.mk
CPE_VENDOR= gnu
@@ -37,100 +27,83 @@ CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
MAKE_JOBS_UNSAFE= yes
-.include <bsd.port.options.mk>
+OPTIONS_DEFINE= NLS EXAMPLES GUILE GNUPG GNUTLS GSASL \
+ LIBWRAP PCRE PAM SOCKS
+OPTIONS_GROUP= DB
+OPTIONS_GROUP_DB= GDBM MYSQL PGSQL
+OPTIONS_DEFAULT= GUILE GNUPG GNUTLS GSASL
+OPTIONS_SUB= yes
+NO_OPTIONS_SORT= yes
-# Default requirement for anubis rc script
-_REQUIRE= mail
-
-.if ${PORT_OPTIONS:MNLS}
-USES+= gettext iconv
-PLIST_SUB+= NLS=""
-.else
-CONFIGURE_ARGS+=--disable-nls
-PLIST_SUB+= NLS="@comment "
+.if !exists(/usr/include/tcpd.h)
+OPTIONS_EXCLUDE+= LIBWRAP
.endif
-
-.if ${PORT_OPTIONS:MGUILE}
-LIB_DEPENDS+= libguile.so:${PORTSDIR}/lang/guile
-PORTEXAMPLES+= anubis.scm anubisrc.guile
-PLIST_SUB+= GUILE=""
-.else
-CONFIGURE_ARGS+=--without-guile
-PLIST_SUB+= GUILE="@comment "
+.if !exists(/usr/lib/libpam.so)
+OPTIONS_EXCLUDE+= PAM
.endif
-.if ${PORT_OPTIONS:MGPGME}
-LIB_DEPENDS+= libgpgme.so:${PORTSDIR}/security/gpgme
-.else
-CONFIGURE_ARGS+=--without-gpgme
-.endif
+GDBM_DESC= GDBM backend
+GDBM_IMPLIES= GSASL
+GDBM_LIB_DEPENDS= libgdbm.so:${PORTSDIR}/databases/gdbm
+GDBM_CONFIGURE_WITH= gdbm
-.if ${PORT_OPTIONS:MGNUTLS}
-LIB_DEPENDS+= libgnutls.so:${PORTSDIR}/security/gnutls
-.else
-CONFIGURE_ARGS+=--without-gnutls
-.endif
+GNUPG_LIB_DEPENDS= libgpgme.so:${PORTSDIR}/security/gpgme
+GNUPG_CONFIGURE_WITH= gpgme
-.if ${PORT_OPTIONS:MGSASL} || ${PORT_OPTIONS:MGDBM} || ${PORT_OPTIONS:MMYSQL} || ${PORT_OPTIONS:MPGSQL}
-LIB_DEPENDS+= libgsasl.so:${PORTSDIR}/security/gsasl
-PLIST_SUB+= GSASL=""
-.else
-CONFIGURE_ARGS+=--without-gsasl
-PLIST_SUB+= GSASL="@comment "
-.endif
+GNUTLS_LIB_DEPENDS= libgnutls.so:${PORTSDIR}/security/gnutls
+GNUTLS_CONFIGURE_WITH= gnutls
-.if ${PORT_OPTIONS:MGDBM}
-LIB_DEPENDS+= libgdbm.so:${PORTSDIR}/databases/gdbm
-CONFIGURE_ARGS+=--with-gdbm
-.endif
+GSASL_DESC= GSASL support (required for databases)
+GSASL_LIB_DEPENDS= libgsasl.so:${PORTSDIR}/security/gsasl
+GSASL_CONFIGURE_WITH= gsasl
-.if ${PORT_OPTIONS:MMYSQL}
-USE_MYSQL= yes
-CONFIGURE_ARGS+=--with-mysql
-_REQUIRE+= mysql
-.endif
+GUILE_LIB_DEPENDS= libguile.so:${PORTSDIR}/lang/guile
+GUILE_CONFIGURE_WITH= guile
+GUILE_PORTEXAMPLES= anubis.scm anubisrc.guile
-.if ${PORT_OPTIONS:MPGSQL}
-USES+= pgsql
-CONFIGURE_ARGS+=--with-postgres
-_REQUIRE+= postgresql
-.endif
+LIBWRAP_CONFIGURE_WITH= tcp-wrappers
-.if ${PORT_OPTIONS:MPCRE}
-LIB_DEPENDS+= libpcre.so:${PORTSDIR}/devel/pcre
-CONFIGURE_ARGS+=--with-pcre
-.endif
+MYSQL_IMPLIES= GSASL
+MYSQL_USE= MYSQL=yes
+MYSQL_CONFIGURE_WITH= mysql
+MYSQL_VARS= REQUIRE+=mysql
-.if ${PORT_OPTIONS:MPAM} && exists(/usr/lib/libpam.so)
-CONFIGURE_ARGS+=--with-pam
-PORTEXAMPLES+= pam
-.endif
+NLS_USES= gettext iconv
+NLS_CONFIGURE_ENABLE= nls
-.if ${PORT_OPTIONS:MLIBWRAP} && exists(/usr/include/tcpd.h)
-CONFIGURE_ARGS+=--with-tcp-wrappers
-.endif
+PAM_CONFIGURE_WITH= pam
+PAM_PORTEXAMPLES= pam
-.if ${PORT_OPTIONS:MSOCKS}
-CONFIGURE_ARGS+=--with-socks-proxy
-.endif
+PCRE_LIB_DEPENDS= libpcre.so:${PORTSDIR}/devel/pcre
+PCRE_CONFIGURE_WITH= pcre
+
+PGSQL_IMPLIES= GSASL
+PGSQL_USES= pgsql
+PGSQL_CONFIGURE_WITH= postgres
+PGSQL_VARS= REQUIRE+=postgresql
-SUB_LIST+= REQUIRE="${_REQUIRE}"
+SOCKS_DESC= SOCKS proxy support
+SOCKS_CONFIGURE_WITH= socks-proxy
+
+.include <bsd.port.options.mk>
+
+# Default requirement for anubis rc script
+REQUIRE+= mail
+SUB_LIST+= REQUIRE="${REQUIRE}"
post-patch:
@${REINPLACE_CMD} -e "s|/etc|${PREFIX}/etc|g" ${WRKSRC}/src/headers.h
-post-install:
-.if ${PORT_OPTIONS:MEXAMPLES}
+post-install-EXAMPLES-on:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/examples/*rc ${STAGEDIR}${EXAMPLESDIR}
-. if ${PORT_OPTIONS:MGUILE}
+.if ${PORT_OPTIONS:MGUILE}
cd ${WRKSRC}/examples && \
- ${INSTALL_DATA} anubis.scm anubisrc.guile ${STAGEDIR}${EXAMPLESDIR}
-. endif
-. if ${PORT_OPTIONS:MPAM}
+ ${INSTALL_DATA} ${GUILE_PORTEXAMPLES} ${STAGEDIR}${EXAMPLESDIR}
+.endif
+.if ${PORT_OPTIONS:MPAM}
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/pam
${INSTALL_DATA} ${WRKSRC}/examples/pam/anubis* ${STAGEDIR}${EXAMPLESDIR}/pam
-. endif
.endif
.include <bsd.port.mk>