Fri Apr 17 02:22:52 2015 UTC ()
Move Berkeley DB compilation definition from options.mk to Makefile
and remove "bdb" option.

Because Berkeley DB is always mandatory, it does not make sense to
force users to enable "bdb" option to use Berkeley DB.


(hiramatsu)
diff -r1.280 -r1.281 pkgsrc/mail/postfix/Makefile
diff -r1.37 -r1.38 pkgsrc/mail/postfix/options.mk

cvs diff -r1.280 -r1.281 pkgsrc/mail/postfix/Makefile (expand / switch to context diff)
--- pkgsrc/mail/postfix/Makefile 2015/04/06 08:17:31 1.280
+++ pkgsrc/mail/postfix/Makefile 2015/04/17 02:22:52 1.281
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.280 2015/04/06 08:17:31 adam Exp $
+# $NetBSD: Makefile,v 1.281 2015/04/17 02:22:52 hiramatsu Exp $
 
 DISTNAME=	postfix-2.11.4
 PKGREVISION=	1
@@ -36,10 +36,15 @@
 
 # CCARGS is a list of options to pass to the preprocessor/compiler.
 # AUXLIBS is a list of options to pass to the linker.
-#
-CCARGS=		-DUSE_SASL_AUTH
+CCARGS=		#defined
 AUXLIBS=	${LDFLAGS}
 
+# Enable Dovecot SASL
+CCARGS+=	-DUSE_SASL_AUTH
+# Enable Berkeley DB map type. BDB_LIBS is defined in mk/bdb.buildlink3.mk.
+CCARGS+=       -DHAS_DB
+AUXLIBS+=      ${BDB_LIBS}
+
 # Set some default paths to override ${WRKSRC}/src/global/mail_params.h.
 CCARGS+=	-DDEF_DATA_DIR=\"${POSTFIX_DATA_DIR}\"
 CCARGS+=	-DDEF_QUEUE_DIR=\"${POSTFIX_QUEUE_DIR}\"
@@ -175,4 +180,5 @@
 	${INSTALL_MAN} ${WRKSRC}/man/man1/qshape.1 \
 		${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
 
+.include "../../mk/bdb.buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"

cvs diff -r1.37 -r1.38 pkgsrc/mail/postfix/options.mk (expand / switch to context diff)
--- pkgsrc/mail/postfix/options.mk 2015/04/03 01:15:24 1.37
+++ pkgsrc/mail/postfix/options.mk 2015/04/17 02:22:52 1.38
@@ -1,24 +1,12 @@
-# $NetBSD: options.mk,v 1.37 2015/04/03 01:15:24 hiramatsu Exp $
+# $NetBSD: options.mk,v 1.38 2015/04/17 02:22:52 hiramatsu Exp $
 
 # Global and legacy options
 
 PKG_OPTIONS_VAR=	PKG_OPTIONS.postfix
-PKG_SUPPORTED_OPTIONS=	bdb ldap mysql pcre pgsql sasl sqlite tls cdb
+PKG_SUPPORTED_OPTIONS=	ldap mysql pcre pgsql sasl sqlite tls cdb
 PKG_SUGGESTED_OPTIONS=	tls
 
 .include "../../mk/bsd.options.mk"
-
-###
-### Support "hash" (Berkeley DB) map type.
-###
-.if empty(PKG_OPTIONS:Mbdb)
-PKG_OPTIONS+=	bdb		# "hash" map type is mandatory
-.endif
-.if !empty(PKG_OPTIONS:Mbdb)
-.  include "../../mk/bdb.buildlink3.mk"
-CCARGS+=	-DHAS_DB
-AUXLIBS+=	${BDB_LIBS}
-.endif
 
 ###
 ### STARTTLS support