summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-libs/db/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-libs/db/files')
-rw-r--r--sys-libs/db/files/db-1.85-gentoo-paths.patch29
-rw-r--r--sys-libs/db/files/db-3.2.9-fix-dep-link.patch26
-rw-r--r--sys-libs/db/files/db-3.2.9-gcc43.patch16
-rw-r--r--sys-libs/db/files/db-3.2.9-jarlocation.patch12
-rw-r--r--sys-libs/db/files/db-3.2.9-java15.patch15
-rw-r--r--sys-libs/db/files/db-4.0.14-fix-dep-link.patch38
-rw-r--r--sys-libs/db/files/db-4.0.14-jarlocation.patch14
-rw-r--r--sys-libs/db/files/db-4.2-jarlocation.patch16
-rw-r--r--sys-libs/db/files/db-4.2-jni-check-prefix-first.patch30
-rw-r--r--sys-libs/db/files/db-4.2-libtool.patch20
-rw-r--r--sys-libs/db/files/db-4.2-listen-to-java-options.patch10
-rw-r--r--sys-libs/db/files/db-4.2.52_p2-TXN.patch68
-rw-r--r--sys-libs/db/files/db-4.3-jarlocation.patch16
-rw-r--r--sys-libs/db/files/db-4.3-jni-check-prefix-first.patch30
-rw-r--r--sys-libs/db/files/db-4.3-libtool.patch47
-rw-r--r--sys-libs/db/files/db-4.3-listen-to-java-options.patch10
-rw-r--r--sys-libs/db/files/db-4.3.27-fix-dep-link.patch38
-rw-r--r--sys-libs/db/files/db-4.4-jarlocation.patch16
-rw-r--r--sys-libs/db/files/db-4.4-libtool.patch47
-rw-r--r--sys-libs/db/files/db-4.5-jarlocation.patch16
-rw-r--r--sys-libs/db/files/db-4.5-libtool.patch47
-rw-r--r--sys-libs/db/files/db-4.6-jarlocation.patch16
-rw-r--r--sys-libs/db/files/db-4.6-jni-check-prefix-first.patch30
-rw-r--r--sys-libs/db/files/db-4.6-libtool.patch47
-rw-r--r--sys-libs/db/files/db-4.8-libtool.patch65
-rw-r--r--sys-libs/db/files/db-4.8.24-java-manifest-location.patch12
-rw-r--r--sys-libs/db/files/db-4.8.30-rename-atomic-compare-exchange.patch22
-rw-r--r--sys-libs/db/files/db-5.0.21-enable-dbm-autoconf.patch49
-rw-r--r--sys-libs/db/files/db-5.2.28-sqlite-configure-path.patch12
-rw-r--r--sys-libs/db/files/db-6.0.19-sqlite-configure-path.patch11
-rw-r--r--sys-libs/db/files/db-6.0.20-test-link.patch38
-rw-r--r--sys-libs/db/files/db-6.0.35-sqlite-configure-path.patch11
-rw-r--r--sys-libs/db/files/db-6.1.19-sqlite-configure-path.patch10
33 files changed, 884 insertions, 0 deletions
diff --git a/sys-libs/db/files/db-1.85-gentoo-paths.patch b/sys-libs/db/files/db-1.85-gentoo-paths.patch
new file mode 100644
index 000000000000..4a65106bdc70
--- /dev/null
+++ b/sys-libs/db/files/db-1.85-gentoo-paths.patch
@@ -0,0 +1,29 @@
+--- PORT/linux/Makefile
++++ PORT/linux/Makefile
+@@ -1,12 +1,12 @@
+ # @(#)Makefile 8.9 (Berkeley) 7/14/94
+
+-LIBDB= libdb.a
+-LIBDBSO=libdb.so
++LIBDB= libdb1.a
++LIBDBSO=libdb1.so
+ SOVER=2
+ SONAME=$(LIBDBSO).$(SOVER)
+ LIBNDBM=libndbm.a
+ LIBNDBMSO=libndbm.so
+-PROG= db_dump185
++PROG= db1_dump185
+ OBJ1= hash.o hash_bigkey.o hash_buf.o hash_func.o hash_log2.o hash_page.o \
+ ndbm.o
+ OBJ2= bt_close.o bt_conv.o bt_debug.o bt_delete.o bt_get.o bt_open.o \
+@@ -27,8 +27,8 @@
+ DESTDIR =
+ prefix = /usr
+ bindir = $(prefix)/bin
+-libdir = $(prefix)/lib
+-includedir = $(prefix)/include
++libdir = $(prefix)/@GENTOO_LIBDIR@
++includedir = $(prefix)/include/db1
+
+ all: $(LIBDB) $(LIBDBSO) $(PROG)
+
diff --git a/sys-libs/db/files/db-3.2.9-fix-dep-link.patch b/sys-libs/db/files/db-3.2.9-fix-dep-link.patch
new file mode 100644
index 000000000000..cdf6599b0d55
--- /dev/null
+++ b/sys-libs/db/files/db-3.2.9-fix-dep-link.patch
@@ -0,0 +1,26 @@
+--- db-3.2.9/dist/Makefile.in.orig 2003-02-23 23:41:13.000000000 +0200
++++ db-3.2.9/dist/Makefile.in 2003-02-23 23:42:07.000000000 +0200
+@@ -240,19 +240,19 @@
+
+ $(libso_target): $(OBJS)
+ $(SOLINK) $(SOFLAGS) -o $(libso_target) \
+- $(OBJS) $(LDFLAGS) $(LIBSO_LIBS)
++ $(OBJS) $(LDFLAGS) $(LIBS) $(LIBSO_LIBS)
+
+ $(libxso_target): $(COBJS) $(OBJS)
+ $(SOLINK) $(SOFLAGS) -o $(libxso_target) \
+- $(COBJS) $(OBJS) $(LDFLAGS) $(LIBXSO_LIBS)
++ $(COBJS) $(OBJS) $(LDFLAGS) $(LIBS) $(LIBXSO_LIBS)
+
+ $(libjso_target): $(JOBJS) $(OBJS)
+ $(SOLINK) $(SOFLAGS) -o $(libjso_target) \
+- $(JOBJS) $(OBJS) $(LDFLAGS) $(LIBJSO_LIBS)
++ $(JOBJS) $(OBJS) $(LDFLAGS) $(LIBS) $(LIBJSO_LIBS)
+
+ $(libtso_target): $(TOBJS) $(OBJS)
+ $(SOLINK) $(SOFLAGS) -o $(libtso_target) \
+- $(TOBJS) $(OBJS) $(LDFLAGS) $(LIBTSO_LIBS)
++ $(TOBJS) $(OBJS) $(LDFLAGS) $(LIBS) $(LIBTSO_LIBS)
+
+ ##################################################
+ # Creating individual dependencies and actions for building class
diff --git a/sys-libs/db/files/db-3.2.9-gcc43.patch b/sys-libs/db/files/db-3.2.9-gcc43.patch
new file mode 100644
index 000000000000..f032da85296a
--- /dev/null
+++ b/sys-libs/db/files/db-3.2.9-gcc43.patch
@@ -0,0 +1,16 @@
+diff -Nuar db-3.2.9.orig/include/db_cxx.h db-3.2.9/include/db_cxx.h
+--- db-3.2.9.orig/include/db_cxx.h 2001-01-11 10:28:55.000000000 -0800
++++ db-3.2.9/include/db_cxx.h 2008-08-16 16:10:48.474699646 -0700
+@@ -49,7 +49,12 @@
+ // Forward declarations
+ //
+
++#if defined(__GNUC__) && (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
++using namespace std;
++#include <iostream>
++#else
+ #include <iostream.h>
++#endif
+ #include <stdarg.h>
+ #include "db.h"
+
diff --git a/sys-libs/db/files/db-3.2.9-jarlocation.patch b/sys-libs/db/files/db-3.2.9-jarlocation.patch
new file mode 100644
index 000000000000..0654e2ef48e8
--- /dev/null
+++ b/sys-libs/db/files/db-3.2.9-jarlocation.patch
@@ -0,0 +1,12 @@
+diff -ur db-3.2.9.old/dist/Makefile.in db-3.2.9/dist/Makefile.in
+--- db-3.2.9.old/dist/Makefile.in 2003-10-18 02:21:18.000000000 -0700
++++ db-3.2.9/dist/Makefile.in 2003-10-18 02:22:14.000000000 -0700
+@@ -72,7 +72,7 @@
+ JAVA_DBDIR= $(JAVA_SRCDIR)/$(JAVA_DBREL)
+ JAVA_EXDIR= $(JAVA_SRCDIR)/com/sleepycat/examples
+
+-libj_jarfile= db.jar
++libj_jarfile= db-$(SOVERSION).jar
+ libjso_base= libdb_java
+ libjso= $(libjso_base)-$(SOVERSION).@SOSUFFIX@
+ libjso_target= $(libjso_base)-$(SOVERSION).la
diff --git a/sys-libs/db/files/db-3.2.9-java15.patch b/sys-libs/db/files/db-3.2.9-java15.patch
new file mode 100644
index 000000000000..5482831e317a
--- /dev/null
+++ b/sys-libs/db/files/db-3.2.9-java15.patch
@@ -0,0 +1,15 @@
+--- db-3.2.9/java/src/com/sleepycat/db/DbEnv.java.orig 2005-03-10 18:30:19.705147736 +0000
++++ db-3.2.9/java/src/com/sleepycat/db/DbEnv.java 2005-03-10 18:03:07.930215232 +0000
+@@ -78,9 +78,9 @@
+ //
+ /*package*/ void _notify_dbs()
+ {
+- Enumeration enum = dblist_.elements();
+- while (enum.hasMoreElements()) {
+- Db db = (Db)enum.nextElement();
++ Enumeration en = dblist_.elements();
++ while (en.hasMoreElements()) {
++ Db db = (Db)en.nextElement();
+ db._notify_dbenv_close();
+ }
+ dblist_.removeAllElements();
diff --git a/sys-libs/db/files/db-4.0.14-fix-dep-link.patch b/sys-libs/db/files/db-4.0.14-fix-dep-link.patch
new file mode 100644
index 000000000000..f54f064640e6
--- /dev/null
+++ b/sys-libs/db/files/db-4.0.14-fix-dep-link.patch
@@ -0,0 +1,38 @@
+--- db-4.0.14/dist/Makefile.in.orig 2003-08-16 06:21:53.763400112 +0200
++++ db-4.0.14/dist/Makefile.in 2003-08-16 06:23:16.036892640 +0200
+@@ -58,7 +58,7 @@
+
+ LDFLAGS= @LDFLAGS@
+ LIBS= @LIBS@
+-LIBSO_LIBS= @LIBSO_LIBS@
++LIBSO_LIBS= @LIBSO_LIBS@ $(LIBS)
+
+ libdb= libdb.a
+ libso_base= libdb
+@@ -77,7 +77,7 @@
+ CXX= @MAKEFILE_CXX@
+ CXXLINK= @MAKEFILE_CXXLINK@
+ XSOLINK= @MAKEFILE_XSOLINK@
+-LIBXSO_LIBS= @LIBXSO_LIBS@
++LIBXSO_LIBS= @LIBXSO_LIBS@ $(LIBS)
+
+ libcxx= libdb_cxx.a
+ libxso_base= libdb_cxx
+@@ -93,7 +93,7 @@
+ # Java support is optional and requires shared librarires.
+ ##################################################
+ CLASSPATH= $(JAVA_CLASSTOP)
+-LIBJSO_LIBS= @LIBJSO_LIBS@
++LIBJSO_LIBS= @LIBJSO_LIBS@ $(LIBS)
+
+ JAR= @JAR@
+ JAVAC= env CLASSPATH="$(CLASSPATH)" @JAVAC@
+@@ -121,7 +121,7 @@
+ # Tcl support is optional and requires shared libraries.
+ ##################################################
+ TCFLAGS= @TCFLAGS@
+-LIBTSO_LIBS= @LIBTSO_LIBS@
++LIBTSO_LIBS= @LIBTSO_LIBS@ $(LIBS)
+ libtso_base= libdb_tcl
+ libtso= $(libtso_base)-$(SOVERSION).@SOSUFFIX@
+ libtso_static= $(libtso_base)-$(SOVERSION).a
diff --git a/sys-libs/db/files/db-4.0.14-jarlocation.patch b/sys-libs/db/files/db-4.0.14-jarlocation.patch
new file mode 100644
index 000000000000..667a32b20d3a
--- /dev/null
+++ b/sys-libs/db/files/db-4.0.14-jarlocation.patch
@@ -0,0 +1,14 @@
+diff -ur db-4.0.14.old/dist/Makefile.in db-4.0.14/dist/Makefile.in
+--- db-4.0.14.old/dist/Makefile.in 2003-10-18 02:24:50.000000000 -0700
++++ db-4.0.14/dist/Makefile.in 2003-10-18 02:25:18.000000000 -0700
+@@ -105,8 +105,8 @@
+ JAVA_DBDIR= $(JAVA_SRCDIR)/$(JAVA_DBREL)
+ JAVA_EXDIR= $(JAVA_SRCDIR)/$(JAVA_EXREL)
+
+-libj_jarfile= db.jar
+-libj_exjarfile= dbexamples.jar
++libj_jarfile= db-$(SOVERSION).jar
++libj_exjarfile= dbexamples-$(SOVERSION).jar
+ libjso_base= libdb_java
+ libjso= $(libjso_base)-$(SOVERSION).@SOSUFFIX@
+ libjso_static= $(libjso_base)-$(SOVERSION).a
diff --git a/sys-libs/db/files/db-4.2-jarlocation.patch b/sys-libs/db/files/db-4.2-jarlocation.patch
new file mode 100644
index 000000000000..600f48a3a6d6
--- /dev/null
+++ b/sys-libs/db/files/db-4.2-jarlocation.patch
@@ -0,0 +1,16 @@
+diff -ur db-4.1.25.old/dist/Makefile.in db-4.1.25/dist/Makefile.in
+--- db-4.1.25.old/dist/Makefile.in 2003-10-18 02:15:45.000000000 -0700
++++ db-4.1.25/dist/Makefile.in 2003-10-18 02:13:47.000000000 -0700
+@@ -107,9 +107,9 @@
+ JAVA_EXDIR= $(JAVA_SRCDIR)/$(JAVA_EXREL)
+ JAVA_RPCDIR= $(srcdir)/rpc_server/java
+
+-libj_jarfile= db.jar
+-libj_exjarfile= dbexamples.jar
+-rpc_jarfile= dbsvc.jar
++libj_jarfile= db-4.2.jar
++libj_exjarfile= dbexamples-4.2.jar
++rpc_jarfile= dbsvc-4.2.jar
+ libjso_base= libdb_java
+ libjso= $(libjso_base)-$(SOVERSION).@JMODSUFFIX@
+ libjso_static= $(libjso_base)-$(SOVERSION).a
diff --git a/sys-libs/db/files/db-4.2-jni-check-prefix-first.patch b/sys-libs/db/files/db-4.2-jni-check-prefix-first.patch
new file mode 100644
index 000000000000..17f80e1bcfef
--- /dev/null
+++ b/sys-libs/db/files/db-4.2-jni-check-prefix-first.patch
@@ -0,0 +1,30 @@
+--- dist/aclocal_java/ac_jni_include_dirs.ac 2003-10-06 20:41:38.000000000 +0200
++++ dist/aclocal_java/ac_jni_include_dirs.ac 2005-09-23 21:31:26.000000000 +0200
+@@ -43,14 +43,19 @@
+ *) AC_MSG_ERROR([$_ACJNI_JAVAC is not an absolute path name]);;
+ esac
+
+-_ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
+-_JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
+-case "$host_os" in
+- darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
+- _JINC="$_JTOPDIR/Headers";;
+- *) _JINC="$_JTOPDIR/include";;
+-esac
+-
++# If JAVAPREFIX is defined, look there first
++if test -r "$JAVAPREFIX/include/jni.h"; then
++ _JTOPDIR="$JAVAPREFIX"
++ _JINC="$JAVAPREFIX/include"
++else
++ _ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
++ _JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
++ case "$host_os" in
++ darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
++ _JINC="$_JTOPDIR/Headers";;
++ *) _JINC="$_JTOPDIR/include";;
++ esac
++fi
+ # If we find jni.h in /usr/include, then it's not a java-only tree, so
+ # don't add /usr/include or subdirectories to the list of includes.
+ # An extra -I/usr/include can foul things up with newer gcc's.
diff --git a/sys-libs/db/files/db-4.2-libtool.patch b/sys-libs/db/files/db-4.2-libtool.patch
new file mode 100644
index 000000000000..a4a9db7f4557
--- /dev/null
+++ b/sys-libs/db/files/db-4.2-libtool.patch
@@ -0,0 +1,20 @@
+--- ./dist/configure.orig 2004-09-22 22:58:48.421632944 -0700
++++ ./dist/configure 2004-09-22 23:02:55.068136976 -0700
+@@ -5657,7 +5657,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+-case `"$LD" -v 2>&1 </dev/null` in
++case `$LD -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+@@ -11135,7 +11135,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+-case `"$LD" -v 2>&1 </dev/null` in
++case `$LD -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
diff --git a/sys-libs/db/files/db-4.2-listen-to-java-options.patch b/sys-libs/db/files/db-4.2-listen-to-java-options.patch
new file mode 100644
index 000000000000..8ddb46b70261
--- /dev/null
+++ b/sys-libs/db/files/db-4.2-listen-to-java-options.patch
@@ -0,0 +1,10 @@
+--- dist/configure.ac 2005-09-23 21:01:26.000000000 +0200
++++ dist/configure.ac 2005-09-23 20:59:20.000000000 +0200
+@@ -385,6 +385,7 @@
+ # A classpath that includes . is needed to check for Java
+ CLASSPATH=".:$CLASSPATH"
+ export CLASSPATH
++ AC_JAVA_OPTIONS
+ AC_PROG_JAVAC
+ AC_PROG_JAR
+ AC_PROG_JAVA
diff --git a/sys-libs/db/files/db-4.2.52_p2-TXN.patch b/sys-libs/db/files/db-4.2.52_p2-TXN.patch
new file mode 100644
index 000000000000..7ff8874c0ca8
--- /dev/null
+++ b/sys-libs/db/files/db-4.2.52_p2-TXN.patch
@@ -0,0 +1,68 @@
+This patch is intended to be applied to Berkeley DB 4.2.52 and,
+if applied, will automatically be used by slapd(8) back-bdb/hdb.
+Without this patch the BDB DB_LOG_AUTOREMOVE option will not work,
+nor will db_archive allow any transaction log files to be removed
+while slapd is running.
+
+The patch can be applied to the BDB source using patch(1) as follows
+ cd db-4.2.52
+ patch -p0 < openldap-src/build/BerkeleyDB42.patch
+
+(modify directory paths as necessary), then recompile and reinstall
+the BerkeleyDB 4.2 library, and then build and install OpenLDAP
+Software.
+
+The patch should not be applied to Berkeley DB 4.3.
+
+
+Index: dbinc/db.in
+===================================================================
+RCS file: /var/CVSROOT/bdb42/dbinc/db.in,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- dbinc/db.in 25 Nov 2003 21:58:02 -0000 1.1.1.1
++++ dbinc/db.in 17 Jul 2004 16:07:23 -0000 1.2
+@@ -839,6 +839,7 @@
+ #define TXN_NOWAIT 0x040 /* Do not wait on locks. */
+ #define TXN_RESTORED 0x080 /* Transaction has been restored. */
+ #define TXN_SYNC 0x100 /* Sync on prepare and commit. */
++#define TXN_NOLOG 0x200 /* Do not log this transaction. */
+ u_int32_t flags;
+ };
+
+Index: txn/txn.c
+===================================================================
+RCS file: /var/CVSROOT/bdb42/txn/txn.c,v
+retrieving revision 1.1.1.2
+retrieving revision 1.2
+diff -u -r1.1.1.2 -r1.2
+--- txn/txn.c 17 Dec 2003 21:43:53 -0000 1.1.1.2
++++ txn/txn.c 17 Jul 2004 16:07:27 -0000 1.2
+@@ -127,7 +127,7 @@
+ if ((ret = __db_fchk(dbenv,
+ "txn_begin", flags,
+ DB_DIRTY_READ | DB_TXN_NOWAIT |
+- DB_TXN_NOSYNC | DB_TXN_SYNC)) != 0)
++ DB_TXN_NOSYNC | DB_TXN_SYNC | DB_TXN_NOT_DURABLE)) != 0)
+ return (ret);
+ if ((ret = __db_fcchk(dbenv,
+ "txn_begin", flags, DB_TXN_NOSYNC, DB_TXN_SYNC)) != 0)
+@@ -193,6 +193,8 @@
+ F_SET(txn, TXN_SYNC);
+ if (LF_ISSET(DB_TXN_NOWAIT))
+ F_SET(txn, TXN_NOWAIT);
++ if (LF_ISSET(DB_TXN_NOT_DURABLE))
++ F_SET(txn, TXN_NOLOG);
+
+ if ((ret = __txn_begin_int(txn, 0)) != 0)
+ goto err;
+@@ -328,7 +330,7 @@
+ * We should set this value when we write the first log record, not
+ * here.
+ */
+- if (DBENV_LOGGING(dbenv))
++ if (DBENV_LOGGING(dbenv) && !F_ISSET(txn, TXN_NOLOG))
+ __log_txn_lsn(dbenv, &begin_lsn, NULL, NULL);
+ else
+ ZERO_LSN(begin_lsn);
diff --git a/sys-libs/db/files/db-4.3-jarlocation.patch b/sys-libs/db/files/db-4.3-jarlocation.patch
new file mode 100644
index 000000000000..17a342a7fca3
--- /dev/null
+++ b/sys-libs/db/files/db-4.3-jarlocation.patch
@@ -0,0 +1,16 @@
+diff -ur db-4.1.25.old/dist/Makefile.in db-4.1.25/dist/Makefile.in
+--- db-4.1.25.old/dist/Makefile.in 2003-10-18 02:15:45.000000000 -0700
++++ db-4.1.25/dist/Makefile.in 2003-10-18 02:13:47.000000000 -0700
+@@ -107,9 +107,9 @@
+ JAVA_EXDIR= $(JAVA_SRCDIR)/$(JAVA_EXREL)
+ JAVA_RPCDIR= $(srcdir)/rpc_server/java
+
+-libj_jarfile= db.jar
+-libj_exjarfile= dbexamples.jar
+-rpc_jarfile= dbsvc.jar
++libj_jarfile= db-4.3.jar
++libj_exjarfile= dbexamples-4.3.jar
++rpc_jarfile= dbsvc-4.3.jar
+ libjso_base= libdb_java
+ libjso= $(libjso_base)-$(SOVERSION).@JMODSUFFIX@
+ libjso_static= $(libjso_base)-$(SOVERSION).a
diff --git a/sys-libs/db/files/db-4.3-jni-check-prefix-first.patch b/sys-libs/db/files/db-4.3-jni-check-prefix-first.patch
new file mode 100644
index 000000000000..17f80e1bcfef
--- /dev/null
+++ b/sys-libs/db/files/db-4.3-jni-check-prefix-first.patch
@@ -0,0 +1,30 @@
+--- dist/aclocal_java/ac_jni_include_dirs.ac 2003-10-06 20:41:38.000000000 +0200
++++ dist/aclocal_java/ac_jni_include_dirs.ac 2005-09-23 21:31:26.000000000 +0200
+@@ -43,14 +43,19 @@
+ *) AC_MSG_ERROR([$_ACJNI_JAVAC is not an absolute path name]);;
+ esac
+
+-_ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
+-_JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
+-case "$host_os" in
+- darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
+- _JINC="$_JTOPDIR/Headers";;
+- *) _JINC="$_JTOPDIR/include";;
+-esac
+-
++# If JAVAPREFIX is defined, look there first
++if test -r "$JAVAPREFIX/include/jni.h"; then
++ _JTOPDIR="$JAVAPREFIX"
++ _JINC="$JAVAPREFIX/include"
++else
++ _ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
++ _JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
++ case "$host_os" in
++ darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
++ _JINC="$_JTOPDIR/Headers";;
++ *) _JINC="$_JTOPDIR/include";;
++ esac
++fi
+ # If we find jni.h in /usr/include, then it's not a java-only tree, so
+ # don't add /usr/include or subdirectories to the list of includes.
+ # An extra -I/usr/include can foul things up with newer gcc's.
diff --git a/sys-libs/db/files/db-4.3-libtool.patch b/sys-libs/db/files/db-4.3-libtool.patch
new file mode 100644
index 000000000000..426fd519f714
--- /dev/null
+++ b/sys-libs/db/files/db-4.3-libtool.patch
@@ -0,0 +1,47 @@
+--- dist/configure.orig 2005-02-02 11:22:49.596096072 +0100
++++ dist/configure 2005-02-02 11:23:46.749407448 +0100
+@@ -5684,7 +5684,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+-case `$LD -v 2>&1 </dev/null` in
++case `"$LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+@@ -8461,7 +8461,7 @@
+ tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds="$tmp_archive_cmds"
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+@@ -11383,7 +11383,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+-case `$LD -v 2>&1 </dev/null` in
++case `"$LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+@@ -15353,7 +15353,7 @@
+ tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds_F77="$tmp_archive_cmds"
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+@@ -17695,7 +17695,7 @@
+ tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds_GCJ="$tmp_archive_cmds"
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
diff --git a/sys-libs/db/files/db-4.3-listen-to-java-options.patch b/sys-libs/db/files/db-4.3-listen-to-java-options.patch
new file mode 100644
index 000000000000..8ddb46b70261
--- /dev/null
+++ b/sys-libs/db/files/db-4.3-listen-to-java-options.patch
@@ -0,0 +1,10 @@
+--- dist/configure.ac 2005-09-23 21:01:26.000000000 +0200
++++ dist/configure.ac 2005-09-23 20:59:20.000000000 +0200
+@@ -385,6 +385,7 @@
+ # A classpath that includes . is needed to check for Java
+ CLASSPATH=".:$CLASSPATH"
+ export CLASSPATH
++ AC_JAVA_OPTIONS
+ AC_PROG_JAVAC
+ AC_PROG_JAR
+ AC_PROG_JAVA
diff --git a/sys-libs/db/files/db-4.3.27-fix-dep-link.patch b/sys-libs/db/files/db-4.3.27-fix-dep-link.patch
new file mode 100644
index 000000000000..1d14e83d078c
--- /dev/null
+++ b/sys-libs/db/files/db-4.3.27-fix-dep-link.patch
@@ -0,0 +1,38 @@
+--- db-4.3.27/dist/Makefile.in.chris 2005-02-01 23:40:34.447945464 +0100
++++ db-4.3.27/dist/Makefile.in 2005-02-01 23:42:21.635650456 +0100
+@@ -58,7 +58,7 @@
+ LDFLAGS= @LDFLAGS@
+ LIBS= @LIBS@
+ TEST_LIBS= @TEST_LIBS@
+-LIBSO_LIBS= @LIBSO_LIBS@
++LIBSO_LIBS= @LIBSO_LIBS@ $(LIBS)
+
+ libdb_base= libdb
+ libdb= $(libdb_base).a
+@@ -77,7 +77,7 @@
+ CXX= @MAKEFILE_CXX@
+ CXXLINK= @MAKEFILE_CXXLINK@ @CXXFLAGS@
+ XSOLINK= @MAKEFILE_XSOLINK@ @CXXFLAGS@
+-LIBXSO_LIBS= @LIBXSO_LIBS@
++LIBXSO_LIBS= @LIBXSO_LIBS@ $(LIBS)
+
+ libcxx_base= libdb_cxx
+ libcxx= $(libcxx_base).a
+@@ -93,7 +93,7 @@
+ # Java support is optional and requires shared librarires.
+ ##################################################
+ CLASSPATH= $(JAVA_CLASSTOP)
+-LIBJSO_LIBS= @LIBJSO_LIBS@
++LIBJSO_LIBS= @LIBJSO_LIBS@ $(LIBS)
+
+ JAR= @JAR@
+ JAVAC= env CLASSPATH="$(CLASSPATH)" @JAVAC@
+@@ -126,7 +126,7 @@
+ # Tcl support is optional and requires shared libraries.
+ ##################################################
+ TCFLAGS= @TCFLAGS@
+-LIBTSO_LIBS= @LIBTSO_LIBS@
++LIBTSO_LIBS= @LIBTSO_LIBS@ $(LIBS)
+ libtso_base= libdb_tcl
+ libtso= $(libtso_base)-$(LIBVERSION)@MODSUFFIX@
+ libtso_static= $(libtso_base)-$(LIBVERSION).a
diff --git a/sys-libs/db/files/db-4.4-jarlocation.patch b/sys-libs/db/files/db-4.4-jarlocation.patch
new file mode 100644
index 000000000000..2d4bd4e46032
--- /dev/null
+++ b/sys-libs/db/files/db-4.4-jarlocation.patch
@@ -0,0 +1,16 @@
+diff -ur db-4.1.25.old/dist/Makefile.in db-4.1.25/dist/Makefile.in
+--- db-4.1.25.old/dist/Makefile.in 2003-10-18 02:15:45.000000000 -0700
++++ db-4.1.25/dist/Makefile.in 2003-10-18 02:13:47.000000000 -0700
+@@ -107,9 +107,9 @@
+ JAVA_EXDIR= $(JAVA_SRCDIR)/$(JAVA_EXREL)
+ JAVA_RPCDIR= $(srcdir)/rpc_server/java
+
+-libj_jarfile= db.jar
+-libj_exjarfile= dbexamples.jar
+-rpc_jarfile= dbsvc.jar
++libj_jarfile= db-4.5.jar
++libj_exjarfile= dbexamples-4.5.jar
++rpc_jarfile= dbsvc-4.5.jar
+ libjso_base= libdb_java
+ libjso= $(libjso_base)-$(SOVERSION).@JMODSUFFIX@
+ libjso_static= $(libjso_base)-$(SOVERSION).a
diff --git a/sys-libs/db/files/db-4.4-libtool.patch b/sys-libs/db/files/db-4.4-libtool.patch
new file mode 100644
index 000000000000..3d86b88f86b3
--- /dev/null
+++ b/sys-libs/db/files/db-4.4-libtool.patch
@@ -0,0 +1,47 @@
+--- dist/configure.orig 2006-01-31 10:23:58.000000000 +0100
++++ dist/configure 2006-01-31 10:26:43.000000000 +0100
+@@ -5765,7 +5765,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+-case `$LD -v 2>&1 </dev/null` in
++case `"$LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+@@ -8753,7 +8753,7 @@
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+@@ -11855,7 +11855,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+-case `$LD -v 2>&1 </dev/null` in
++case `"$LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+@@ -15842,7 +15842,7 @@
+ whole_archive_flag_spec_F77=
+ fi
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+@@ -18300,7 +18300,7 @@
+ whole_archive_flag_spec_GCJ=
+ fi
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
diff --git a/sys-libs/db/files/db-4.5-jarlocation.patch b/sys-libs/db/files/db-4.5-jarlocation.patch
new file mode 100644
index 000000000000..c0d689f43691
--- /dev/null
+++ b/sys-libs/db/files/db-4.5-jarlocation.patch
@@ -0,0 +1,16 @@
+diff -ur db-4.1.25.old/dist/Makefile.in db-4.1.25/dist/Makefile.in
+--- db-4.1.25.old/dist/Makefile.in 2003-10-18 02:15:45.000000000 -0700
++++ db-4.1.25/dist/Makefile.in 2003-10-18 02:13:47.000000000 -0700
+@@ -107,9 +107,9 @@
+ JAVA_EXDIR= $(JAVA_SRCDIR)/$(JAVA_EXREL)
+ JAVA_RPCDIR= $(srcdir)/rpc_server/java
+
+-libj_jarfile= db.jar
+-libj_exjarfile= dbexamples.jar
+-rpc_jarfile= dbsvc.jar
++libj_jarfile= db-4.4.jar
++libj_exjarfile= dbexamples-4.4.jar
++rpc_jarfile= dbsvc-4.4.jar
+ libjso_base= libdb_java
+ libjso= $(libjso_base)-$(SOVERSION).@JMODSUFFIX@
+ libjso_static= $(libjso_base)-$(SOVERSION).a
diff --git a/sys-libs/db/files/db-4.5-libtool.patch b/sys-libs/db/files/db-4.5-libtool.patch
new file mode 100644
index 000000000000..3d86b88f86b3
--- /dev/null
+++ b/sys-libs/db/files/db-4.5-libtool.patch
@@ -0,0 +1,47 @@
+--- dist/configure.orig 2006-01-31 10:23:58.000000000 +0100
++++ dist/configure 2006-01-31 10:26:43.000000000 +0100
+@@ -5765,7 +5765,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+-case `$LD -v 2>&1 </dev/null` in
++case `"$LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+@@ -8753,7 +8753,7 @@
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+@@ -11855,7 +11855,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+-case `$LD -v 2>&1 </dev/null` in
++case `"$LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+@@ -15842,7 +15842,7 @@
+ whole_archive_flag_spec_F77=
+ fi
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+@@ -18300,7 +18300,7 @@
+ whole_archive_flag_spec_GCJ=
+ fi
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
diff --git a/sys-libs/db/files/db-4.6-jarlocation.patch b/sys-libs/db/files/db-4.6-jarlocation.patch
new file mode 100644
index 000000000000..c0d689f43691
--- /dev/null
+++ b/sys-libs/db/files/db-4.6-jarlocation.patch
@@ -0,0 +1,16 @@
+diff -ur db-4.1.25.old/dist/Makefile.in db-4.1.25/dist/Makefile.in
+--- db-4.1.25.old/dist/Makefile.in 2003-10-18 02:15:45.000000000 -0700
++++ db-4.1.25/dist/Makefile.in 2003-10-18 02:13:47.000000000 -0700
+@@ -107,9 +107,9 @@
+ JAVA_EXDIR= $(JAVA_SRCDIR)/$(JAVA_EXREL)
+ JAVA_RPCDIR= $(srcdir)/rpc_server/java
+
+-libj_jarfile= db.jar
+-libj_exjarfile= dbexamples.jar
+-rpc_jarfile= dbsvc.jar
++libj_jarfile= db-4.4.jar
++libj_exjarfile= dbexamples-4.4.jar
++rpc_jarfile= dbsvc-4.4.jar
+ libjso_base= libdb_java
+ libjso= $(libjso_base)-$(SOVERSION).@JMODSUFFIX@
+ libjso_static= $(libjso_base)-$(SOVERSION).a
diff --git a/sys-libs/db/files/db-4.6-jni-check-prefix-first.patch b/sys-libs/db/files/db-4.6-jni-check-prefix-first.patch
new file mode 100644
index 000000000000..63735e62469f
--- /dev/null
+++ b/sys-libs/db/files/db-4.6-jni-check-prefix-first.patch
@@ -0,0 +1,30 @@
+--- dist/aclocal_java/ac_jni_include_dirs.m4 2003-10-06 20:41:38.000000000 +0200
++++ dist/aclocal_java/ac_jni_include_dirs.m4 2005-09-23 21:31:26.000000000 +0200
+@@ -43,14 +43,19 @@
+ *) AC_MSG_ERROR([$_ACJNI_JAVAC is not an absolute path name]);;
+ esac
+
+-_ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
+-_JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
+-case "$host_os" in
+- darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
+- _JINC="$_JTOPDIR/Headers";;
+- *) _JINC="$_JTOPDIR/include";;
+-esac
+-
++# If JAVAPREFIX is defined, look there first
++if test -r "$JAVAPREFIX/include/jni.h"; then
++ _JTOPDIR="$JAVAPREFIX"
++ _JINC="$JAVAPREFIX/include"
++else
++ _ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
++ _JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
++ case "$host_os" in
++ darwin*) _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
++ _JINC="$_JTOPDIR/Headers";;
++ *) _JINC="$_JTOPDIR/include";;
++ esac
++fi
+ # If we find jni.h in /usr/include, then it's not a java-only tree, so
+ # don't add /usr/include or subdirectories to the list of includes.
+ # An extra -I/usr/include can foul things up with newer gcc's.
diff --git a/sys-libs/db/files/db-4.6-libtool.patch b/sys-libs/db/files/db-4.6-libtool.patch
new file mode 100644
index 000000000000..3d86b88f86b3
--- /dev/null
+++ b/sys-libs/db/files/db-4.6-libtool.patch
@@ -0,0 +1,47 @@
+--- dist/configure.orig 2006-01-31 10:23:58.000000000 +0100
++++ dist/configure 2006-01-31 10:26:43.000000000 +0100
+@@ -5765,7 +5765,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+-case `$LD -v 2>&1 </dev/null` in
++case `"$LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+@@ -8753,7 +8753,7 @@
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+@@ -11855,7 +11855,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+-case `$LD -v 2>&1 </dev/null` in
++case `"$LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+@@ -15842,7 +15842,7 @@
+ whole_archive_flag_spec_F77=
+ fi
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+@@ -18300,7 +18300,7 @@
+ whole_archive_flag_spec_GCJ=
+ fi
+ supports_anon_versioning=no
+- case `$LD -v 2>/dev/null` in
++ case `"$LD" -v 2>/dev/null` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
diff --git a/sys-libs/db/files/db-4.8-libtool.patch b/sys-libs/db/files/db-4.8-libtool.patch
new file mode 100644
index 000000000000..f5d985b2f209
--- /dev/null
+++ b/sys-libs/db/files/db-4.8-libtool.patch
@@ -0,0 +1,65 @@
+--- dist/configure
++++ dist/configure
+@@ -6691,7 +6691,7 @@
+ $as_echo_n "(cached) " >&6
+ else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+-case `$LD -v 2>&1 </dev/null` in
++case `"$LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+@@ -7348,7 +7348,7 @@
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+- case $LD in
++ case "$LD" in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+@@ -10664,7 +10664,7 @@
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+- case `$LD -v 2>&1` in
++ case `"$LD" -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+@@ -10858,7 +10858,7 @@
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+- case `$LD -v 2>&1` in
++ case `"$LD" -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+@@ -12206,7 +12206,7 @@
+ libsuff= shlibsuff=
+ ;;
+ *)
+- case $LD in # libtool.m4 will add one of these switches to LD
++ case "$LD" in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+@@ -13423,7 +13423,7 @@
+ $as_echo_n "(cached) " >&6
+ else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+-case `$LD -v 2>&1 </dev/null` in
++case `"$LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+@@ -15672,7 +15672,7 @@
+ libsuff= shlibsuff=
+ ;;
+ *)
+- case $LD in # libtool.m4 will add one of these switches to LD
++ case "$LD" in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
diff --git a/sys-libs/db/files/db-4.8.24-java-manifest-location.patch b/sys-libs/db/files/db-4.8.24-java-manifest-location.patch
new file mode 100644
index 000000000000..9cebadc52064
--- /dev/null
+++ b/sys-libs/db/files/db-4.8.24-java-manifest-location.patch
@@ -0,0 +1,12 @@
+diff -Nuar db-4.8.24.orig/dist/Makefile.in db-4.8.24/dist/Makefile.in
+--- db-4.8.24.orig/dist/Makefile.in 2009-09-19 23:39:45.286001896 +0000
++++ db-4.8.24/dist/Makefile.in 2009-09-19 23:41:13.079326882 +0000
+@@ -830,7 +830,7 @@
+ $(JAVA) -classpath $(JAVA_CLASSTOP) \
+ com.sleepycat.persist.model.ClassEnhancer $(JAVA_CLASSTOP)
+ cd $(JAVA_CLASSTOP) && \
+- $(JAR) cfm ../$(libj_jarfile) ../$(JAVA_MANIFEST) ./com/sleepycat
++ $(JAR) cfm ../$(libj_jarfile) $(JAVA_MANIFEST) ./com/sleepycat
+
+ $(libj_exjarfile): $(libj_jarfile) $(JAVA_EXSRCS)
+ @test -d $(JAVA_EXCLASSTOP) || \
diff --git a/sys-libs/db/files/db-4.8.30-rename-atomic-compare-exchange.patch b/sys-libs/db/files/db-4.8.30-rename-atomic-compare-exchange.patch
new file mode 100644
index 000000000000..c53160a82970
--- /dev/null
+++ b/sys-libs/db/files/db-4.8.30-rename-atomic-compare-exchange.patch
@@ -0,0 +1,22 @@
+diff --git a/dbinc/atomic.h b/dbinc/atomic.h
+index 0034dcc..fa7ba93 100644
+--- a/dbinc/atomic.h
++++ b/dbinc/atomic.h
+@@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val;
+ #define atomic_inc(env, p) __atomic_inc(p)
+ #define atomic_dec(env, p) __atomic_dec(p)
+ #define atomic_compare_exchange(env, p, o, n) \
+- __atomic_compare_exchange((p), (o), (n))
++ __db_atomic_compare_exchange((p), (o), (n))
+ static inline int __atomic_inc(db_atomic_t *p)
+ {
+ int temp;
+@@ -176,7 +176,7 @@ static inline int __atomic_dec(db_atomic_t *p)
+ * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html
+ * which configure could be changed to use.
+ */
+-static inline int __atomic_compare_exchange(
++static inline int __db_atomic_compare_exchange(
+ db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)
+ {
+ atomic_value_t was;
diff --git a/sys-libs/db/files/db-5.0.21-enable-dbm-autoconf.patch b/sys-libs/db/files/db-5.0.21-enable-dbm-autoconf.patch
new file mode 100644
index 000000000000..5405206fc516
--- /dev/null
+++ b/sys-libs/db/files/db-5.0.21-enable-dbm-autoconf.patch
@@ -0,0 +1,49 @@
+The autoconf from upstream never built DBM even if you wanted it, because
+enable_build_dbm was never true with --enable-dbm. The only time you actually
+got it before was when you had selected the testsuite.
+
+Fixed up that, and the entire reversed logic, and just throw away the useless
+db_cv_build_dbm variable entirely.
+
+Correct logic is:
+if(--enable-dbm || --enable-test) {
+ Build DBM
+}
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+diff -Nuar db-5.0.21.orig//dist/aclocal/options.m4 db-5.0.21//dist/aclocal/options.m4
+--- db-5.0.21.orig//dist/aclocal/options.m4 2010-03-30 10:36:10.000000000 -0700
++++ db-5.0.21//dist/aclocal/options.m4 2010-05-13 13:49:23.889947877 -0700
+@@ -274,15 +274,11 @@
+ AC_MSG_RESULT($db_cv_test)
+
+ AC_MSG_CHECKING(if --enable-dbm option specified)
+-AC_ARG_ENABLE(build_dbm,
++AC_ARG_ENABLE(dbm,
+ [AC_HELP_STRING([--enable-dbm],
+ [Configure to enable the historic dbm interface.])],
+- [db_cv_build_dbm="$enable_dbm"], enableval="$db_cv_test")
+-db_cv_build_dbm="$enableval"
+-case "$enableval" in
+- no) AC_MSG_RESULT(yes);;
+-yes) AC_MSG_RESULT(no);;
+-esac
++ [db_cv_dbm="$enable_dbm"], [db_cv_dbm="$db_cv_test"])
++AC_MSG_RESULT($db_cv_dbm)
+
+ AC_MSG_CHECKING(if --enable-dtrace option specified)
+ AC_ARG_ENABLE(dtrace,
+diff -Nuar db-5.0.21.orig//dist/configure.ac db-5.0.21//dist/configure.ac
+--- db-5.0.21.orig//dist/configure.ac 2010-05-13 13:41:26.415822427 -0700
++++ db-5.0.21//dist/configure.ac 2010-05-13 13:48:59.185822961 -0700
+@@ -973,7 +973,8 @@
+ fi
+
+ # The DBM API can be disabled.
+-if test "$db_cv_build_dbm" = "yes"; then
++
++if test "$db_cv_dbm" = "yes"; then
+ AC_DEFINE(HAVE_DBM)
+ AH_TEMPLATE(HAVE_DBM, [Define to 1 if building the DBM API.])
+ ADDITIONAL_OBJS="$ADDITIONAL_OBJS dbm${o} hsearch${o}"
diff --git a/sys-libs/db/files/db-5.2.28-sqlite-configure-path.patch b/sys-libs/db/files/db-5.2.28-sqlite-configure-path.patch
new file mode 100644
index 000000000000..ff7abbe1fd79
--- /dev/null
+++ b/sys-libs/db/files/db-5.2.28-sqlite-configure-path.patch
@@ -0,0 +1,12 @@
+diff -Nuar db-5.2.28.orig//dist/aclocal/sql.m4 db-5.2.28//dist/aclocal/sql.m4
+--- db-5.2.28.orig//dist/aclocal/sql.m4 2011-06-10 09:50:45.000000000 -0700
++++ db-5.2.28//dist/aclocal/sql.m4 2011-07-15 17:02:54.646521189 -0700
+@@ -91,7 +91,7 @@
+ # !!! END COPIED from autoconf distribution
+
+ sqlite_dir=$srcdir/../lang/sql/sqlite
+-(cd sql && eval "\$SHELL ../$sqlite_dir/configure --disable-option-checking $ac_sub_configure_args CPPFLAGS=\"-I.. $CPPFLAGS\" --enable-amalgamation=$db_cv_sql_amalgamation --enable-readline=$with_readline" && cat build_config.h >> config.h) || exit 1
++(cd sql && eval "\$SHELL $sqlite_dir/configure --disable-option-checking $ac_sub_configure_args CPPFLAGS=\"-I.. $CPPFLAGS\" --enable-amalgamation=$db_cv_sql_amalgamation --enable-readline=$with_readline" && cat build_config.h >> config.h) || exit 1
+
+ # Configure JDBC if --enable-jdbc
+ if test "$db_cv_jdbc" != "no"; then
diff --git a/sys-libs/db/files/db-6.0.19-sqlite-configure-path.patch b/sys-libs/db/files/db-6.0.19-sqlite-configure-path.patch
new file mode 100644
index 000000000000..78a2ba3ea8aa
--- /dev/null
+++ b/sys-libs/db/files/db-6.0.19-sqlite-configure-path.patch
@@ -0,0 +1,11 @@
+--- db-6.0.19/dist/aclocal/sql.m4
++++ db-6.0.19/dist/aclocal/sql.m4
+@@ -96,7 +96,7 @@
+ if test "$db_cv_build_cryptography" = "yes"; then
+ CPPFLAGS="$CPPFLAGS -DSQLITE_HAS_CODEC=1"
+ fi
+-(cd sql && eval "\$SHELL ../$sqlite_dir/configure --disable-option-checking $ac_sub_configure_args CPPFLAGS=\"-I.. $CPPFLAGS\" --enable-amalgamation=$db_cv_sql_amalgamation --enable-readline=$with_readline " && cat build_config.h >> config.h) || exit 1
++(cd sql && eval "\$SHELL $sqlite_dir/configure --disable-option-checking $ac_sub_configure_args CPPFLAGS=\"-I.. $CPPFLAGS\" --enable-amalgamation=$db_cv_sql_amalgamation --enable-readline=$with_readline " && cat build_config.h >> config.h) || exit 1
+ CPPFLAGS="$orig_CPPFLAGS"
+
+ # Configure JDBC if --enable-jdbc
diff --git a/sys-libs/db/files/db-6.0.20-test-link.patch b/sys-libs/db/files/db-6.0.20-test-link.patch
new file mode 100644
index 000000000000..8aceaa4d6f8c
--- /dev/null
+++ b/sys-libs/db/files/db-6.0.20-test-link.patch
@@ -0,0 +1,38 @@
+diff -Nuar db-6.0.20.orig/test/tcl/parallel.tcl db-6.0.20/test/tcl/parallel.tcl
+--- db-6.0.20.orig/test/tcl/parallel.tcl 2013-07-04 15:49:43.408348040 +0000
++++ db-6.0.20/test/tcl/parallel.tcl 2013-07-04 17:40:07.147943377 +0000
+@@ -289,16 +289,26 @@
+ [eval glob -nocomplain {$dir/$buildpath/db_{reptest,repsite,replicate}$EXE}] \
+ $destdir/$buildpath}
+ }
++ catch {
++ set l [eval glob {$dir/.libs} {$dir/db_{checkpoint,deadlock}$EXE} \
++ {$dir/db_{dump,load,printlog,recover,stat,upgrade}$EXE} \
++ {$dir/db_{archive,verify,hotbackup,log_verify}$EXE}]
++ foreach fn $l {
++ set fbasename [file tail $fn]
++ eval file link {$destdir/$fbasename} $fn
++ }
++ }
++ # we will be modifying this file, so we must copy, not link
+ catch {eval file copy \
+- [eval glob {$dir/{.libs,include.tcl}}] $destdir}
++ [eval glob {$dir/include.tcl}] $destdir}
+ # catch {eval file copy $dir/$queuedir $destdir}
+- catch {eval file copy \
+- [eval glob {$dir/db_{checkpoint,deadlock}$EXE} \
+- {$dir/db_{dump,load,printlog,recover,stat,upgrade}$EXE} \
+- {$dir/db_{archive,verify,hotbackup,log_verify}$EXE}] \
+- $destdir}
+- catch {eval file copy \
+- [eval glob -nocomplain {$dir/db_{reptest,repsite,replicate}$EXE}] $destdir}
++ catch {
++ set l [eval glob -nocomplain {$dir/db_{reptest,repsite,replicate}$EXE}]
++ foreach fn $l {
++ set fbasename [file tail $fn]
++ eval file link {$destdir/$fbasename} $fn
++ }
++ }
+
+ # Create modified copies of include.tcl in parallel
+ # directories so paths still work.
diff --git a/sys-libs/db/files/db-6.0.35-sqlite-configure-path.patch b/sys-libs/db/files/db-6.0.35-sqlite-configure-path.patch
new file mode 100644
index 000000000000..c239bb118a82
--- /dev/null
+++ b/sys-libs/db/files/db-6.0.35-sqlite-configure-path.patch
@@ -0,0 +1,11 @@
+--- db-6.0.35/dist/aclocal/sql.m4
++++ db-6.0.35/dist/aclocal/sql.m4
+@@ -96,7 +96,7 @@
+ if test "$db_cv_build_cryptography" = "yes"; then
+ CPPFLAGS="$CPPFLAGS -DSQLITE_HAS_CODEC=1"
+ fi
+-(cd sql && eval "\$SHELL ../$sqlite_dir/configure --disable-option-checking $ac_sub_configure_args CPPFLAGS=\"-I.. $CPPFLAGS\" --enable-amalgamation=$db_cv_sql_amalgamation --enable-readline=$with_readline " && cat build_config.h >> config.h) || exit 1
++(cd sql && eval "\$SHELL $sqlite_dir/configure --disable-option-checking $ac_sub_configure_args CPPFLAGS=\"-I.. $CPPFLAGS\" --enable-amalgamation=$db_cv_sql_amalgamation --enable-readline=$with_readline " && cat build_config.h >> config.h) || exit 1
+
+ # Configure JDBC if --enable-jdbc
+ if test "$db_cv_jdbc" != "no"; then
diff --git a/sys-libs/db/files/db-6.1.19-sqlite-configure-path.patch b/sys-libs/db/files/db-6.1.19-sqlite-configure-path.patch
new file mode 100644
index 000000000000..25854c53e160
--- /dev/null
+++ b/sys-libs/db/files/db-6.1.19-sqlite-configure-path.patch
@@ -0,0 +1,10 @@
+--- db-6.1.19/dist/aclocal/sql.m4
++++ db-6.1.19/dist/aclocal/sql.m4
+@@ -96,6 +96,6 @@
+ if test "$db_cv_build_cryptography" = "yes"; then
+ CPPFLAGS="$CPPFLAGS -DSQLITE_HAS_CODEC=1"
+ fi
+-(cd sql && eval "\$SHELL ../$sqlite_dir/configure --disable-option-checking $ac_sub_configure_args CPPFLAGS=\"-I.. $CPPFLAGS\" --enable-amalgamation=$db_cv_sql_amalgamation --enable-readline=$with_readline " && cat build_config.h >> config.h) || exit 1
++(cd sql && eval "\$SHELL $sqlite_dir/configure --disable-option-checking $ac_sub_configure_args CPPFLAGS=\"-I.. $CPPFLAGS\" --enable-amalgamation=$db_cv_sql_amalgamation --enable-readline=$with_readline " && cat build_config.h >> config.h) || exit 1
+
+ # Configure JDBC if --enable-jdbc