From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Oct 29 23:20:01 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86F101065686 for ; Wed, 29 Oct 2008 23:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 6545A8FC2D for ; Wed, 29 Oct 2008 23:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id m9TNK1R3037287 for ; Wed, 29 Oct 2008 23:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id m9TNK1VG037286; Wed, 29 Oct 2008 23:20:01 GMT (envelope-from gnats) Resent-Date: Wed, 29 Oct 2008 23:20:01 GMT Resent-Message-Id: <200810292320.m9TNK1VG037286@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Scot W. Hetzel" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B877106564A for ; Wed, 29 Oct 2008 23:18:46 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 8C7968FC1D for ; Wed, 29 Oct 2008 23:18:46 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id m9TNIkbS068819 for ; Wed, 29 Oct 2008 23:18:46 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id m9TNIjcD068817; Wed, 29 Oct 2008 23:18:45 GMT (envelope-from nobody) Message-Id: <200810292318.m9TNIjcD068817@www.freebsd.org> Date: Wed, 29 Oct 2008 23:18:45 GMT From: "Scot W. Hetzel" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/128467: [patch] databases/php4-dba: change Berkeley DB detection to USE_BDB. X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2008 23:20:01 -0000 >Number: 128467 >Category: ports >Synopsis: [patch] databases/php4-dba: change Berkeley DB detection to USE_BDB. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Oct 29 23:20:00 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Scot W. Hetzel >Release: 8.0-CURRENT >Organization: >Environment: FreeBSD hp010.hetzel.org 8.0-CURRENT FreeBSD 8.0-CURRENT #0: Mon Oct 27 22:02:16 CDT 2008 root@hp010.hetzel.org:/usr/obj/usr/src/8x-zfs/sys/DV8135NR amd64 >Description: Currently, the lang/php4/Makefile.ext file is not able to detect the installed version of Berkeley DB. Instead it depends on the user to set WITH_DB4_VER to the current version installed or letting the databases/php4-dba install databases/db44. >How-To-Repeat: install any of the db4* ports except db44, and then build databases/php4-dba, selecting DB4 from the options menu, and without setting WITH_DB4_VER. The port will install databases/db44, even though there is an existing version of Berkley DB installed. >Fix: The attached patch changes lang/php4/Makefile.ext to use USE_BDB for detection of the installed Berkeley DB version, as well as patching ${WRKSRC}/config.m4 with the correct values obtained from BDB_LIB_NAME and BDB_INCLUDE_DIR. Changed files: lang/php4/Makefile.ext databases/php4-dba/files/patch-config.m4 Patch attached with submission follows: Index: databases/php4-dba/files/patch-config.m4 =================================================================== RCS file: /home/ncvs/ports/databases/php4-dba/files/patch-config.m4,v retrieving revision 1.4 diff -u -r1.4 patch-config.m4 --- databases/php4-dba/files/patch-config.m4 17 Feb 2007 10:19:17 -0000 1.4 +++ databases/php4-dba/files/patch-config.m4 29 Oct 2008 17:33:23 -0000 @@ -1,34 +1,23 @@ ---- config.m4.orig Tue Nov 28 12:41:35 2006 -+++ config.m4 Sat Feb 17 11:13:51 2007 -@@ -205,6 +205,22 @@ +--- config.m4-orig 2006-11-28 05:41:35.000000000 -0600 ++++ config.m4 2008-10-29 12:32:36.000000000 -0500 +@@ -201,9 +201,9 @@ + if test "$withval" != "no"; then + PHP_DBA_STD_BEGIN + for i in $withval /usr/local/BerkeleyDB.4.2 /usr/local/BerkeleyDB.4.1 /usr/local/BerkeleyDB.4.0 /usr/local /usr; do +- if test -f "$i/db4/db.h"; then ++ if test -f "$i/BDB_INCLUDE_DIR/db.h"; then THIS_PREFIX=$i - THIS_INCLUDE=$i/db4/db.h +- THIS_INCLUDE=$i/db4/db.h ++ THIS_INCLUDE=$i/BDB_INCLUDE_DIR/db.h break -+ elif test -f "$i/include/db44/db.h"; then -+ THIS_PREFIX=$i -+ THIS_INCLUDE=$i/include/db44/db.h -+ break -+ elif test -f "$i/include/db43/db.h"; then -+ THIS_PREFIX=$i -+ THIS_INCLUDE=$i/include/db43/db.h -+ break -+ elif test -f "$i/include/db42/db.h"; then -+ THIS_PREFIX=$i -+ THIS_INCLUDE=$i/include/db42/db.h -+ break -+ elif test -f "$i/include/db41/db.h"; then -+ THIS_PREFIX=$i -+ THIS_INCLUDE=$i/include/db41/db.h -+ break elif test -f "$i/include/db4/db.h"; then THIS_PREFIX=$i - THIS_INCLUDE=$i/include/db4/db.h -@@ -223,7 +239,7 @@ +@@ -223,7 +223,7 @@ break fi done - PHP_DBA_DB_CHECK(4, db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)]) -+ PHP_DBA_DB_CHECK(4, db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db41 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)]) ++ PHP_DBA_DB_CHECK(4, BDB_LIB_NAME, [(void)db_create((DB**)0, (DB_ENV*)0, 0)]) fi ]) AC_DBA_STD_RESULT(db4,Berkeley DB4) Index: lang/php4/Makefile.ext =================================================================== RCS file: /home/ncvs/ports/lang/php4/Makefile.ext,v retrieving revision 1.41 diff -u -r1.41 Makefile.ext --- lang/php4/Makefile.ext 23 Sep 2008 05:40:46 -0000 1.41 +++ lang/php4/Makefile.ext 29 Oct 2008 17:24:57 -0000 @@ -387,24 +387,10 @@ CONFIGURE_ARGS+=--without-cdb . endif . if defined(WITH_DB4) -WITH_DB4_VER?= 44 -. if ${WITH_DB4_VER} == 43 -LIB_DEPENDS+= db-4.3.0:${PORTSDIR}/databases/db43 -. else -. if ${WITH_DB4_VER} == 42 -LIB_DEPENDS+= db-4.2.2:${PORTSDIR}/databases/db42 -. else -. if ${WITH_DB4_VER} == 41 -LIB_DEPENDS+= db41.1:${PORTSDIR}/databases/db41 -. else -. if ${WITH_DB4_VER} == 4 -LIB_DEPENDS+= db4.0:${PORTSDIR}/databases/db4 -. else -LIB_DEPENDS+= db-4.4.0:${PORTSDIR}/databases/db44 -. endif -. endif -. endif -. endif +USE_BDB= yes +INVALID_BDB_VER= 2 3 +OBSOLETE_BDB_VAR= WITH_DB4_VER +#WITH_BDB_VER?= 44+ CONFIGURE_ARGS+=--with-db4=${LOCALBASE} . endif . if defined(WITH_GDBM) @@ -418,6 +404,13 @@ . if defined(WITHOUT_FLATFILE) CONFIGURE_ARGS+=--without-flatfile . endif + +. if defined(WITH_DB4) +post-patch: + ${REINPLACE_CMD} -e "s!BDB_LIB_NAME!${BDB_LIB_NAME}!g" \ + -e "s!BDB_INCLUDE_DIR!${BDB_INCLUDE_DIR:S,^${PREFIX}/,,}!g" \ + ${WRKSRC}/config.m4 +. endif .endif .if ${PHP_MODNAME} == "domxml" >Release-Note: >Audit-Trail: >Unformatted: