Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 May 2016 13:16:52 +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: r414444 - in head/Mk: . Uses
Message-ID:  <201605021316.u42DGqi1095565@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mat
Date: Mon May  2 13:16:52 2016
New Revision: 414444
URL: https://svnweb.freebsd.org/changeset/ports/414444

Log:
  Fix WITH_BDB_VER support, and switch to DEFAULT_VERSIONS.
  
  PR:		209183
  Reported by:	peter
  Sponsored by:	Absolight

Modified:
  head/Mk/Uses/bdb.mk
  head/Mk/bsd.default-versions.mk   (contents, props changed)

Modified: head/Mk/Uses/bdb.mk
==============================================================================
--- head/Mk/Uses/bdb.mk	Mon May  2 12:50:00 2016	(r414443)
+++ head/Mk/Uses/bdb.mk	Mon May  2 13:16:52 2016	(r414444)
@@ -15,6 +15,7 @@
 #			  support one or more versions of Berkeley DB.
 # WITH_BDB_VER
 #			- User defined global variable to set Berkeley DB version.
+#			  Deprecated, use DEFAULT_VERSIONS+=bdb=xx
 # <BDB_UNIQUENAME>_WITH_BDB_VER
 #			- User defined port specific variable to set Berkeley DB
 #			  version.
@@ -54,12 +55,17 @@ _bdb_ARGS:=	${bdb_ARGS}
 .endif
 _bdb_ARGS?=	yes
 
-# TODO: avoid malformed conditional with invalid _bdb_ARGS/WITH_BDB_VER
+# TODO: avoid malformed conditional with invalid _bdb_ARGS/BDB_DEFAULT
 # check if + works properly from test builds 01h12m23s
 
 BDB_UNIQUENAME?=	${PKGNAMEPREFIX}${PORTNAME}
 
-_WITH_BDB_VER_save:=${WITH_BDB_VER}
+.if defined(WITH_BDB_VER)
+WARNING+=	"WITH_BDB_VER is deprecated and will be removed on 2016-08-01. Use DEFAULT_VERSIONS+=bdb=${WITH_BDB_VER}"
+BDB_DEFAULT:=${WITH_BDB_VER}
+.endif
+
+_BDB_DEFAULT_save:=${BDB_DEFAULT}
 
 _DB_PORTS=		48 5 6
 _DB_DEFAULTS=	48 5	# does not include 6 due to different licensing
@@ -77,17 +83,17 @@ db48_FIND=	${LOCALBASE}/include/db48/db.
 db5_FIND=	${LOCALBASE}/include/db5/db.h
 db6_FIND=	${LOCALBASE}/include/db6/db.h
 
-# Override the global WITH_BDB_VER with the
+# Override the global BDB_DEFAULT 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}
+BDB_DEFAULT=	${${BDB_UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER}
 .endif
 
-# Override _bdb_ARGS with global WITH_BDB_VER if the maintainer did not
+# Override _bdb_ARGS with global BDB_DEFAULT if the maintainer did not
 # ask for a more specific version.
-.if defined(WITH_BDB_VER)
-. if ${WITH_BDB_VER} != 1 && ${_bdb_ARGS} == yes
-_bdb_ARGS=	${WITH_BDB_VER}
+.if defined(BDB_DEFAULT)
+. if ${BDB_DEFAULT} != 1
+_bdb_ARGS=	${BDB_DEFAULT}
 . endif
 .endif
 
@@ -204,7 +210,7 @@ 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} "BDB_DEFAULT: ${_BDB_DEFAULT_save}"
 	@${ECHO_CMD} "BDB_BUILD_DEPENDS: ${BDB_BUILD_DEPENDS}"
 	@${ECHO_CMD} "bdb_ARGS (original): ${bdb_ARGS}"
 	@${ECHO_CMD} "WITH_BDB_HIGHEST (original): ${WITH_BDB_HIGHEST}"
@@ -236,7 +242,7 @@ 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
+_IGNORE_MSG=	Obsolete variable(s) ${BAD_VAR} use DEFAULT_VERSIONS or ${BDB_UNIQUENAME:tu:S,-,_,}_WITH_BDB_VER to select Berkeley DB version
 .  if defined(IGNORE)
 IGNORE+= ${_IGNORE_MSG}
 .  else

Modified: head/Mk/bsd.default-versions.mk
==============================================================================
--- head/Mk/bsd.default-versions.mk	Mon May  2 12:50:00 2016	(r414443)
+++ head/Mk/bsd.default-versions.mk	Mon May  2 13:16:52 2016	(r414444)
@@ -20,6 +20,8 @@ ${_l:tu}_DEFAULT=	${lang:C/.*=//g}
 
 # Possible values: 2.2, 2.4
 APACHE_DEFAULT?=	2.4
+# Possible values: 48, 5, 6
+BDB_DEFAULT?=		5
 # Possible values: 2.5
 FIREBIRD_DEFAULT?=	2.5
 # Possible values: 3.0.0



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