From 61222db752a76e1c69a20d5eadf5694a52f45fac Mon Sep 17 00:00:00 2001 From: Adam Weinberger Date: Sun, 26 Aug 2012 15:06:48 +0000 Subject: 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. --- mail/bmf/Makefile | 45 ++++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 25 deletions(-) (limited to 'mail/bmf/Makefile') 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 + +.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 -- cgit v1.2.3