aboutsummaryrefslogtreecommitdiff
path: root/mail/bmf
diff options
context:
space:
mode:
authorAdam Weinberger <adamw@FreeBSD.org>2012-08-26 15:06:48 +0000
committerAdam Weinberger <adamw@FreeBSD.org>2012-08-26 15:06:48 +0000
commit61222db752a76e1c69a20d5eadf5694a52f45fac (patch)
tree0f795e3f752fde787dc86a8a89fdb033cb2debaf /mail/bmf
parent5bb88589f1a7410e0e7fa764192007c3be63454c (diff)
downloadports-61222db752a76e1c69a20d5eadf5694a52f45fac.tar.gz
ports-61222db752a76e1c69a20d5eadf5694a52f45fac.zip
Convert to new OPTIONS framework.
In the process, this also fixes BDB support, and actually enables MYSQL support, which as far as I can tell was never actually enabled in the 9 years this port has been in the tree.
Notes
Notes: svn path=/head/; revision=303188
Diffstat (limited to 'mail/bmf')
-rw-r--r--mail/bmf/Makefile45
1 files changed, 20 insertions, 25 deletions
diff --git a/mail/bmf/Makefile b/mail/bmf/Makefile
index 8b75092ec1b5..2b8e821f2a99 100644
--- a/mail/bmf/Makefile
+++ b/mail/bmf/Makefile
@@ -14,41 +14,36 @@ MASTER_SITES= SF
MAINTAINER= ports@FreeBSD.org
COMMENT= A fast Bayesian Mail Filter compatible with maildrop and procmail
-.if defined(WITH_BDB41)
-LIB_DEPENDS= db41.1:${PORTSDIR}/databases/db41
-LDFLAGS+= -L${LOCALBASE}/lib
-CONFIGURE_ENV+= DB_LIBNAME=-ldb41
-.elif defined(WITH_BDB4)
-LIB_DEPENDS= db4.0:${PORTSDIR}/databases/db4
-LDFLAGS+= -L${LOCALBASE}/lib
-CONFIGURE_ENV+= DB_LIBNAME=-ldb4
-.elif defined(WITH_BDB3)
-LIB_DEPENDS= db3.3:${PORTSDIR}/databases/db3
-LDFLAGS+= -L${LOCALBASE}/lib
-CONFIGURE_ENV+= DB_LIBNAME=-ldb3
+OPTIONS_DEFINE= BDB MYSQL DEBUG
+OPTIONS_DEFAULT= BDB
+BDB_DESC= Berkeley DB support (may specify w/ WITH_BDB_VER)
+MYSQL_DESC= Adds MySQL Support
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MBDB}
+USE_BDB= 40+
+CFLAGS+= -I${BDB_INCLUDE_DIR}
+LDFLAGS+= -L${BDB_LIB_DIR}
+CONFIGURE_ARGS+=--with-libdb=yes
+CONFIGURE_ENV+= DB_LIBNAME=-l${BDB_LIB_NAME}
+.else
+CONFIGURE_ARGS+=--with-libdb=no
+.endif
+.if ${PORT_OPTIONS:MMYSQL}
+USE_MYSQL= client
+CONFIGURE_ARGS+=--with-mysql
.endif
HAS_CONFIGURE= yes
CONFIGURE_ARGS+= --without-package
-.if defined(WITH_DEBUG)
+.if ${PORT_OPTIONS:MDEBUG}
CONFIGURE_ARGS+= --debug=yes
.endif
MAN1= bmf.1 bmfconv.1
-pre-everything::
- @${ECHO} ""
- @${ECHO} "${PORTNAME} has several tunables available:"
- @${ECHO} ""
- @${ECHO} " WITH_BDB4 Builds with BDB4 support"
- @${ECHO} " WITH_BDB41 Builds with BDB4.1 support"
- @${ECHO} " WITH_DEBUG Builds with debugging arguments"
- @${ECHO} " WITH_MYSQL Builds with MySQL support"
- @${ECHO} ""
- @${ECHO} " Note: the default database is BDB3"
- @${ECHO} ""
-
post-install:
@ ${MKDIR} ${PREFIX}/share/bmf
@ ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/bmf