ports/169575: [MAINTAINER] mail/anubis: Convert to optionsNG
Jason E. Hale
bsdkaffee at gmail.com
Sun Jul 1 12:40:07 UTC 2012
>Number: 169575
>Category: ports
>Synopsis: [MAINTAINER] mail/anubis: Convert to optionsNG
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Sun Jul 01 12:40:06 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Jason E. Hale
>Release: FreeBSD 9.0-RELEASE i386
>Organization:
none
>Environment:
System: FreeBSD mocha.verizon.net 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Thu Jan 19 11:42:41 EST 2012 Jason at mocha.verizon.net:/usr/obj/usr/src/sys/MOCHA9 i386
>Description:
- Convert mail/anubis to new options framework
- Remove shlib versions from LIB_DEPENDS
- Move LICENSE to correct location
>How-To-Repeat:
- Use attached diff
>Fix:
--- 2012-07-01-anubis.diff begins here ---
diff -ruN anubis.orig/Makefile anubis/Makefile
--- anubis.orig/Makefile 2012-06-03 09:54:48.000000000 -0400
+++ anubis/Makefile 2012-07-01 08:06:32.000000000 -0400
@@ -15,14 +15,23 @@
MAINTAINER= bsdkaffee at gmail.com
COMMENT= Outgoing SMTP mail processor
+LICENSE= GPLv3
+
+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= Enable GnuPG support via GPGME
+GSASL_DESC= Enable GSASL support (required for databases)
+GDBM_DESC= Enable GDBM backend
+SOCKS_DESC= Enable SOCKS proxy support
+
USE_RC_SUBR= anubis
USE_AUTOTOOLS= aclocal autoheader autoconf automake
ACLOCAL_ARGS= -I m4 -I am
AUTOMAKE_ARGS= --force
-LICENSE= GPLv3
-LICENSE_FILE= ${WRKSRC}/COPYING
-
MAN1= anubis.1
INFO= anubis
PORTEXAMPLES= 1anubisrc 2anubisrc
@@ -31,100 +40,81 @@
LDFLAGS+= -L${LOCALBASE}/lib
MAKE_JOBS_UNSAFE= yes
-OPTIONS= NLS "Native language support" on \
- GUILE "Guile support" on \
- GPGME "GPG support via gpgme" on \
- GNUTLS "GNU TLS support" on \
- GSASL "GSASL support (required for databases)" on \
- GDBM "GDBM database support" off \
- MYSQL "MySQL database support" off \
- PGSQL "PostgreSQL database support" off \
- PCRE "Perl-style regular expressions" off \
- PAM "PAM support" off \
- SOCKS "SOCKS proxy support" off \
- TCPWRAP "TCP wrappers" off
-
.include <bsd.port.options.mk>
# Default requirement for anubis rc script
_REQUIRE= mail
-.if defined(WITHOUT_NLS)
-CONFIGURE_ARGS+=--disable-nls
-PLIST_SUB+= NLS="@comment "
-.else
+.if ${PORT_OPTIONS:MNLS}
USE_ICONV= yes
USE_GETTEXT= yes
PLIST_SUB+= NLS=""
+.else
+CONFIGURE_ARGS+=--disable-nls
+PLIST_SUB+= NLS="@comment "
.endif
-.if defined(WITHOUT_GUILE)
-CONFIGURE_ARGS+=--without-guile
-PLIST_SUB+= GUILE="@comment "
-.else
+.if ${PORT_OPTIONS:MGUILE}
LIB_DEPENDS+= guile:${PORTSDIR}/lang/guile
PORTEXAMPLES+= anubis.scm anubisrc.guile
PLIST_SUB+= GUILE=""
+.else
+CONFIGURE_ARGS+=--without-guile
+PLIST_SUB+= GUILE="@comment "
.endif
-.if defined(WITHOUT_GPGME)
-CONFIGURE_ARGS+=--without-gpgme
+.if ${PORT_OPTIONS:MGPGME}
+LIB_DEPENDS+= gpgme:${PORTSDIR}/security/gpgme
.else
-LIB_DEPENDS+= gpgme.19:${PORTSDIR}/security/gpgme
+CONFIGURE_ARGS+=--without-gpgme
.endif
-.if defined(WITHOUT_GNUTLS)
+.if ${PORT_OPTIONS:MGNUTLS}
+LIB_DEPENDS+= gnutls:${PORTSDIR}/security/gnutls
+.else
CONFIGURE_ARGS+=--without-gnutls
+.endif
+
+.if ${PORT_OPTIONS:MGSASL} || ${PORT_OPTIONS:MGDBM} || ${PORT_OPTIONS:MMYSQL} || ${PORT_OPTIONS:MPGSQL}
+LIB_DEPENDS+= gsasl:${PORTSDIR}/security/gsasl
+PLIST_SUB+= GSASL=""
.else
-LIB_DEPENDS+= gnutls.47:${PORTSDIR}/security/gnutls
+CONFIGURE_ARGS+=--without-gsasl
+PLIST_SUB+= GSASL="@comment "
.endif
-.if defined(WITH_GDBM)
-.undef WITHOUT_GSASL
-WITH_GSASL= yes
+.if ${PORT_OPTIONS:MGDBM}
LIB_DEPENDS+= gdbm:${PORTSDIR}/databases/gdbm
CONFIGURE_ARGS+=--with-gdbm
.endif
-.if defined(WITH_MYSQL)
-.undef WITHOUT_GSASL
-WITH_GSASL= yes
+.if ${PORT_OPTIONS:MMYSQL}
USE_MYSQL= yes
CONFIGURE_ARGS+=--with-mysql
_REQUIRE+= mysql
.endif
-.if defined(WITH_PGSQL)
-.undef WITHOUT_GSASL
-WITH_GSASL= yes
+.if ${PORT_OPTIONS:MPGSQL}
USE_PGSQL= yes
CONFIGURE_ARGS+=--with-postgres
_REQUIRE+= postgresql
.endif
-.if defined(WITHOUT_GSASL)
-CONFIGURE_ARGS+=--without-gsasl
-PLIST_SUB+= GSASL="@comment "
-.else
-LIB_DEPENDS+= gsasl.16:${PORTSDIR}/security/gsasl
-PLIST_SUB+= GSASL=""
-.endif
-
-.if defined(WITH_PCRE)
+.if ${PORT_OPTIONS:MPCRE}
LIB_DEPENDS+= pcre:${PORTSDIR}/devel/pcre
CONFIGURE_ARGS+=--with-pcre
.endif
-.if defined(WITH_PAM) && exists(/usr/lib/libpam.so)
+.if ${PORT_OPTIONS:MPAM} && exists(/usr/lib/libpam.so)
CONFIGURE_ARGS+=--with-pam
PORTEXAMPLES+= pam
.endif
-.if defined(WITH_TCPWRAP) && exists(/usr/include/tcpd.h)
+.if ${PORT_OPTIONS:MLIBWRAP} && exists(/usr/include/tcpd.h)
CONFIGURE_ARGS+=--with-tcp-wrappers
.endif
-.if defined(WITH_SOCKS)
+.if ${PORT_OPTIONS:MSOCKS}
CONFIGURE_ARGS+=--with-socks-proxy
.endif
@@ -133,18 +123,18 @@
post-patch:
@${REINPLACE_CMD} -e "s|/etc|${PREFIX}/etc|g" ${WRKSRC}/src/headers.h
-.if !defined(NOPORTEXAMPLES)
post-install:
+.if ${PORT_OPTIONS:MEXAMPLES}
@${MKDIR} ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKSRC}/examples/*rc ${EXAMPLESDIR}
-.if defined(WITH_GUILE)
+. if ${PORT_OPTIONS:MGUILE}
cd ${WRKSRC}/examples && \
${INSTALL_DATA} anubis.scm anubisrc.guile ${EXAMPLESDIR}
-.endif
-.if defined(WITH_PAM)
+. endif
+. if ${PORT_OPTIONS:MPAM}
@${MKDIR} ${EXAMPLESDIR}/pam
${INSTALL_DATA} ${WRKSRC}/examples/pam/anubis* ${EXAMPLESDIR}/pam
-.endif
+. endif
.endif
.include <bsd.port.mk>
--- 2012-07-01-anubis.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list