Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Apr 2016 16:17:19 +0000 (UTC)
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r414018 - in head: Mk Mk/Uses devel/ice lang/php55 lang/php56 lang/php70 mail/dk-milter net-p2p/digitalcoin net-p2p/dogecoin net-p2p/namecoin net-p2p/twister
Message-ID:  <201604251617.u3PGHJI7014851@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mat
Date: Mon Apr 25 16:17:19 2016
New Revision: 414018
URL: https://svnweb.freebsd.org/changeset/ports/414018

Log:
  Move USE_BDB support from bsd.databases.mk to its own file.
  
  Also:
  - Deorbit WANT_BDB_VER, one can use USES=bdb:<ver> instead.
  - USE_BDB can't happen after bsd.port.pre.mk because it is a USES.
  
  PR:		208971
  Submitted by:	mat
  Exp-run by:	antoine
  With hat:	portmgr
  Sponsored by:	Absolight
  Differential Revision:	https://reviews.freebsd.org/D5951

Added:
  head/Mk/Uses/bdb.mk
     - copied, changed from r414017, head/Mk/bsd.database.mk
Modified:
  head/Mk/bsd.database.mk   (contents, props changed)
  head/Mk/bsd.port.mk   (contents, props changed)
  head/Mk/bsd.sanity.mk   (contents, props changed)
  head/devel/ice/Makefile   (contents, props changed)
  head/lang/php55/Makefile.ext   (contents, props changed)
  head/lang/php56/Makefile.ext   (contents, props changed)
  head/lang/php70/Makefile.ext   (contents, props changed)
  head/mail/dk-milter/Makefile   (contents, props changed)
  head/net-p2p/digitalcoin/Makefile   (contents, props changed)
  head/net-p2p/dogecoin/Makefile   (contents, props changed)
  head/net-p2p/namecoin/Makefile   (contents, props changed)
  head/net-p2p/twister/Makefile   (contents, props changed)

Copied and modified: head/Mk/Uses/bdb.mk (from r414017, head/Mk/bsd.database.mk)
==============================================================================
--- head/Mk/bsd.database.mk	Mon Apr 25 16:15:48 2016	(r414017, copy source)
+++ head/Mk/Uses/bdb.mk	Mon Apr 25 16:17:19 2016	(r414018)
@@ -1,38 +1,9 @@
 # $FreeBSD$
 #
-
-.if defined(_POSTMKINCLUDED) && !defined(Database_Post_Include)
-
-Database_Post_Include=		bsd.database.mk
-Database_Include_MAINTAINER=	ports@FreeBSD.org
-
-# This file contains some routines to interact with different databases, such
-# as MySQL and Berkley DB.  To include this file, define macro
-# USE_[DATABASE], for example USE_MYSQL.  Defining macro like
-# USE_[DATABASE]_VER or WANT_[DATABASE]_VER will include this file as well.
+# Provide support for Berkeley DB
+# Feature:	bdb
+# Usage:	USES=	bdb[:version]
 #
-##
-# USE_MYSQL		- Add MySQL (client/server/embedded) dependency (default:
-#			  client).
-#			  If no version is given (by the maintainer via the port or
-#			  by the user via defined variable), try to find the
-#			  currently installed version.  Fall back to default if
-#			  necessary (MySQL-5.6 = 56).
-# DEFAULT_MYSQL_VER
-#			- MySQL default version.  Can be overridden within a port.
-#			  Default: 56.
-# WANT_MYSQL_VER
-#			- Maintainer can set an arbitrary version of MySQL to always
-#			  build this port with (overrides WITH_MYSQL_VER).
-# IGNORE_WITH_MYSQL
-#			- This variable can be defined if the ports does not support
-#			  one or more versions of MySQL.
-# WITH_MYSQL_VER
-#			- User defined variable to set MySQL version.
-# MYSQL_VER
-#			- Detected MySQL version.
-##
-# USE_BDB	- Add Berkeley DB library dependency.
 #			  If no version is given (by the maintainer via the port or
 #			  by the user via defined variable), try to find the
 #			  currently installed version.  Fall back to default if
@@ -42,9 +13,6 @@ Database_Include_MAINTAINER=	ports@FreeB
 # INVALID_BDB_VER
 #			- This variable can be defined when the port does not
 #			  support one or more versions of Berkeley DB.
-# WANT_BDB_VER
-#			- Maintainer can set a version of Berkeley DB to always
-#			  build this port with (overrides WITH_BDB_VER).
 # WITH_BDB_VER
 #			- User defined global variable to set Berkeley DB version.
 # <BDB_UNIQUENAME>_WITH_BDB_VER
@@ -75,104 +43,22 @@ Database_Include_MAINTAINER=	ports@FreeB
 #			  the Berkeley DB library directory.
 # BDB_VER
 #			- Detected Berkeley DB version.
+#
+# MAINTAINER:	ports@FreeBSD.org
 
-.include "${PORTSDIR}/Mk/bsd.default-versions.mk"
-
-.if defined(DEFAULT_MYSQL_VER)
-WARNING+=	"DEFAULT_MYSQL_VER is defined, consider using DEFAULT_VERSIONS=mysql=${DEFAULT_MYSQL_VER} instead"
-.endif
-
-.if defined(USE_MYSQL)
-DEFAULT_MYSQL_VER?=	${MYSQL_DEFAULT:S/.//}
-# MySQL client version currently supported.
-# When adding a version, please keep the comment in
-# Mk/bsd.default-versions.mk in sync.
-MYSQL51_LIBVER=		16
-MYSQL55_LIBVER=		18
-MYSQL55m_LIBVER=	18
-MYSQL55p_LIBVER=	18
-MYSQL56_LIBVER=		18
-MYSQL56p_LIBVER=	18
-MYSQL57_LIBVER=		20
-MYSQL100m_LIBVER=	18
-MYSQL101m_LIBVER=	18
-
-# Setting/finding MySQL version we want.
-.if exists(${LOCALBASE}/bin/mysql)
-_MYSQL!=	${LOCALBASE}/bin/mysql --version | ${SED} -e 's/.*Distrib \([0-9]\{1,2\}\)\.\([0-9]*\).*/\1\2/'
-_PERCONA!=	${LOCALBASE}/bin/mysql --version | ${GREP} Percona | wc -l
-_MARIADB!=	${LOCALBASE}/bin/mysql --version | ${GREP} MariaDB | wc -l
-
-.if ${_PERCONA} == 1
-_MYSQL_VER=	${_MYSQL}p
-.elif ${_MARIADB} == 1
-_MYSQL_VER=	${_MYSQL}m
-.else
-_MYSQL_VER=	${_MYSQL}
-.endif
-.endif
-
-.if defined(WANT_MYSQL_VER)
-.if defined(WITH_MYSQL_VER) && ${WITH_MYSQL_VER} != ${WANT_MYSQL_VER}
-IGNORE=		cannot install: the port wants mysql${WANT_MYSQL_VER}-client and you try to install mysql${WITH_MYSQL_VER}-client
-.endif
-MYSQL_VER=	${WANT_MYSQL_VER}
-.elif defined(WITH_MYSQL_VER)
-MYSQL_VER=	${WITH_MYSQL_VER}
-.else
-.if defined(_MYSQL_VER)
-MYSQL_VER=	${_MYSQL_VER}
-.else
-MYSQL_VER=	${DEFAULT_MYSQL_VER}
-.endif
-.endif # WANT_MYSQL_VER
-
-.if defined(_MYSQL_VER)
-.if ${_MYSQL_VER} != ${MYSQL_VER}
-IGNORE=		cannot install: MySQL versions mismatch: mysql${_MYSQL_VER}-client is installed and wanted version is mysql${MYSQL_VER}-client
-.endif
-.endif
-
-.if (${MYSQL_VER:C/[0-9]*//} == "m")
-_MYSQL_FLAVOUR=	mariadb
-.elif (${MYSQL_VER:C/[0-9]*//} == "p")
-_MYSQL_FLAVOUR=	percona
-.else
-_MYSQL_FLAVOUR=	mysql
-.endif
-
-_MYSQL_CLIENT=	databases/${_MYSQL_FLAVOUR}${MYSQL_VER:C/[mp]//}-client
-_MYSQL_SERVER=	databases/${_MYSQL_FLAVOUR}${MYSQL_VER:C/[mp]//}-server
+.if !defined(_INCLUDE_USES_BDB_MK)
+_INCLUDE_USES_BDB_MK=	yes
 
-# And now we are checking if we can use it
-.if defined(MYSQL${MYSQL_VER}_LIBVER)
-.if defined(IGNORE_WITH_MYSQL)
-.	for VER in ${IGNORE_WITH_MYSQL}
-.		if (${MYSQL_VER} == "${VER}")
-IGNORE=		cannot install: does not work with MySQL version ${MYSQL_VER} (MySQL ${IGNORE_WITH_MYSQL} not supported)
-.		endif
-.	endfor
-.endif # IGNORE_WITH_MYSQL
-.if (${USE_MYSQL} == "server" || ${USE_MYSQL} == "embedded")
-RUN_DEPENDS+=	${LOCALBASE}/libexec/mysqld:${_MYSQL_SERVER}
-.if (${USE_MYSQL} == "embedded")
-BUILD_DEPENDS+=	${LOCALBASE}/lib/mysql/libmysqld.a:${_MYSQL_SERVER}
-.endif
-.else
-LIB_DEPENDS+=	libmysqlclient.so.${MYSQL${MYSQL_VER}_LIBVER}:${_MYSQL_CLIENT}
+.if !empty(bdb_ARGS)
+_bdb_ARGS:=	${bdb_ARGS}
 .endif
-.else
-IGNORE=		cannot install: unknown MySQL version: ${MYSQL_VER}
-.endif # Check for correct libs
-.endif # USE_MYSQL
+_bdb_ARGS?=	yes
 
-.if defined(USE_BDB)
-# TODO: avoid malformed conditional with invalid USE_BDB/WITH_BDB_VER
+# TODO: avoid malformed conditional with invalid _bdb_ARGS/WITH_BDB_VER
 # check if + works properly from test builds 01h12m23s
 
 BDB_UNIQUENAME?=	${PKGNAMEPREFIX}${PORTNAME}
 
-_USE_BDB_save:=${USE_BDB}
 _WITH_BDB_VER_save:=${WITH_BDB_VER}
 
 _DB_PORTS=		48 5 6
@@ -197,29 +83,25 @@ db6_FIND=	${LOCALBASE}/include/db6/db.h
 WITH_BDB_VER=	${${BDB_UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER}
 .endif
 
-# Override USE_BDB with global WITH_BDB_VER
+# Override _bdb_ARGS with global WITH_BDB_VER if the maintainer did not
+# ask for a more specific version.
 .if defined(WITH_BDB_VER)
-. if ${WITH_BDB_VER} != 1
-USE_BDB=	${WITH_BDB_VER}
+. if ${WITH_BDB_VER} != 1 && ${_bdb_ARGS} == yes
+_bdb_ARGS=	${WITH_BDB_VER}
 . endif
 .endif
 
-# Override USE_BDB with maintainer's WANT_BDB_VER
-.if defined(WANT_BDB_VER)
-USE_BDB=	${WANT_BDB_VER}
-.endif
-
 # Compatiblity hack:
 # upgrade older plussed versions to 48+
 _BDB_OLDPLUSVERS=4+ 40+ 41+ 42+ 43+ 44+ 45+ 46+ 47+
-.for i in ${USE_BDB}
+.for i in ${_bdb_ARGS}
 . if ${_BDB_OLDPLUSVERS:M${i}}
-USE_BDB:=	48+
+_bdb_ARGS:=	48+
 . endif
 .endfor
 
-.if ${USE_BDB} == yes
-USE_BDB:=	48+
+.if ${_bdb_ARGS} == yes
+_bdb_ARGS:=	48+
 .endif
 
 # 1. detect installed versions
@@ -231,17 +113,17 @@ _INST_BDB_VER+=${bdb}
 .endfor
 
 # 2. parse supported versions:
-# 2a. build list from USE_BDB
+# 2a. build list from _bdb_ARGS
 _SUPP_BDB_VER=
-_USE_BDB:=${USE_BDB:C,\+$,,:C/(.)(.)$/\1.\2/}
-.if !empty(USE_BDB:M*+)
+__bdb_ARGS:=${_bdb_ARGS:C,\+$,,:C/(.)(.)$/\1.\2/}
+.if !empty(_bdb_ARGS:M*+)
 . for bdb in ${_DB_PORTS:C/(.)(.)$/\1.\2/}
-.  if ${_USE_BDB} <= ${bdb}
+.  if ${__bdb_ARGS} <= ${bdb}
 _SUPP_BDB_VER+=${bdb:C/\.//}
 .  endif
 . endfor
 .else
-_SUPP_BDB_VER=${USE_BDB}
+_SUPP_BDB_VER=${_bdb_ARGS}
 .endif
 # 2b. expand INVALID_BDB_VER if given with "+":
 .if !empty(INVALID_BDB_VER:M*+)
@@ -292,7 +174,7 @@ _BDB_VER:=${i}
 
 # 5. catch errors or set variables
 .if empty(_BDB_VER)
-IGNORE=		cannot install: no eligible BerkeleyDB version. Requested: ${USE_BDB}, incompatible: ${_INV_BDB_VER}. Try: make debug-bdb
+IGNORE=		cannot install: no eligible BerkeleyDB version. Requested: ${_bdb_ARGS}, incompatible: ${_INV_BDB_VER}. Try: make debug-bdb
 .else
 . if defined(BDB_BUILD_DEPENDS)
 BUILD_DEPENDS+=	${db${_BDB_VER}_FIND}:${db${_BDB_VER}_DEPENDS:C/^libdb.*://}
@@ -323,16 +205,15 @@ debug-bdb:
 	@${ECHO_CMD} "--INPUTS----------------------------------------------------"
 	@${ECHO_CMD} "${BDB_UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER: ${${BDB_UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER}"
 	@${ECHO_CMD} "WITH_BDB_VER: ${_WITH_BDB_VER_save}"
-	@${ECHO_CMD} "WANT_BDB_VER: ${WANT_BDB_VER}"
 	@${ECHO_CMD} "BDB_BUILD_DEPENDS: ${BDB_BUILD_DEPENDS}"
-	@${ECHO_CMD} "USE_BDB (original): ${_USE_BDB_save}"
+	@${ECHO_CMD} "bdb_ARGS (original): ${bdb_ARGS}"
 	@${ECHO_CMD} "WITH_BDB_HIGHEST (original): ${WITH_BDB_HIGHEST}"
 	@${ECHO_CMD} "--PROCESSING------------------------------------------------"
 	@${ECHO_CMD} "supported versions: ${_SUPP_BDB_VER}"
 	@${ECHO_CMD} "invalid versions: ${_INV_BDB_VER}"
 	@${ECHO_CMD} "installed versions: ${_INST_BDB_VER}"
 	@${ECHO_CMD} "eligible versions: ${_ELIGIBLE_BDB_VER}"
-	@${ECHO_CMD} "USE_BDB (effective): ${USE_BDB}"
+	@${ECHO_CMD} "bdb_ARGS (effective): ${_bdb_ARGS}"
 	@${ECHO_CMD} "WITH_BDB_HIGHEST (override): ${_WITH_BDB_HIGHEST}"
 	@${ECHO_CMD} "--OUTPUTS---------------------------------------------------"
 	@${ECHO_CMD} "IGNORE=${IGNORE}"
@@ -364,6 +245,5 @@ IGNORE=	${_IGNORE_MSG}
 . endif
 .endif
 
-.endif # USE_BDB
 
-.endif # defined(_POSTMKINCLUDED) && !defined(Database_Post_Include)
+.endif

Modified: head/Mk/bsd.database.mk
==============================================================================
--- head/Mk/bsd.database.mk	Mon Apr 25 16:15:48 2016	(r414017)
+++ head/Mk/bsd.database.mk	Mon Apr 25 16:17:19 2016	(r414018)
@@ -7,7 +7,7 @@ Database_Post_Include=		bsd.database.mk
 Database_Include_MAINTAINER=	ports@FreeBSD.org
 
 # This file contains some routines to interact with different databases, such
-# as MySQL and Berkley DB.  To include this file, define macro
+# as MySQL.  To include this file, define macro
 # USE_[DATABASE], for example USE_MYSQL.  Defining macro like
 # USE_[DATABASE]_VER or WANT_[DATABASE]_VER will include this file as well.
 #
@@ -31,50 +31,6 @@ Database_Include_MAINTAINER=	ports@FreeB
 #			- User defined variable to set MySQL version.
 # MYSQL_VER
 #			- Detected MySQL version.
-##
-# USE_BDB	- Add Berkeley DB library dependency.
-#			  If no version is given (by the maintainer via the port or
-#			  by the user via defined variable), try to find the
-#			  currently installed version.  Fall back to default if
-#			  necessary (db5 if compatible).
-#			  This adds a "debug-bdb" make target which will dump the
-#			  related data.
-# INVALID_BDB_VER
-#			- This variable can be defined when the port does not
-#			  support one or more versions of Berkeley DB.
-# WANT_BDB_VER
-#			- Maintainer can set a version of Berkeley DB to always
-#			  build this port with (overrides WITH_BDB_VER).
-# WITH_BDB_VER
-#			- User defined global variable to set Berkeley DB version.
-# <BDB_UNIQUENAME>_WITH_BDB_VER
-#			- User defined port specific variable to set Berkeley DB
-#			  version.
-# WITH_BDB_HIGHEST
-#			- Use the highest installed version of Berkeley DB.
-# WITH_BDB6_PERMITTED
-# 			- If defined, BerkeleyDB 6 is added to the
-# 			  default version set, making it eligible even
-# 			  if not already installed. This is due to its
-# 			  stricter Affero GNU Public License.
-#
-# These variables will then be filled in by this .mk file:
-#
-# BDB_LIB_NAME
-#			- This variable is automatically set to the name of the
-#			  Berkeley DB library (default: db41).
-# BDB_LIB_CXX_NAME
-#			- This variable is automatically set to the name of the
-#			  Berkeley DB C++ library (default: db41_cxx).
-# BDB_INCLUDE_DIR
-#			- This variable is automatically set to the location of
-#			  the Berkeley DB include directory (default:
-#			  ${LOCALBASE}/include/db41).
-# BDB_LIB_DIR
-#			- This variable is automatically set to the location of
-#			  the Berkeley DB library directory.
-# BDB_VER
-#			- Detected Berkeley DB version.
 
 .include "${PORTSDIR}/Mk/bsd.default-versions.mk"
 
@@ -166,204 +122,4 @@ IGNORE=		cannot install: unknown MySQL v
 .endif # Check for correct libs
 .endif # USE_MYSQL
 
-.if defined(USE_BDB)
-# TODO: avoid malformed conditional with invalid USE_BDB/WITH_BDB_VER
-# check if + works properly from test builds 01h12m23s
-
-BDB_UNIQUENAME?=	${PKGNAMEPREFIX}${PORTNAME}
-
-_USE_BDB_save:=${USE_BDB}
-_WITH_BDB_VER_save:=${WITH_BDB_VER}
-
-_DB_PORTS=		48 5 6
-_DB_DEFAULTS=	48 5	# does not include 6 due to different licensing
-#	but user can re-add it through WITH_BDB6_PERMITTED
-. if defined(WITH_BDB6_PERMITTED)
-_DB_DEFAULTS+=	6
-. endif
-
-# Dependency lines for different db versions
-db48_DEPENDS=	libdb-4.8.so:databases/db48
-db5_DEPENDS=	libdb-5.3.so:databases/db5
-db6_DEPENDS=	libdb-6.1.so:databases/db6
-# Detect db versions by finding some files
-db48_FIND=	${LOCALBASE}/include/db48/db.h
-db5_FIND=	${LOCALBASE}/include/db5/db.h
-db6_FIND=	${LOCALBASE}/include/db6/db.h
-
-# Override the global WITH_BDB_VER with the
-# port specific <BDB_UNIQUENAME>_WITH_BDB_VER
-.if defined(${BDB_UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER)
-WITH_BDB_VER=	${${BDB_UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER}
-.endif
-
-# Override USE_BDB with global WITH_BDB_VER
-.if defined(WITH_BDB_VER)
-. if ${WITH_BDB_VER} != 1
-USE_BDB=	${WITH_BDB_VER}
-. endif
-.endif
-
-# Override USE_BDB with maintainer's WANT_BDB_VER
-.if defined(WANT_BDB_VER)
-USE_BDB=	${WANT_BDB_VER}
-.endif
-
-# Compatiblity hack:
-# upgrade older plussed versions to 48+
-_BDB_OLDPLUSVERS=4+ 40+ 41+ 42+ 43+ 44+ 45+ 46+ 47+
-.for i in ${USE_BDB}
-. if ${_BDB_OLDPLUSVERS:M${i}}
-USE_BDB:=	48+
-. endif
-.endfor
-
-.if ${USE_BDB} == yes
-USE_BDB:=	48+
-.endif
-
-# 1. detect installed versions
-_INST_BDB_VER=
-.for bdb in ${_DB_PORTS}
-. if exists(${db${bdb}_FIND})
-_INST_BDB_VER+=${bdb}
-. endif
-.endfor
-
-# 2. parse supported versions:
-# 2a. build list from USE_BDB
-_SUPP_BDB_VER=
-_USE_BDB:=${USE_BDB:C,\+$,,:C/(.)(.)$/\1.\2/}
-.if !empty(USE_BDB:M*+)
-. for bdb in ${_DB_PORTS:C/(.)(.)$/\1.\2/}
-.  if ${_USE_BDB} <= ${bdb}
-_SUPP_BDB_VER+=${bdb:C/\.//}
-.  endif
-. endfor
-.else
-_SUPP_BDB_VER=${USE_BDB}
-.endif
-# 2b. expand INVALID_BDB_VER if given with "+":
-.if !empty(INVALID_BDB_VER:M*+)
-_INV_BDB:=${INVALID_BDB_VER:C,\+$,,:C/(.)(.)$/\1.\2/}
-_INV_BDB_VER:=
-. for bdb in ${_DB_PORTS:C/(.)(.)$/\1.\2/}
-.  if ${_INV_BDB} <= ${bdb}
-_INV_BDB_VER+=${bdb:C/\.//}
-.  endif
-. endfor
-.else
-_INV_BDB_VER:=${INVALID_BDB_VER}
-.endif
-# 2c. strip versions from INVALID_BDB_VER out of _SUPP_BDB_VER
-.for unsupp in ${_INV_BDB_VER}
-_SUPP_BDB_VER:=${_SUPP_BDB_VER:N${unsupp}}
-.endfor
-
-# 3a. calculate intersection in _INST_BDB_VER to see if there
-# is a usable installed version
-.for i in ${_INST_BDB_VER}
-. if empty(_SUPP_BDB_VER:M${i})
-_INST_BDB_VER:=	${_INST_BDB_VER:N${i}}
-. endif
-.endfor
-_ELIGIBLE_BDB_VER:=${_INST_BDB_VER}
-
-# 3b. if there is no usable version installed, check defaults
-.if empty(_INST_BDB_VER)
-_DFLT_BDB_VER:=${_DB_DEFAULTS}
-# make sure we use a reasonable version for package builds
-_WITH_BDB_HIGHEST=yes
-. for i in ${_DFLT_BDB_VER}
-.  if empty(_SUPP_BDB_VER:M${i})
-_DFLT_BDB_VER:=	${_DFLT_BDB_VER:N${i}}
-.  endif
-. endfor
-_ELIGIBLE_BDB_VER:=${_DFLT_BDB_VER}
-.endif
-
-# 4. elect a version
-_BDB_VER=
-.for i in ${_ELIGIBLE_BDB_VER}
-. if !empty(WITH_BDB_HIGHEST) || !empty(_WITH_BDB_HIGHEST) || empty(${_BDB_VER})
-_BDB_VER:=${i}
-. endif
-.endfor
-
-# 5. catch errors or set variables
-.if empty(_BDB_VER)
-IGNORE=		cannot install: no eligible BerkeleyDB version. Requested: ${USE_BDB}, incompatible: ${_INV_BDB_VER}. Try: make debug-bdb
-.else
-. if defined(BDB_BUILD_DEPENDS)
-BUILD_DEPENDS+=	${db${_BDB_VER}_FIND}:${db${_BDB_VER}_DEPENDS:C/^libdb.*://}
-. else
-LIB_DEPENDS+=	${db${_BDB_VER}_DEPENDS}
-. endif
-. if ${_BDB_VER} == 48
-BDB_LIB_NAME=		db-4.8
-BDB_LIB_CXX_NAME=	db_cxx-4.8
-BDB_LIB_DIR=		${LOCALBASE}/lib/db48
-. elif ${_BDB_VER} == 5
-BDB_LIB_NAME=		db-5.3
-BDB_LIB_CXX_NAME=	db_cxx-5.3
-BDB_LIB_DIR=		${LOCALBASE}/lib/db5
-. elif ${_BDB_VER} == 6
-BDB_LIB_NAME=		db-6.1
-BDB_LIB_CXX_NAME=	db_cxx-6.1
-BDB_LIB_DIR=		${LOCALBASE}/lib/db6
-. endif
-BDB_LIB_NAME?=		db${_BDB_VER}
-BDB_LIB_CXX_NAME?=	db${_BDB_VER}_cxx
-BDB_INCLUDE_DIR?=	${LOCALBASE}/include/db${_BDB_VER}
-BDB_LIB_DIR?=		${LOCALBASE}/lib
-.endif
-BDB_VER=	${_BDB_VER}
-
-debug-bdb:
-	@${ECHO_CMD} "--INPUTS----------------------------------------------------"
-	@${ECHO_CMD} "${BDB_UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER: ${${BDB_UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER}"
-	@${ECHO_CMD} "WITH_BDB_VER: ${_WITH_BDB_VER_save}"
-	@${ECHO_CMD} "WANT_BDB_VER: ${WANT_BDB_VER}"
-	@${ECHO_CMD} "BDB_BUILD_DEPENDS: ${BDB_BUILD_DEPENDS}"
-	@${ECHO_CMD} "USE_BDB (original): ${_USE_BDB_save}"
-	@${ECHO_CMD} "WITH_BDB_HIGHEST (original): ${WITH_BDB_HIGHEST}"
-	@${ECHO_CMD} "--PROCESSING------------------------------------------------"
-	@${ECHO_CMD} "supported versions: ${_SUPP_BDB_VER}"
-	@${ECHO_CMD} "invalid versions: ${_INV_BDB_VER}"
-	@${ECHO_CMD} "installed versions: ${_INST_BDB_VER}"
-	@${ECHO_CMD} "eligible versions: ${_ELIGIBLE_BDB_VER}"
-	@${ECHO_CMD} "USE_BDB (effective): ${USE_BDB}"
-	@${ECHO_CMD} "WITH_BDB_HIGHEST (override): ${_WITH_BDB_HIGHEST}"
-	@${ECHO_CMD} "--OUTPUTS---------------------------------------------------"
-	@${ECHO_CMD} "IGNORE=${IGNORE}"
-	@${ECHO_CMD} "BDB_VER=${BDB_VER}"
-	@${ECHO_CMD} "BDB_INCLUDE_DIR=${BDB_INCLUDE_DIR}"
-	@${ECHO_CMD} "BDB_LIB_NAME=${BDB_LIB_NAME}"
-	@${ECHO_CMD} "BDB_LIB_CXX_NAME=${BDB_LIB_CXX_NAME}"
-	@${ECHO_CMD} "BDB_LIB_DIR=${BDB_LIB_DIR}"
-	@${ECHO_CMD} "BUILD_DEPENDS=${BUILD_DEPENDS:M*/databases/db*}"
-	@${ECHO_CMD} "LIB_DEPENDS=${LIB_DEPENDS:M*/databases/db*}"
-	@${ECHO_CMD} "------------------------------------------------------------"
-
-# Obsolete variables - ports can define these to want users about
-# variables that may be in /etc/make.conf but that are no longer
-# effective:
-.if defined(OBSOLETE_BDB_VAR)
-. for var in ${OBSOLETE_BDB_VAR}
-.  if defined(${var})
-BAD_VAR+=	${var},
-.  endif
-. endfor
-. if defined(BAD_VAR)
-_IGNORE_MSG=	Obsolete variable(s) ${BAD_VAR} use WITH_BDB_VER or ${BDB_UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER to select Berkeley DB version
-.  if defined(IGNORE)
-IGNORE+= ${_IGNORE_MSG}
-.  else
-IGNORE=	${_IGNORE_MSG}
-.  endif
-. endif
-.endif
-
-.endif # USE_BDB
-
 .endif # defined(_POSTMKINCLUDED) && !defined(Database_Post_Include)

Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk	Mon Apr 25 16:15:48 2016	(r414017)
+++ head/Mk/bsd.port.mk	Mon Apr 25 16:17:19 2016	(r414018)
@@ -1403,6 +1403,10 @@ USES+=	gnome
 USES+=	mate
 .endif
 
+.if defined(USE_BDB)
+USES+=bdb:${USE_BDB}
+.endif
+
 .if defined(WANT_WX) || defined(USE_WX) || defined(USE_WX_NOT)
 .include "${PORTSDIR}/Mk/bsd.wx.mk"
 .endif
@@ -1863,8 +1867,7 @@ _FORCE_POST_PATTERNS=	rmdir kldxref mkfo
 .include "${PORTSDIR}/Mk/bsd.xorg.mk"
 .endif
 
-.if defined(USE_MYSQL) || defined(WANT_MYSQL_VER) || \
-	defined(USE_BDB)
+.if defined(USE_MYSQL) || defined(WANT_MYSQL_VER)
 .include "${PORTSDIR}/Mk/bsd.database.mk"
 .endif
 

Modified: head/Mk/bsd.sanity.mk
==============================================================================
--- head/Mk/bsd.sanity.mk	Mon Apr 25 16:15:48 2016	(r414017)
+++ head/Mk/bsd.sanity.mk	Mon Apr 25 16:17:19 2016	(r414018)
@@ -169,7 +169,7 @@ SANITY_UNSUPPORTED=	USE_OPENAL USE_FAM U
 		PYDISTUTILS_AUTOPLIST PYTHON_PY3K_PLIST_HACK PYDISTUTILS_NOEGGINFO \
 		USE_PYTHON_PREFIX USE_BZIP2 USE_XZ USE_PGSQL NEED_ROOT \
 		UNIQUENAME LATEST_LINK USE_SQLITE USE_FIREBIRD
-SANITY_DEPRECATED=	PYTHON_PKGNAMESUFFIX USE_AUTOTOOLS PLIST_DIRSTRY
+SANITY_DEPRECATED=	PYTHON_PKGNAMESUFFIX USE_AUTOTOOLS PLIST_DIRSTRY USE_BDB
 SANITY_NOTNEEDED=	WX_UNICODE
 
 USE_AUTOTOOLS_ALT=	USES=autoreconf and GNU_CONFIGURE=yes
@@ -210,6 +210,7 @@ WX_UNICODE_REASON=	Now no-op as only uni
 PLIST_DIRSTRY_ALT=	PLIST_DIRS
 USE_SQLITE_ALT=		USES=sqlite
 USE_FIREBIRD_ALT=	USES=firebird
+USE_BDB_ALT=		USES=bdb:${USE_BDB}
 
 .for a in ${SANITY_DEPRECATED}
 .if defined(${a})

Modified: head/devel/ice/Makefile
==============================================================================
--- head/devel/ice/Makefile	Mon Apr 25 16:15:48 2016	(r414017)
+++ head/devel/ice/Makefile	Mon Apr 25 16:17:19 2016	(r414018)
@@ -36,8 +36,7 @@ BUILD_DEPENDS+=		${PYTHON_PKGNAMEPREFIX}
 
 WRKSRC=			${WRKDIR}/ice-${PORTVERSION}
 
-USE_BDB=		yes
-WANT_BDB_VER=		5
+USE_BDB=		5
 INVALID_BDB_VER=	40 41 42 43 44 46 47 48 6
 USE_LDCONFIG=		yes
 BUILD_WRKSRC?=		${WRKSRC}/cpp

Modified: head/lang/php55/Makefile.ext
==============================================================================
--- head/lang/php55/Makefile.ext	Mon Apr 25 16:15:48 2016	(r414017)
+++ head/lang/php55/Makefile.ext	Mon Apr 25 16:17:19 2016	(r414018)
@@ -464,7 +464,7 @@ CONFIGURE_ARGS+=--enable-zip \
 CONFIGURE_ARGS+=--with-zlib=/usr
 .endif
 
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
 .if ${PHP_MODNAME} == "dba"
 .	if empty(PORT_OPTIONS:MCDB)
@@ -499,6 +499,8 @@ CONFIGURE_ARGS+=--disable-flatfile
 .	endif
 .endif
 
+.include <bsd.port.pre.mk>
+
 .if ${PHP_MODNAME} == "gd"
 .	if ${PORT_OPTIONS:MT1LIB}
 LIB_DEPENDS+=	libt1.so:devel/t1lib

Modified: head/lang/php56/Makefile.ext
==============================================================================
--- head/lang/php56/Makefile.ext	Mon Apr 25 16:15:48 2016	(r414017)
+++ head/lang/php56/Makefile.ext	Mon Apr 25 16:17:19 2016	(r414018)
@@ -467,7 +467,7 @@ CONFIGURE_ARGS+=--enable-zip \
 CONFIGURE_ARGS+=--with-zlib=/usr
 .endif
 
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
 .if ${PHP_MODNAME} == "dba"
 .	if empty(PORT_OPTIONS:MCDB)
@@ -502,6 +502,8 @@ CONFIGURE_ARGS+=--disable-flatfile
 .	endif
 .endif
 
+.include <bsd.port.pre.mk>
+
 .if ${PHP_MODNAME} == "gd"
 .	if ${PORT_OPTIONS:MT1LIB}
 LIB_DEPENDS+=	libt1.so:devel/t1lib

Modified: head/lang/php70/Makefile.ext
==============================================================================
--- head/lang/php70/Makefile.ext	Mon Apr 25 16:15:48 2016	(r414017)
+++ head/lang/php70/Makefile.ext	Mon Apr 25 16:17:19 2016	(r414018)
@@ -459,7 +459,7 @@ CONFIGURE_ARGS+=--enable-zip \
 CONFIGURE_ARGS+=--with-zlib=/usr
 .endif
 
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
 
 .if ${PHP_MODNAME} == "dba"
 .	if empty(PORT_OPTIONS:MCDB)
@@ -494,6 +494,8 @@ CONFIGURE_ARGS+=--disable-flatfile
 .	endif
 .endif
 
+.include <bsd.port.pre.mk>
+
 .if ${PHP_MODNAME} == "gd"
 .	if ${PORT_OPTIONS:MT1LIB}
 LIB_DEPENDS+=	libt1.so:devel/t1lib

Modified: head/mail/dk-milter/Makefile
==============================================================================
--- head/mail/dk-milter/Makefile	Mon Apr 25 16:15:48 2016	(r414017)
+++ head/mail/dk-milter/Makefile	Mon Apr 25 16:17:19 2016	(r414018)
@@ -41,6 +41,22 @@ SITE_SUB+=	-e "s|%%PREFIX%%|${PREFIX}|g"
 
 OPTIONS_DEFINE=	DOCS
 
+.if defined(WITH_POPAUTH)
+. if defined(WITH_BDB_BASE)
+IGNORE=		does not work with base bdb
+SITE_SUB+=	-e 's|%%BDB%%|dnl |g'
+. else
+USE_BDB=	41+
+INVALID_BDB_VER=	2 40
+SITE_SUB+=	-e 's|%%BDB%%||g' \
+		-e "s|%%BDB_LIB_DIR%%|${BDB_LIB_DIR}|g" \
+		-e "s|%%BDB_INCLUDE_DIR%%|${BDB_INCLUDE_DIR}|g" \
+		-e "s|%%BDB_LIB_NAME%%|${BDB_LIB_NAME}|g"
+. endif
+.else
+SITE_SUB+=	-e 's|%%BDB%%|dnl |g'
+.endif
+
 .include <bsd.port.pre.mk>
 
 WITHOUT_MILTER_CFLAGS=	yes
@@ -69,21 +85,6 @@ SITE_SUB+=	-e '\|bld_USE_ARLIB|s/^dnl //
 SITE_SUB+=	-e '/-DPOPAUTH/s/^dnl //g'
 .endif
 
-.if defined(WITH_POPAUTH)
-. if defined(WITH_BDB_BASE)
-IGNORE=		does not work with base bdb
-SITE_SUB+=	-e 's|%%BDB%%|dnl |g'
-. else
-USE_BDB=	41+
-INVALID_BDB_VER=	2 40
-SITE_SUB+=	-e 's|%%BDB%%||g' \
-		-e "s|%%BDB_LIB_DIR%%|${BDB_LIB_DIR}|g" \
-		-e "s|%%BDB_INCLUDE_DIR%%|${BDB_INCLUDE_DIR}|g" \
-		-e "s|%%BDB_LIB_NAME%%|${BDB_LIB_NAME}|g"
-. endif
-.else
-SITE_SUB+=	-e 's|%%BDB%%|dnl |g'
-.endif
 .if defined(WITH_OPENSSL_BASE)
 SITE_SUB+=	-e 's|%%OPENSSL%%|dnl |g'
 .else

Modified: head/net-p2p/digitalcoin/Makefile
==============================================================================
--- head/net-p2p/digitalcoin/Makefile	Mon Apr 25 16:15:48 2016	(r414017)
+++ head/net-p2p/digitalcoin/Makefile	Mon Apr 25 16:17:19 2016	(r414018)
@@ -21,8 +21,7 @@ GH_TAGNAME=	96b098a
 
 USES=		desktop-file-utils gmake
 USE_OPENSSL=	yes
-USE_BDB=	yes
-WANT_BDB_VER=	48
+USE_BDB=	48
 USE_QT4=	corelib gui qmake_build linguisttools_build uic_build \
 		moc_build rcc_build
 

Modified: head/net-p2p/dogecoin/Makefile
==============================================================================
--- head/net-p2p/dogecoin/Makefile	Mon Apr 25 16:15:48 2016	(r414017)
+++ head/net-p2p/dogecoin/Makefile	Mon Apr 25 16:17:19 2016	(r414018)
@@ -31,8 +31,7 @@ CONFIGURE_ARGS+=	--with-incompatible-bdb
 		CRYPTO_CFLAGS="-I${OPENSSLINC} -L${OPENSSLLIB}" CRYPTO_LIBS="-lcrypto"
 CONFIGURE_ENV+=	OBJC="${CC}" OBJCFLAGS="${CFLAGS}" OBJCXX="${CXX}" OBJCXXFLAGS="${CXXFLAGS}"
 USE_OPENSSL=	yes
-USE_BDB=	yes
-WANT_BDB_VER=	5
+USE_BDB=	5
 
 CXXFLAGS+=	-I${LOCALBASE}/include -I${BDB_INCLUDE_DIR} \
 		-L${LOCALBASE}/lib -L${BDB_LIB_DIR}

Modified: head/net-p2p/namecoin/Makefile
==============================================================================
--- head/net-p2p/namecoin/Makefile	Mon Apr 25 16:15:48 2016	(r414017)
+++ head/net-p2p/namecoin/Makefile	Mon Apr 25 16:17:19 2016	(r414018)
@@ -27,8 +27,7 @@ USE_GITHUB=	yes
 USES=		gmake compiler:c++11-lib
 MAKE_JOBS_UNSAFE=yes
 USE_OPENSSL=	yes
-USE_BDB=	yes
-WANT_BDB_VER=	48
+USE_BDB=	48
 
 CXXFLAGS+=	-I${LOCALBASE}/include -I${BDB_INCLUDE_DIR}
 CXXFLAGS+=	-L${LOCALBASE}/lib -L${BDB_LIB_DIR}

Modified: head/net-p2p/twister/Makefile
==============================================================================
--- head/net-p2p/twister/Makefile	Mon Apr 25 16:15:48 2016	(r414017)
+++ head/net-p2p/twister/Makefile	Mon Apr 25 16:17:19 2016	(r414018)
@@ -25,8 +25,7 @@ OPTIONS_DEFINE=	DOCS
 USE_GITHUB=	yes
 GH_ACCOUNT=	miguelfreitas
 
-USE_BDB=	yes
-WANT_BDB_VER=	48
+USE_BDB=	48
 USE_OPENSSL=	yes
 USES=		autoreconf:build gmake iconv libtool
 



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