Fix building with BerkDB 5.0 wrt #319421 by Diego E. Pettenò.
authorSamuli Suominen <ssuominen@gentoo.org>
Wed, 14 Jul 2010 10:06:40 +0000 (10:06 +0000)
committerSamuli Suominen <ssuominen@gentoo.org>
Wed, 14 Jul 2010 10:06:40 +0000 (10:06 +0000)
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64

dev-libs/apr-util/ChangeLog
dev-libs/apr-util/Manifest
dev-libs/apr-util/apr-util-1.3.9.ebuild
dev-libs/apr-util/files/apr-util-1.3.9-support_berkeley_db-5.0.patch [new file with mode: 0644]

index dbd363ee9e7a13290a8834c59746f3ff46290e50..0bd145190065660bf385d8281686f79414323486 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for dev-libs/apr-util
 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/apr-util/ChangeLog,v 1.146 2010/06/17 20:11:16 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/apr-util/ChangeLog,v 1.147 2010/07/14 10:06:40 ssuominen Exp $
+
+  14 Jul 2010; Samuli Suominen <ssuominen@gentoo.org> apr-util-1.3.9.ebuild,
+  +files/apr-util-1.3.9-support_berkeley_db-5.0.patch:
+  Fix building with BerkDB 5.0 wrt #319421 by Diego E. Pettenò.
 
   17 Jun 2010; Patrick Lauer <patrick@gentoo.org> apr-util-1.3.9.ebuild:
   Migrating away from deprecated postgres virtuals
index ab19b93100efb5c07560d989d256c8ed5eaf9a94..9a0abc85e0ed1af0e84878bc90dc27f9b1b7b84a 100644 (file)
@@ -1,5 +1,6 @@
 AUX apr-util-1.3.9-support_berkeley_db-4.8.patch 4443 RMD160 f378ba707441854a0b19f07a396f7a7be041e715 SHA1 ce3cf0caa6c9a9b6cddb9b0b49366dc132eab398 SHA256 11a8163c75a279d1aa93f9bd0142a836add228a5f1232a8f85e1a128363ae8aa
+AUX apr-util-1.3.9-support_berkeley_db-5.0.patch 5782 RMD160 93095ea8dbf9ceb35271a752fc6e21f7944d2c24 SHA1 d2d26a293b4b2e52808512ad0a180cb669e6d9ff SHA256 b61b4f1d0063aa41d6f739ea059e5c5ffcdcb8a17a4aefa1901d5cdd08dd8a17
 DIST apr-util-1.3.9.tar.gz 790952 RMD160 f6180ba186e8ed73831b1da78de7ec57fc1cb162 SHA1 fd2a76352353e6bc2f7cc7da80e2ab3842795199 SHA256 20897069274a026057df26b90a6424da9d70318d930c99885c451d8753b8e4d9
-EBUILD apr-util-1.3.9.ebuild 2356 RMD160 be6d1473ba1778c0af877f605baf4ae2927ac4b3 SHA1 cc139ad18d61edfb945877723bdcddb1eddb375e SHA256 d05bca1e5ec8903dd547948971e3f8b9c8bfe80c2c17dc05e117c7ce0c1dc7d5
-MISC ChangeLog 18609 RMD160 4e322964918b531a8c32f070c0d318beadec54bd SHA1 3a6b15b83e48376a1257b6b6745cd2f3a6f21220 SHA256 2efb56a729c3215387189f9c1e1e372ddd85bf2ad9d8d5954e7902e75a4d77ff
+EBUILD apr-util-1.3.9.ebuild 2364 RMD160 d2c2104cae2cde452b7997e38734bb2ab9b29b5e SHA1 e320872cd820ec29a740aaa689b8b558ba2c113f SHA256 194443f4ae7fd705ee442460f567a73843aff6d932a6c01730efc7caabb4c612
+MISC ChangeLog 18809 RMD160 6510119f62732770be7351784d9dc3ede735d6b7 SHA1 1d9b5e095c0de132144fc8bac7cf7cd237240de3 SHA256 0894fe889850f1fad31dcfef197bc29b9caaa888989b0aef61e706fe9a125ea6
 MISC metadata.xml 229 RMD160 bb816bd761846ad578f8c1521a1f1ec6297410f4 SHA1 92fdbcb6a85ece96506733ad67a5e4e74a58a529 SHA256 8e1aafc5385805d45759406a60df79f0ce88aa1df1a58d44b596405d64c9226d
index 55af09b717ef2aca9c84c70b8b5c2c4269a3d47b..5be51c77fd366e2026aca3277489a8f4bb4862e1 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/apr-util/apr-util-1.3.9.ebuild,v 1.13 2010/06/17 20:11:16 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/apr-util/apr-util-1.3.9.ebuild,v 1.14 2010/07/14 10:06:40 ssuominen Exp $
 
 EAPI="2"
 
@@ -22,7 +22,7 @@ RESTRICT="test"
 
 RDEPEND="dev-libs/expat
        >=dev-libs/apr-${APR_PV}:1
-       berkdb? ( =sys-libs/db-4* )
+       berkdb? ( >=sys-libs/db-4 )
        freetds? ( dev-db/freetds )
        gdbm? ( sys-libs/gdbm )
        ldap? ( =net-nds/openldap-2* )
@@ -35,7 +35,7 @@ DEPEND="${RDEPEND}
        doc? ( app-doc/doxygen )"
 
 src_prepare() {
-       epatch "${FILESDIR}/${P}-support_berkeley_db-4.8.patch"
+       epatch "${FILESDIR}"/${P}-support_berkeley_db-{4.8,5.0}.patch
        eautoreconf
 
        elibtoolize
diff --git a/dev-libs/apr-util/files/apr-util-1.3.9-support_berkeley_db-5.0.patch b/dev-libs/apr-util/files/apr-util-1.3.9-support_berkeley_db-5.0.patch
new file mode 100644 (file)
index 0000000..e819c33
--- /dev/null
@@ -0,0 +1,162 @@
+http://bugs.gentoo.org/319421
+http://svn.apache.org/viewvc/apr/apr-util/branches/1.3.x/dbm/apr_dbm_berkeleydb.c?r1=719535&r2=938146&view=patch
+http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/~checkout~/packages/apr-util/apr-util-db.patch?rev=1.1;content-type=text%2Fplain
+
+--- build/dbm.m4
++++ build/dbm.m4
+@@ -112,7 +112,7 @@
+         changequote([,])
+         unset $cache_id
+         AC_CHECK_HEADER([$bdb_header], [
+-          if test "$1" = "3" -o "$1" = "4"; then
++          if test "$1" = "3" -o "$1" = "4" -o "$1" = "5"; then
+             # We generate a separate cache variable for each prefix and libname
+             # we search under.  That way, we avoid caching information that
+             # changes if the user runs `configure' with a different set of
+@@ -541,6 +541,26 @@
+     apu_db_version=4
+   fi
+ ])
++dnl
++dnl APU_CHECK_DB50: is DB5.0 present?
++dnl
++dnl if present: sets apu_db_header, apu_db_lib, and apu_db_version
++dnl
++dnl
++AC_DEFUN([APU_CHECK_DB50], [
++  places=$1
++  if test -z "$places"; then
++    places="std /usr/local/BerkeleyDB.5.0 /boot/home/config"
++  fi
++  APU_CHECK_BERKELEY_DB("5", "0", "-1",
++    "$places",
++    "db50/db.h db5/db.h db.h",
++    "db-5.0 db5-5.0 db50 db5 db"
++  )
++  if test "$apu_have_db" = "1"; then
++    apu_db_version=5
++  fi
++])
+ 
+ AC_DEFUN([APU_CHECK_DB], [
+   requested=$1
+@@ -631,6 +651,12 @@
+       AC_MSG_ERROR(Berkeley db4 not found)
+     fi
+     ;;
++  db50)
++    APU_CHECK_DB50("$check_places")
++    if test "$apu_db_version" != "5"; then
++      AC_MSG_ERROR(Berkeley db5 not found)
++    fi
++    ;;
+   default)
+     APU_CHECK_DB_ALL("$check_places")
+     ;;
+@@ -638,36 +664,39 @@
+ ])
+ 
+ dnl
+-dnl APU_CHECK_DB_ALL: Try all Berkeley DB versions, from 4.8 to 1.
++dnl APU_CHECK_DB_ALL: Try all Berkeley DB versions, from 5.0 to 1.
+ dnl
+ AC_DEFUN([APU_CHECK_DB_ALL], [
+   all_places=$1
+- 
+-  APU_CHECK_DB48("$all_places")
+-  if test "$apu_db_version" != "4"; then
+-    APU_CHECK_DB47("$all_places")
++  
++  APU_CHECK_DB50("$all_places")
++  if test "$apu_db_version" != "5"; then
++    APU_CHECK_DB48("$all_places")
+     if test "$apu_db_version" != "4"; then
+-      APU_CHECK_DB46("$all_places")
++      APU_CHECK_DB47("$all_places")
+       if test "$apu_db_version" != "4"; then
+-        APU_CHECK_DB45("$all_places")
++        APU_CHECK_DB46("$all_places")
+         if test "$apu_db_version" != "4"; then
+-          APU_CHECK_DB44("$all_places")
++          APU_CHECK_DB45("$all_places")
+           if test "$apu_db_version" != "4"; then
+-            APU_CHECK_DB43("$all_places")
++            APU_CHECK_DB44("$all_places")
+             if test "$apu_db_version" != "4"; then
+-              APU_CHECK_DB42("$all_places")
++              APU_CHECK_DB43("$all_places")
+               if test "$apu_db_version" != "4"; then
+-                APU_CHECK_DB41("$all_places")
++                APU_CHECK_DB42("$all_places")
+                 if test "$apu_db_version" != "4"; then
+-                  APU_CHECK_DB4("$all_places")
++                  APU_CHECK_DB41("$all_places")
+                   if test "$apu_db_version" != "4"; then
+-                    APU_CHECK_DB3("$all_places")
+-                    if test "$apu_db_version" != "3"; then
+-                      APU_CHECK_DB2("$all_places")
+-                      if test "$apu_db_version" != "2"; then
+-                        APU_CHECK_DB1("$all_places")
+-                        if test "$apu_db_version" != "1"; then
+-                          APU_CHECK_DB185("$all_places")
++                    APU_CHECK_DB4("$all_places")
++                    if test "$apu_db_version" != "4"; then
++                      APU_CHECK_DB3("$all_places")
++                      if test "$apu_db_version" != "3"; then
++                        APU_CHECK_DB2("$all_places")
++                        if test "$apu_db_version" != "2"; then
++                          APU_CHECK_DB1("$all_places")
++                          if test "$apu_db_version" != "1"; then
++                            APU_CHECK_DB185("$all_places")
++                          fi
+                         fi
+                       fi
+                     fi
+@@ -707,7 +736,7 @@
+   apu_db_version=0
+ 
+   AC_ARG_WITH(dbm, [APR_HELP_STRING([--with-dbm=DBM], [choose the DBM type to use.
+-      DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db41,db42,db43,db44,db45,db46,db47,db48}])],
++      DBM={sdbm,gdbm,ndbm,db,db1,db185,db2,db3,db4,db41,db42,db43,db44,db45,db46,db47,db48,db50}])],
+   [
+     if test "$withval" = "yes"; then
+       AC_MSG_ERROR([--with-dbm needs to specify a DBM type to use.
+@@ -914,6 +943,10 @@
+       apu_use_db=1
+       apu_default_dbm=db4
+       ;;
++    db50)
++      apu_use_db=1
++      apu_default_dbm=db5
++      ;;
+     default)
+       dnl ### use more sophisticated DBMs for the default?
+       apu_default_dbm="sdbm (default)"
+@@ -921,7 +954,7 @@
+       ;;
+     *)
+       AC_MSG_ERROR([--with-dbm=$look_for is an unknown DBM type.
+-        Use one of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44, db45, db46, db47, db48])
++        Use one of: sdbm, gdbm, ndbm, db, db1, db185, db2, db3, db4, db41, db42, db43, db44, db45, db46, db47, db48, db50])
+       ;;
+   esac
+ 
+--- dbm/apr_dbm_berkeleydb.c
++++ dbm/apr_dbm_berkeleydb.c
+@@ -37,13 +37,13 @@
+  * DB_185, DB2, DB3, and DB4.
+  */
+ 
+-#if   defined(DB_VERSION_MAJOR) && (DB_VERSION_MAJOR == 4)
++#if   defined(DB_VERSION_MAJOR) && (DB_VERSION_MAJOR >= 4)
+ /* We will treat anything greater than 4.1 as DB4.
+  * We can treat 4.0 as DB3.
+  */
+-#if   defined(DB_VERSION_MINOR) && (DB_VERSION_MINOR >= 1)
++#if   DB_VERSION_MAJOR > 4 || (defined(DB_VERSION_MINOR) && (DB_VERSION_MINOR >= 1))
+ #define DB_VER 4
+-#else
++#elif DB_VERSION_MAJOR == 4
+ #define DB_VER 3
+ #endif
+ #elif defined(DB_VERSION_MAJOR) && (DB_VERSION_MAJOR == 3)