1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-23 04:23:08 +00:00

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.
This commit is contained in:
Adam Weinberger 2012-08-26 15:06:48 +00:00
parent 5bb88589f1
commit 61222db752
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=303188

View File

@ -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