Date: Fri, 20 Jan 2006 22:40:29 +0100 (CET) From: Petr Rehor <prehor@gmail.com> To: FreeBSD-gnats-submit@FreeBSD.org Cc: vsevolod@FreeBSD.org Subject: ports/92079: [bsd.database.mk][patch] Set detected database version to *_VER variable. Message-ID: <200601202140.k0KLeTJX095466@charon.rx.cz> Resent-Message-ID: <200601202150.k0KLo29v040027@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 92079 >Category: ports >Synopsis: [bsd.database.mk][patch] Set detected database version to *_VER variable. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Jan 20 21:50:02 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Petr Rehor >Release: FreeBSD 6.0-RELEASE-c3 i386 >Organization: >Environment: System: FreeBSD charon.rx.cz 6.0-RELEASE-c3 FreeBSD 6.0-RELEASE-c3 #0: Tue Nov 8 20:44:39 UTC 2005 root@marvin.rx.cz:/usr/obj/usr/src/sys/GENERIC i386 >Description: Set BDB_VER to detected Berkeley DB version. Set SQLITE_VER to detected sqlite version. Document *_VER variables. >How-To-Repeat: >Fix: --- bsd.database.mk.diff begins here --- --- bsd.database.mk.orig Fri Jan 20 19:35:47 2006 +++ bsd.database.mk Fri Jan 20 22:36:33 2006 @@ -28,7 +28,7 @@ # BROKEN_WITH_MYSQL # - This variable can be defined if the ports doesn't support # one or more version of MySQL. -# MYSQL_VER - Internal variable for MySQL version. +# MYSQL_VER - Detected MySQL version. # WITH_MYSQL_VER # - User defined variable to set MySQL version. ## @@ -40,6 +40,7 @@ # DEFAULT_PGSQL_VER # - PostgreSQL default version. Can be overridden within a port. # Default: 74. +# PGSQL_VER - Detected PostgreSQL version. # WANT_PGSQL_VER # - Maintainer can set an arbitrary version of PostgreSQL by # using it. @@ -52,10 +53,12 @@ # by the user via defined variable), try to find the # currently installed version. Fall back to default if # necessary (db41+). +# BDB_VER - Detected Berkley DB version. ## # USE_SQLITE - Add dependency on sqlite library. Valid values are: # 3 and 2. If version is not specified directly then # sqlite3 is used (if USE_SQLITE= yes). +# SQLITE_VER - Detected sqlite version. .if defined(USE_MYSQL) DEFAULT_MYSQL_VER?= 41 @@ -178,35 +181,37 @@ .endif # Detect bdb version -_FOUND= no +_BDB_VER= no .for bdb in ${_DB_PORTS} -.if ${_WANT_BDB_VER} == "${bdb}" && ${_FOUND} == "no" +.if ${_WANT_BDB_VER} == "${bdb}" && ${_BDB_VER} == "no" _MATCHED_DB_VER:= ${bdb:S/+//} . if ${_MATCHED_DB_VER} == "${bdb}" # USE_BDB is exactly specified LIB_DEPENDS+= ${db${bdb}_DEPENDS} -_FOUND= yes +_BDB_VER= ${bdb} .else # USE_BDB is specified as VER+ . for db4 in ${_DB_${_MATCHED_DB_VER}P} -. if exists(${db${db4}_FIND}) && ${_FOUND} == "no" +. if exists(${db${db4}_FIND}) && ${_BDB_VER} == "no" LIB_DEPENDS+= ${db${db4}_DEPENDS} -_FOUND= yes +_BDB_VER= ${db4} . endif . endfor -. if ${_FOUND} == "no" +. if ${_BDB_VER} == "no" # No existing db4 version is detected in system LIB_DEPENDS+= ${db${_MATCHED_DB_VER}_DEPENDS} -_FOUND= yes +_BDB_VER= ${_MATCHED_DB_VER} . endif . endif .endif .endfor # USE_BDB is specified incorrectly, so mark this as IGNORE -.if ${_FOUND} == "no" +.if ${_BDB_VER} == "no" IGNORE= "Unknown bdb version: ${USE_BDB}" +.else +BDB_VER= ${_BDB_VER} .endif .endif # USE_BDB @@ -223,8 +228,10 @@ # USE_SQLITE is specified incorrectly, so mark this as IGNORE .if ${_SQLITE_VER} == "3" LIB_DEPENDS+= sqlite${_SQLITE_VER}:${PORTSDIR}/databases/sqlite${_SQLITE_VER} +SQLITE_VER= ${_SQLITE_VER} .elif ${_SQLITE_VER} == "2" LIB_DEPENDS+= sqlite.${_SQLITE_VER}:${PORTSDIR}/databases/sqlite${_SQLITE_VER} +SQLITE_VER= ${_SQLITE_VER} .else IGNORE= "Unknown sqlite version: ${_SQLITE_VER}" .endif --- bsd.database.mk.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200601202140.k0KLeTJX095466>