Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 Aug 2012 15:06:48 +0000 (UTC)
From:      Adam Weinberger <adamw@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r303188 - head/mail/bmf
Message-ID:  <201208261506.q7QF6mqd040309@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adamw
Date: Sun Aug 26 15:06:48 2012
New Revision: 303188
URL: http://svn.freebsd.org/changeset/ports/303188

Log:
  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.

Modified:
  head/mail/bmf/Makefile

Modified: head/mail/bmf/Makefile
==============================================================================
--- head/mail/bmf/Makefile	Sun Aug 26 12:03:29 2012	(r303187)
+++ head/mail/bmf/Makefile	Sun Aug 26 15:06:48 2012	(r303188)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208261506.q7QF6mqd040309>