diff options
author | adamw <adamw@FreeBSD.org> | 2012-08-26 23:06:48 +0800 |
---|---|---|
committer | adamw <adamw@FreeBSD.org> | 2012-08-26 23:06:48 +0800 |
commit | 01af27e56ec363467c3000eb4783a71639835628 (patch) | |
tree | 0f795e3f752fde787dc86a8a89fdb033cb2debaf /mail | |
parent | cc4a7cdb94aabaeb2a5cc64aac0b1fececa31d97 (diff) | |
download | freebsd-ports-gnome-01af27e56ec363467c3000eb4783a71639835628.tar.gz freebsd-ports-gnome-01af27e56ec363467c3000eb4783a71639835628.tar.zst freebsd-ports-gnome-01af27e56ec363467c3000eb4783a71639835628.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.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/bmf/Makefile | 45 |
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 |