Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Jan 2016 17:26:33 +0000 (UTC)
From:      "Jason E. Hale" <jhale@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r405477 - head/mail/anubis
Message-ID:  <201601071726.u07HQXZm076177@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhale
Date: Thu Jan  7 17:26:33 2016
New Revision: 405477
URL: https://svnweb.freebsd.org/changeset/ports/405477

Log:
  - 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

Modified:
  head/mail/anubis/Makefile

Modified: head/mail/anubis/Makefile
==============================================================================
--- head/mail/anubis/Makefile	Thu Jan  7 17:26:21 2016	(r405476)
+++ head/mail/anubis/Makefile	Thu Jan  7 17:26:33 2016	(r405477)
@@ -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>
-
-# Default requirement for anubis rc script
-_REQUIRE=	mail
+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
 
-.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>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601071726.u07HQXZm076177>