Date: Wed, 16 Jan 2008 12:04:07 +0100 (CET) From: Martin Matuska <martin@matuska.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/119712: [PATCH] www/apache20 use BDB from bsd.databases.mk Message-ID: <20080116110407.36D593989D@mail.vx.sk> Resent-Message-ID: <200801161110.m0GBA19r033453@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 119712 >Category: ports >Synopsis: [PATCH] www/apache20 use BDB from bsd.databases.mk >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: Wed Jan 16 11:10:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Martin Matuska >Release: FreeBSD 7.0-RC1 i386 and amd64 >Organization: >Environment: System: FreeBSD 7.0-RC1 i386 and amd64 >Description: - Use bsd.databases.mk for bdb selection This adds support for version definition via WITH_BDB_VER or APACHE20_WITH_BDB_VER, defines dependencies etc. In the only case of db40 apache requires "--with-dbm=db4", so a substitution "--with-dbm=db${BDB_VER:S/40/4/}" is used Apache 2.0 does not support db46, so INVALID_BDB_VER=46 - Add knob WITH_BDB for BerkeleyDB DBM If defined, BerkeleyDB DBM module is built and used Default version is BDB default in bsd.databases.mk - Add knob WITH_BDB_BASE for BerkeleyDB 1.85 from base install If defined, bsd.databases.mk is NOT used and bdb comes from base - Remove WITH_BERKELEYDB Use of bsd.databases.mk makes WITH_BERKELEYDB obsolete Successfully tested with APACHE20_WITH_BDB_VER or WITH_BDB_VER with values 2 3 40 41 42 43 44 45 (=all possibilities) >How-To-Repeat: >Fix: Index: ports/www/apache20/Makefile.doc =================================================================== RCS file: /home/pcvs/ports/www/apache20/Makefile.doc,v retrieving revision 1.19 diff -u -r1.19 Makefile.doc --- ports/www/apache20/Makefile.doc 10 May 2006 19:50:26 -0000 1.19 +++ ports/www/apache20/Makefile.doc 16 Jan 2008 11:01:30 -0000 @@ -35,9 +35,10 @@ ## WITH_THREADS: Enable threads support !! USE IT WITH CARE !! ## WITH_DBM: Choose your DBM: bdb (Berkeley DB), gdbm or ## ndbm (default) -## WITH_BERKELEYDB: Choose your BerkeleyDB version: db2, db3, -## db4, db41, db42, db43 or FreeBSD (1.85) -## (default) +## WITH_BDB: Define to select bdb via bsd.databases.mk +## desired version may be set with +## WITH_BDB_VER or APACHE22_WITH_BDB_VER +## WITH_BDB_BASE: Define to use bdb from base (1.85) ## WITH_STATIC_SUPPORT: Build statically linked support binaries ## WITH_STATIC_APACHE: Build a static version of httpd (implies ## WITH_STATIC_MODULES) Index: ports/www/apache20/Makefile.modules =================================================================== RCS file: /home/pcvs/ports/www/apache20/Makefile.modules,v retrieving revision 1.24 diff -u -r1.24 Makefile.modules --- ports/www/apache20/Makefile.modules 29 Mar 2007 17:39:45 -0000 1.24 +++ ports/www/apache20/Makefile.modules 16 Jan 2008 11:01:30 -0000 @@ -45,12 +45,13 @@ # xDBM section # -.if !defined(WITH_DBM) && defined(WITH_BERKELEYDB) +.if !defined(WITH_DBM) +. if defined(WITH_BDB) || defined(WITH_BDB_BASE) WITH_DBM=bdb +. endif .endif -.if defined(WITH_DBM) && !defined(WITH_BERKELEYDB) -WITH_BERKELEYDB= FreeBSD -.endif + + .if defined(WITH_DBM) . if ${WITH_DBM:L} == "sdbm" @@ -59,40 +60,16 @@ LIB_DEPENDS+= gdbm.3:${PORTSDIR}/databases/gdbm CONFIGURE_ARGS+= --with-gdbm=${LOCALBASE} . elif ${WITH_DBM:L} == "db" || ${WITH_DBM:L} == "bdb" -. if ${WITH_BERKELEYDB} == "FreeBSD" -CONFIGURE_ARGS+= --with-dbm=db185 \ - --with-berkeley-db=/usr -. elif ${WITH_BERKELEYDB} == "db2" -LIB_DEPENDS+= db2:${PORTSDIR}/databases/db2 -CONFIGURE_ARGS+= --with-dbm=db2 \ - --with-berkeley-db=${LOCALBASE} -. elif ${WITH_BERKELEYDB} == "db3" -LIB_DEPENDS+= db3:${PORTSDIR}/databases/db3 -CONFIGURE_ARGS+= --with-dbm=db3 \ - --with-berkeley-db=${LOCALBASE} -. elif ${WITH_BERKELEYDB} == "db4" -LIB_DEPENDS+= db4:${PORTSDIR}/databases/db4 -CONFIGURE_ARGS+= --with-dbm=db4 \ - --with-berkeley-db=${LOCALBASE} -. elif ${WITH_BERKELEYDB} == "db41" -LIB_DEPENDS+= db41:${PORTSDIR}/databases/db41 -CONFIGURE_ARGS+= --with-dbm=db41 \ - --with-berkeley-db=${LOCALBASE} -. elif ${WITH_BERKELEYDB} == "db42" -LIB_DEPENDS+= db-4.2:${PORTSDIR}/databases/db42 -CONFIGURE_ARGS+= --with-dbm=db42 \ - --with-berkeley-db=${LOCALBASE}/include:${LOCALBASE}/lib/db42 -. elif ${WITH_BERKELEYDB} == "db43" -LIB_DEPENDS+= db-4.3:${PORTSDIR}/databases/db43 -CONFIGURE_ARGS+= --with-dbm=db43 \ - --with-berkeley-db=${LOCALBASE}/include:${LOCALBASE}/lib/db43 -. elif ${WITH_BERKELEYDB} == "db44" -LIB_DEPENDS+= db-4.4:${PORTSDIR}/databases/db44 -CONFIGURE_ARGS+= --with-dbm=db44 \ - --with-berkeley-db=${LOCALBASE}/include:${LOCALBASE}/lib/db44 -. else -IGNORE= "Unknown Berkeley DB version" -. endif +. if defined(WITH_BDB_BASE) +CONFIGURE_ARGS+= --with-dbm=db185 \ + --with-berkeley-db=/usr +. else +USE_BDB= yes +INVALID_BDB_VER= 46 +CONFIGURE_ARGS+= --with-dbm=db${BDB_VER:S/40/4/} \ + --with-berkeley-db=${LOCALBASE} +. endif +. else . else IGNORE= "Unknown DBM" . endif >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080116110407.36D593989D>