aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Shelton <stuart@shelton.me>2017-09-28 19:33:01 +0100
committerStuart Shelton <stuart@shelton.me>2017-10-01 11:43:30 +0100
commit7f96523d62fcfe01027a2bb20ff7a74a250ebc0e (patch)
tree40e50d8e77000e7523e038b951c08f0820feef2f /sys-libs
parentUpdate dev-db/mongodb-3.2.16 (diff)
downloadsrcshelton-7f96523d62fcfe01027a2bb20ff7a74a250ebc0e.tar.gz
srcshelton-7f96523d62fcfe01027a2bb20ff7a74a250ebc0e.tar.bz2
srcshelton-7f96523d62fcfe01027a2bb20ff7a74a250ebc0e.zip
Add sys-libs/db-5.3.28-r3, sys-libs/db-6.0.35-r1, update sys-libs/db-5.1.29-r1, sys-libs/db-5.3.28-r2
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/db/Manifest9
-rw-r--r--sys-libs/db/db-5.1.29-r1.ebuild17
-rw-r--r--sys-libs/db/db-5.3.28-r2.ebuild22
-rw-r--r--sys-libs/db/db-5.3.28-r3.ebuild281
-rw-r--r--sys-libs/db/db-6.0.35-r1.ebuild279
-rw-r--r--sys-libs/db/files/db-6.0.35-sqlite-configure-path.patch11
-rw-r--r--sys-libs/db/files/db-6.0.35-winnt.patch110
7 files changed, 717 insertions, 12 deletions
diff --git a/sys-libs/db/Manifest b/sys-libs/db/Manifest
index 0b0c6d8e..b3cab02e 100644
--- a/sys-libs/db/Manifest
+++ b/sys-libs/db/Manifest
@@ -8,8 +8,13 @@ AUX db-5.1-clang-builtins.patch 836 SHA256 2f02b953d32a12ad2c95323dbbeceb9e5c02e
AUX db-5.1.29-rename-atomic-compare-exchange.patch 852 SHA256 a9f9e73018a275079e70d5eb9819d09c7c64356b813992a824aef04b268b1be2 SHA512 8ba96cfc3e484a839b8651214f0769b35273c6235de7e53d5118eb0347f5a477f75e3336a12f1399b7748c6b6ab95aec39c8b813d7b227dd61f37ed4ab52f7d5 WHIRLPOOL 1b2745a6b0897f05071e6e2a938655f0e6d575e5877686e67716d79eb9cc26397c57ef517ad59721dfd2534e29f7143eefb3d352b68610bc6d3e863e64adc47b
AUX db-5.2.28-sqlite-configure-path.patch 906 SHA256 94e36064e3414d644cc1a157c011a80fdf28df66b0da4b7df69d078735d152fe SHA512 ed0e683313f780975b3aec60018b08569ebdd38e4cdf60de170ef0bc4fc63d602e7a5572792f2634f3680e763b74ffdb0a5b484562a10a4b82b28b19c3acc565 WHIRLPOOL d557e9040e05b1543cc1cf8b9a2ab4d033498004924115be37ad781a1765acc740abd230cf44a196aa1072ab63c57044f7fb84e651436d03cbe0cd8055819e6c
AUX db-6.0.20-test-link.patch 1568 SHA256 cbfa6444aea5927328f1dc8942d082582dbfc0b39b5a93406a310aedfe9b6c3b SHA512 0e091949a071e76439cae4bb37cfdd6c4e4f586c15adbaa6d5d1c9cca5a4982f8e5960d968b41c4368d99556a95b172a6ef1331daf90fb87a77567fc7343f980 WHIRLPOOL e3c66e554c0ae78208508847e90aa922f6b9c30a797049511bfe76da8cec368d5bf3e32369556d2df5a93b40e724da58dac3713ad59ccc8d03adde847beeb116
+AUX db-6.0.35-sqlite-configure-path.patch 764 SHA256 b25282ad2599a980b7e2f7a0a4394af52edf1808dbe4c312f18dc49ce2f92757 SHA512 acb6aa901d62a5c5f4ae22e9d2e0bb89101038a3e91c2d65845cd514cdb0e38c3aa15645701024dc5ed39372850362a24b47faa96a0a81f8149958d8ebabdf17 WHIRLPOOL 69cbe3cfec3f53e5c98a127e765dfc0d6f4885d51df99560b6ee0aac2c7cf181ac3b2a479eb13c2ca338b94e4f75f230542870d5a7d99ff62c0bf365f0560b30
+AUX db-6.0.35-winnt.patch 3688 SHA256 8594712a50b43c943b146b4df24b280b31924f42b593f8d659cbfe7bc450d3c5 SHA512 dc5facfc3ae75adab700d0d9063f955704eee0fc278d3d0f37f17c0c3f49e37cd127e8b2d47d4bf9ae64f0c65db5f12cff8f20381ae55562e2d4daebca0e6bce WHIRLPOOL ada491bfec3a2666446649c084c796fe0ed1ffb7e323908244a7a47fed878ca6d9ec697d4ef0957fb6989122db9f427299ec5f38f304649fff3922a99ab40877
AUX db-6.2-c++11.patch 5042 SHA256 2e9a778c76885e1274e6c761122ad0a26f7b750d27119acb4cc171fa5b55475f SHA512 da37ec833304f041169f3c6b6f7183ba527c46ca255dd81c6daba7854975728c78512dcea48a1f74b1fbbbd9f16d1819c6b9c0c3de7a45dccb843ae90a242317 WHIRLPOOL a90ada2a2566e3abbeaa5864cd03e25640bbf05264608cc4095f2e67ad97a56036286eb9c2a10f36e0173679667dad371245b506bab27b902e08010d35c394c5
DIST db-5.1.29.tar.gz 32188074 SHA256 a943cb4920e62df71de1069ddca486d408f6d7a09ddbbb5637afe7a229389182 SHA512 b3487161cc09dd0aee6117d685d0bc0a58854cf5e96f9e778969a51d3a61b66f8e007b76e584e4ef73f84e07d4418b89c2f6697e34c1ad4072609b11b7b4c5b0 WHIRLPOOL c2c5e335a8ed85f9dd947eb8225148c9633d21f5e17d321a6938b50d4bf061e735563cdbefb8c8aa457923ef80e778f95ad80aba4a92a381432ecf52c2a25353
DIST db-5.3.28.tar.gz 35090431 SHA256 e0a992d740709892e81f9d93f06daf305cf73fb81b545afe72478043172c3628 SHA512 e91bbe550fc147a8be7e69ade86fdb7066453814971b2b0223f7d17712bd029a8eff5b2b6b238042ff6ec1ffa6879d44cb95c5645a922fee305c26c3eeaee090 WHIRLPOOL ad9042c4509ece1cae42ade4734f69d59a9ec946a85bd486063a7e8f9fa1ae3f925b71f0475fef05a27d33f695ef82ffd06fbaadbd7dc5bfaa77a8caacf9d1dc
-EBUILD db-5.1.29-r1.ebuild 7043 SHA256 e2ddae9e03f30ea2fd2183434fc267fda911faaf29080d484416512541459c5f SHA512 4791f9def576bd760fc4ff3715e6cc2512069cd2096443569501e01cc731ea629e6b1cf9fb783a8c7fecdee6493c2801fd57b7e647eb0b3e23726c2890e49e9d WHIRLPOOL a987543d8fb70cc1fe85a414b7f096ff1e6ec1799f75a805e54330c0c0077a09b14f5922d9caf3b28a340fa2ce91cbeae877de12a6b1b55eb1ddbfad7ea23e31
-EBUILD db-5.3.28-r2.ebuild 7874 SHA256 bc50164965b2d1a1a12d30e865219fdec7375866878c41027e3e0386eaada8e3 SHA512 4b68748ac583f82304f4086a89ba2fea3818ee8b622fe5d7b7fdf8c2c15905474c6c7cd4c7b65040b63cd181b89426190b97565ebd633f3abd27c11f320c7392 WHIRLPOOL 7b123ba4f516b073c69ee6fbde1df967d6cf7a24de5f2f6225dd40a6a15510065c32960a8bd0ef4902d4ea7b10db635714d431130cbcb0eb3ddea2ea14a6bbb6
+DIST db-6.0.35.tar.gz 36532251 SHA256 24421affa8ae436fe427ae4f5f2d1634da83d3d55a5ad6354a98eeedb825de55 SHA512 002db1553def44efa715095b04b2bac2de7450cdc7142586d1d8b5d8ce79ee5e98f824b3bd276cd586ca932dc51ed35a9ffbed95b2b9847264f262cfa092479d WHIRLPOOL ebbbe7dd0969a36d06c8cc5618a0f61334396b38671b9b1c2523e3d1d3ba687903242acd23999be3efec45e1ea6b9c7f0f9f5acbb54d8d1dc48bba51d196c487
+EBUILD db-5.1.29-r1.ebuild 6982 SHA256 b557552f9b1e23ea4136c56c50460761dd9c9442e17935ae2688c5267875ce17 SHA512 c0ef960ca29f164be3ad632d3cb269fb3a2902fe0af619bdba748e6c7779cd46a2f44b074e800d1b573e1acf144dcddda6ca1813b3a57b86713eab3befa67b5e WHIRLPOOL d8f65d7de2856aa0ebd6d13bdba30f9fc01f1fa700881b0e55854178d67c9e802a2787067c6b29f8231c17812271908e515239b1c27f0b7273fcff775c178db4
+EBUILD db-5.3.28-r2.ebuild 8442 SHA256 e82a4e152dc81ec783f096794179644fdb3fca7fed021e96d84c7e766e87a10d SHA512 76182dc8c47ba470518299c88eb88d420dad31b71bcd1071bb304c6b08fbe4a0877423f6b063417a7e600819246b8710a29c42872fe15c990a06b2cf7c7e77cf WHIRLPOOL b483df1566b4497827c994ffb5348dbbc9a96169acff19171e2e47444ec7d2df46d654a5d56e54bd88c589abc9ae60af08618cda32b583dda785a0f8ab32f3a3
+EBUILD db-5.3.28-r3.ebuild 8556 SHA256 46f06903055c51d6f408d86fb5e9771ae776ed44ef77b06ecbd370a005295859 SHA512 82b47de8abdcb31c2e6ef7242f674085b347cc4e19dfb2a6b8b4647ae082b3da2b3a1ff51452e8ea74756ed0a93dfb48fb5e0dabedac563c21229dfe15d87502 WHIRLPOOL a51d06fa53cc26f39dda2c10d3f16cfaaa1cbb3db05d7637d8cc10359823c119271aedb6ec782f086885613239cae8eee2847f62364a40ed91007c89ccf55610
+EBUILD db-6.0.35-r1.ebuild 8561 SHA256 5a1ab5f2d30a5a69f26695422f64c2ff4ae5d4d0c5fd89b7dcde92a43b09dee6 SHA512 314018dd471943be923261b93ff025fd781e577bb35a544859b97bf7d294ffadab9ff7e86f36e509c670df66eb9d52abf1e965bcc60682f874f5ff0eaa850eea WHIRLPOOL efc0f043310e2e29697c756fa6a1caf367de811b65bf6dfd1205dd4bca3f6239a29084af10e3a515fc75154f6df989f1ede5e6c152041121cfc1eeac72731750
diff --git a/sys-libs/db/db-5.1.29-r1.ebuild b/sys-libs/db/db-5.1.29-r1.ebuild
index 867c347a..2c03022e 100644
--- a/sys-libs/db/db-5.1.29-r1.ebuild
+++ b/sys-libs/db/db-5.1.29-r1.ebuild
@@ -1,7 +1,5 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Id: f3aa99b46c3d267991805249a834c2121858cf18 $
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/db/db-5.1.29-r1.ebuild,v 1.3 2015/03/20 14:41:50 jlec Exp $
EAPI=5
inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib toolchain-funcs
@@ -144,11 +142,16 @@ src_configure() {
--with-javac-flags="$(java-pkg_javac-args)"
fi
- # Add linker versions to the symbols. Easier to do, and safer than header file
- # mumbo jumbo.
- if [[ ${CHOST} == *-linux-gnu* || ${CHOST} == *-solaris* ]] || use userland_GNU ; then
- # we hopefully use a GNU binutils linker in this case
- [[ ${CC} == *clang* ]] || append-ldflags -Wl,--default-symver
+ if [[ ${CC} == *clang* ]]; then
+ append-cflags -stdlib=libstdc++
+ append-cxxflags -stdlib=libstdc++
+ else
+ # Add linker versions to the symbols. Easier to do, and safer than header file
+ # mumbo jumbo.
+ if [[ ${CHOST} == *-linux-gnu* || ${CHOST} == *-solaris* ]] || use userland_GNU ; then
+ # we hopefully use a GNU binutils linker in this case
+ append-ldflags -Wl,--default-symver
+ fi
fi
tc-export CC CXX # would use CC=xlc_r on aix if not set
diff --git a/sys-libs/db/db-5.3.28-r2.ebuild b/sys-libs/db/db-5.3.28-r2.ebuild
index 9b18b086..a7384734 100644
--- a/sys-libs/db/db-5.3.28-r2.ebuild
+++ b/sys-libs/db/db-5.3.28-r2.ebuild
@@ -57,6 +57,10 @@ src_prepare() {
# bug #510506
epatch "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
+ # Set of patches to make this thing compile with C++11, Oracle
+ # promised to fix this for the next release
+ # https://community.oracle.com/thread/3952592
+ epatch "${FILESDIR}"/${PN}-6.2-c++11.patch
pushd dist > /dev/null || die "Cannot cd to 'dist'"
@@ -75,12 +79,12 @@ src_prepare() {
#see code below
#sh ./s_config || die "Cannot execute ./s_config"
- popd > /dev/null
-
# use the includes from the prefix
epatch "${FILESDIR}"/${PN}-4.6-jni-check-prefix-first.patch
epatch "${FILESDIR}"/${PN}-4.3-listen-to-java-options.patch
+ popd > /dev/null
+
# sqlite configure call has an extra leading ..
# upstreamed:5.2.36, missing in 5.3.x
epatch "${FILESDIR}"/${PN}-5.2.28-sqlite-configure-path.patch
@@ -92,6 +96,8 @@ src_prepare() {
# Needed when compiling with clang
epatch "${FILESDIR}"/${PN}-5.1.29-rename-atomic-compare-exchange.patch
+ epatch "${FILESDIR}"/${PN}-6.0.35-winnt.patch
+
# Upstream release script grabs the dates when the script was run, so lets
# end-run them to keep the date the same.
export REAL_DB_RELEASE_DATE="$(awk \
@@ -172,6 +178,14 @@ multilib_src_configure() {
myconf+=(--disable-tcl )
fi
+ if [[ ${CHOST} == *-winnt* ]]; then
+ # this one should really say --enable-windows, but
+ # seems the db devs only support mingw ... doesn't enable
+ # anything too specific to mingw.
+ myconf+=(--enable-mingw)
+ myconf+=(--with-mutex=win32)
+ fi
+
# sql_compat will cause a collision with sqlite3
# --enable-sql_compat
ECONF_SOURCE="${S_BASE}"/dist \
@@ -201,7 +215,9 @@ multilib_src_install() {
db_src_install_usrlibcleanup
if multilib_is_native_abi && use java; then
- java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
+ local ext=so
+ [[ ${CHOST} == *-darwin* ]] && ext=jnilib #313085
+ java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.${ext}
java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
fi
diff --git a/sys-libs/db/db-5.3.28-r3.ebuild b/sys-libs/db/db-5.3.28-r3.ebuild
new file mode 100644
index 00000000..830f1ed4
--- /dev/null
+++ b/sys-libs/db/db-5.3.28-r3.ebuild
@@ -0,0 +1,281 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib multilib-minimal toolchain-funcs
+
+#Number of official patches
+#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
+PATCHNO=${PV/*.*.*_p}
+if [[ ${PATCHNO} == "${PV}" ]] ; then
+ MY_PV=${PV}
+ MY_P=${P}
+ PATCHNO=0
+else
+ MY_PV=${PV/_p${PATCHNO}}
+ MY_P=${PN}-${MY_PV}
+fi
+
+S_BASE="${WORKDIR}/${MY_P}"
+S="${S_BASE}/build_unix"
+DESCRIPTION="Oracle Berkeley DB"
+HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
+SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
+for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
+ export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
+done
+
+LICENSE="Sleepycat"
+SLOT="5.3"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+KEYWORDS+="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+IUSE="doc java cxx tcl test"
+
+REQUIRED_USE="test? ( tcl )"
+
+# the entire testsuite needs the TCL functionality
+DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jdk-1.5 )
+ || ( sys-devel/binutils-apple
+ sys-devel/native-cctools
+ >=sys-devel/binutils-2.16.1
+ )"
+RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jre-1.5 )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/db5.3/db.h
+)
+
+src_prepare() {
+ cd "${WORKDIR}"/"${MY_P}"
+ for (( i=1 ; i<=${PATCHNO} ; i++ ))
+ do
+ epatch "${DISTDIR}"/patch."${MY_PV}"."${i}"
+ done
+
+ # bug #510506
+ epatch "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
+ # Set of patches to make this thing compile with C++11, Oracle
+ # promised to fix this for the next release
+ # https://community.oracle.com/thread/3952592
+ epatch "${FILESDIR}"/${PN}-6.2-c++11.patch
+
+ pushd dist > /dev/null || die "Cannot cd to 'dist'"
+
+ # need to upgrade local copy of libtool.m4
+ # for correct shared libs on aix (#213277).
+ local g="" ; type -P glibtoolize > /dev/null && g=g
+ local _ltpath="$(dirname "$(dirname "$(type -P ${g}libtoolize)")")"
+ cp -f "${_ltpath}"/share/aclocal/libtool.m4 aclocal/libtool.m4 \
+ || die "cannot update libtool.ac from libtool.m4"
+
+ # need to upgrade ltmain.sh for AIX,
+ # but aclocal.m4 is created in ./s_config,
+ # and elibtoolize does not work when there is no aclocal.m4, so:
+ ${g}libtoolize --force --copy || die "${g}libtoolize failed."
+ # now let shipped script do the autoconf stuff, it really knows best.
+ #see code below
+ #sh ./s_config || die "Cannot execute ./s_config"
+
+ # use the includes from the prefix
+ epatch "${FILESDIR}"/${PN}-4.6-jni-check-prefix-first.patch
+ epatch "${FILESDIR}"/${PN}-4.3-listen-to-java-options.patch
+
+ popd > /dev/null
+
+ # sqlite configure call has an extra leading ..
+ # upstreamed:5.2.36, missing in 5.3.x
+ epatch "${FILESDIR}"/${PN}-5.2.28-sqlite-configure-path.patch
+
+ # The upstream testsuite copies .lib and the binaries for each parallel test
+ # core, ~300MB each. This patch uses links instead, saves a lot of space.
+ epatch "${FILESDIR}"/${PN}-6.0.20-test-link.patch
+
+ # Needed when compiling with clang
+ epatch "${FILESDIR}"/${PN}-5.1.29-rename-atomic-compare-exchange.patch
+
+ epatch "${FILESDIR}"/${PN}-6.0.35-winnt.patch
+
+ # Upstream release script grabs the dates when the script was run, so lets
+ # end-run them to keep the date the same.
+ export REAL_DB_RELEASE_DATE="$(awk \
+ '/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \
+ "${S_BASE}"/dist/configure)"
+ sed -r -i \
+ -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
+ "${S_BASE}"/dist/RELEASE || die
+
+ # Include the SLOT for Java JAR files
+ # This supersedes the unused jarlocation patches.
+ sed -r -i \
+ -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
+ "${S_BASE}"/dist/Makefile.in || die
+
+ cd "${S_BASE}"/dist || die
+ rm -f aclocal/libtool.m4
+ sed -i \
+ -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
+ configure.ac || die
+ sed -i \
+ -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
+ aclocal/programs.m4 || die
+ AT_M4DIR="aclocal aclocal_java" eautoreconf
+ # Upstream sucks - they do autoconf and THEN replace the version variables.
+ . ./RELEASE
+ for v in \
+ DB_VERSION_{FAMILY,LETTER,RELEASE,MAJOR,MINOR} \
+ DB_VERSION_{PATCH,FULL,UNIQUE_NAME,STRING,FULL_STRING} \
+ DB_VERSION \
+ DB_RELEASE_DATE ; do
+ local ev="__EDIT_${v}__"
+ sed -i -e "s/${ev}/${!v}/g" configure || die
+ done
+}
+
+multilib_src_configure() {
+ local myconf=()
+
+ tc-ld-disable-gold #470634
+
+ # compilation with -O0 fails on amd64, see bug #171231
+ if [[ ${ABI} == amd64 ]]; then
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+ replace-flags -O0 -O2
+ is-flagq -O[s123] || append-flags -O2
+ fi
+
+ if [[ ${CC} == *clang* ]]; then
+ append-cflags -stdlib=libstdc++
+ append-cxxflags -stdlib=libstdc++
+ else
+ # Add linker versions to the symbols. Easier to do, and safer than header file
+ # mumbo jumbo.
+ if [[ ${CHOST} == *-linux-gnu* || ${CHOST} == *-solaris* ]] || use userland_GNU ; then
+ # we hopefully use a GNU binutils linker in this case
+ append-ldflags -Wl,--default-symver
+ fi
+ fi
+
+ tc-export CC CXX # would use CC=xlc_r on aix if not set
+
+ # use `set` here since the java opts will contain whitespace
+ if multilib_is_native_abi && use java ; then
+ myconf+=(
+ --with-java-prefix="${JAVA_HOME}"
+ --with-javac-flags="$(java-pkg_javac-args)"
+ )
+ fi
+
+ # Bug #270851: test needs TCL support
+ if use tcl || use test ; then
+ myconf+=(
+ --enable-tcl
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)"
+ )
+ else
+ myconf+=(--disable-tcl )
+ fi
+
+ if [[ ${CHOST} == *-winnt* ]]; then
+ # this one should really say --enable-windows, but
+ # seems the db devs only support mingw ... doesn't enable
+ # anything too specific to mingw.
+ myconf+=(--enable-mingw)
+ myconf+=(--with-mutex=win32)
+ fi
+
+ # sql_compat will cause a collision with sqlite3
+ # --enable-sql_compat
+ # Don't --enable-sql* because we don't want to use bundled sqlite.
+ # See Gentoo bug #605688
+ ECONF_SOURCE="${S_BASE}"/dist \
+ STRIP="true" \
+ econf \
+ --enable-compat185 \
+ --enable-dbm \
+ --enable-o_direct \
+ --without-uniquename \
+ --disable-sql \
+ --disable-sql_codegen \
+ --disable-sql_compat \
+ $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly) \
+ $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly) \
+ $(use_enable cxx) \
+ $(use_enable cxx stl) \
+ $(multilib_native_use_enable java) \
+ "${myconf[@]}" \
+ $(use_enable test)
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ db_src_install_headerslot
+
+ db_src_install_usrlibcleanup
+
+ if multilib_is_native_abi && use java; then
+ local ext=so
+ [[ ${CHOST} == *-darwin* ]] && ext=jnilib #313085
+ java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.${ext}
+ java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
+ rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
+ fi
+}
+
+multilib_src_install_all() {
+ db_src_install_usrbinslot
+
+ db_src_install_doc
+
+ dodir /usr/sbin
+ # This file is not always built, and no longer exists as of db-4.8
+ if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
+ mv "${ED}"/usr/bin/berkeley_db_svc \
+ "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
+ fi
+}
+
+pkg_postinst() {
+ multilib_foreach_abi db_fix_so
+}
+
+pkg_postrm() {
+ multilib_foreach_abi db_fix_so
+}
+
+src_test() {
+ # db_repsite is impossible to build, as upstream strips those sources.
+ # db_repsite is used directly in the setup_site_prog,
+ # setup_site_prog is called from open_site_prog
+ # which is called only from tests in the multi_repmgr group.
+ #sed -ri \
+ # -e '/set subs/s,multi_repmgr,,g' \
+ # "${S_BASE}/test/testparams.tcl"
+ sed -ri \
+ -e '/multi_repmgr/d' \
+ "${S_BASE}/test/tcl/test.tcl" || die
+
+ # This is the only failure in 5.2.28 so far, and looks like a false positive.
+ # Repmgr018 (btree): Test of repmgr stats.
+ # Repmgr018.a: Start a master.
+ # Repmgr018.b: Start a client.
+ # Repmgr018.c: Run some transactions at master.
+ # Rep_test: btree 20 key/data pairs starting at 0
+ # Rep_test.a: put/get loop
+ # FAIL:07:05:59 (00:00:00) perm_no_failed_stat: expected 0, got 1
+ sed -ri \
+ -e '/set parms.*repmgr018/d' \
+ -e 's/repmgr018//g' \
+ "${S_BASE}/test/tcl/test.tcl" || die
+
+ multilib-minimal_src_test
+}
+
+multilib_src_test() {
+ multilib_is_native_abi || return
+
+ S=${BUILD_DIR} db_src_test
+}
diff --git a/sys-libs/db/db-6.0.35-r1.ebuild b/sys-libs/db/db-6.0.35-r1.ebuild
new file mode 100644
index 00000000..35b23e62
--- /dev/null
+++ b/sys-libs/db/db-6.0.35-r1.ebuild
@@ -0,0 +1,279 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib multilib-minimal versionator toolchain-funcs
+
+#Number of official patches
+#PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
+PATCHNO=${PV/*.*.*_p}
+if [[ ${PATCHNO} == "${PV}" ]] ; then
+ MY_PV=${PV}
+ MY_P=${P}
+ PATCHNO=0
+else
+ MY_PV=${PV/_p${PATCHNO}}
+ MY_P=${PN}-${MY_PV}
+fi
+
+S_BASE="${WORKDIR}/${MY_P}"
+S="${S_BASE}/build_unix"
+DESCRIPTION="Oracle Berkeley DB"
+HOMEPAGE="http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/overview/index.html"
+SRC_URI="http://download.oracle.com/berkeley-db/${MY_P}.tar.gz"
+for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
+ export SRC_URI="${SRC_URI} http://www.oracle.com/technology/products/berkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}"
+done
+
+LICENSE="AGPL-3"
+SLOT="$(get_version_component_range 1-2)"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
+KEYWORDS+="~ppc-aix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+IUSE="doc java cxx tcl test"
+
+REQUIRED_USE="test? ( tcl )"
+
+# the entire testsuite needs the TCL functionality
+DEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ test? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jdk-1.5 )
+ || ( sys-devel/binutils-apple
+ sys-devel/native-cctools
+ >=sys-devel/binutils-2.16.1
+ )"
+RDEPEND="tcl? ( >=dev-lang/tcl-8.5.15-r1:0=[${MULTILIB_USEDEP}] )
+ java? ( >=virtual/jre-1.5 )"
+
+MULTILIB_WRAPPED_HEADERS=(
+ /usr/include/db$(get_version_component_range 1-2)/db.h
+)
+
+src_prepare() {
+ cd "${WORKDIR}"/"${MY_P}"
+ for (( i=1 ; i<=${PATCHNO} ; i++ ))
+ do
+ epatch "${DISTDIR}"/patch."${MY_PV}"."${i}"
+ done
+
+ # bug #510506
+ epatch "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch
+ # Set of patches to make this thing compile with C++11, Oracle
+ # promised to fix this for the next release
+ # https://community.oracle.com/thread/3952592
+ epatch "${FILESDIR}"/${PN}-6.2-c++11.patch
+
+ pushd dist > /dev/null || die "Cannot cd to 'dist'"
+
+ # need to upgrade local copy of libtool.m4
+ # for correct shared libs on aix (#213277).
+ local g="" ; type -P glibtoolize > /dev/null && g=g
+ local _ltpath="$(dirname "$(dirname "$(type -P ${g}libtoolize)")")"
+ cp -f "${_ltpath}"/share/aclocal/libtool.m4 aclocal/libtool.m4 \
+ || die "cannot update libtool.ac from libtool.m4"
+
+ # need to upgrade ltmain.sh for AIX,
+ # but aclocal.m4 is created in ./s_config,
+ # and elibtoolize does not work when there is no aclocal.m4, so:
+ ${g}libtoolize --force --copy || die "${g}libtoolize failed."
+ # now let shipped script do the autoconf stuff, it really knows best.
+ #see code below
+ #sh ./s_config || die "Cannot execute ./s_config"
+
+ # use the includes from the prefix
+ epatch "${FILESDIR}"/${PN}-4.6-jni-check-prefix-first.patch
+ epatch "${FILESDIR}"/${PN}-4.3-listen-to-java-options.patch
+
+ popd > /dev/null
+
+ # sqlite configure call has an extra leading ..
+ # upstreamed:5.2.36, missing in 5.3.x/6.x
+ # still needs to be patched in 6.0.20
+ epatch "${FILESDIR}"/${PN}-6.0.35-sqlite-configure-path.patch
+
+ # The upstream testsuite copies .lib and the binaries for each parallel test
+ # core, ~300MB each. This patch uses links instead, saves a lot of space.
+ epatch "${FILESDIR}"/${PN}-6.0.20-test-link.patch
+
+ epatch "${FILESDIR}"/${PN}-6.0.35-winnt.patch
+
+ # Upstream release script grabs the dates when the script was run, so lets
+ # end-run them to keep the date the same.
+ export REAL_DB_RELEASE_DATE="$(awk \
+ '/^DB_VERSION_STRING=/{ gsub(".*\\(|\\).*","",$0); print $0; }' \
+ "${S_BASE}"/dist/configure)"
+ sed -r -i \
+ -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \
+ "${S_BASE}"/dist/RELEASE || die
+
+ # Include the SLOT for Java JAR files
+ # This supersedes the unused jarlocation patches.
+ sed -r -i \
+ -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
+ "${S_BASE}"/dist/Makefile.in || die
+
+ cd "${S_BASE}"/dist || die
+ rm -f aclocal/libtool.m4
+ sed -i \
+ -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
+ configure.ac || die
+ sed -i \
+ -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
+ aclocal/programs.m4 || die
+ AT_M4DIR="aclocal aclocal_java" eautoreconf
+ # Upstream sucks - they do autoconf and THEN replace the version variables.
+ . ./RELEASE
+ for v in \
+ DB_VERSION_{FAMILY,LETTER,RELEASE,MAJOR,MINOR} \
+ DB_VERSION_{PATCH,FULL,UNIQUE_NAME,STRING,FULL_STRING} \
+ DB_VERSION \
+ DB_RELEASE_DATE ; do
+ local ev="__EDIT_${v}__"
+ sed -i -e "s/${ev}/${!v}/g" configure || die
+ done
+}
+
+multilib_src_configure() {
+ local myconf=()
+
+ tc-ld-disable-gold #470634
+
+ # compilation with -O0 fails on amd64, see bug #171231
+ if [[ ${ABI} == amd64 ]]; then
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+ replace-flags -O0 -O2
+ is-flagq -O[s123] || append-flags -O2
+ fi
+
+ if [[ ${CC} == *clang* ]]; then
+ append-cflags -stdlib=libstdc++
+ append-cxxflags -stdlib=libstdc++
+ else
+ # Add linker versions to the symbols. Easier to do, and safer than header file
+ # mumbo jumbo.
+ if [[ ${CHOST} == *-linux-gnu* || ${CHOST} == *-solaris* ]] || use userland_GNU ; then
+ # we hopefully use a GNU binutils linker in this case
+ append-ldflags -Wl,--default-symver
+ fi
+ fi
+
+ tc-export CC CXX # would use CC=xlc_r on aix if not set
+
+ # use `set` here since the java opts will contain whitespace
+ if multilib_is_native_abi && use java ; then
+ myconf+=(
+ --with-java-prefix="${JAVA_HOME}"
+ --with-javac-flags="$(java-pkg_javac-args)"
+ )
+ fi
+
+ # Bug #270851: test needs TCL support
+ if use tcl || use test ; then
+ myconf+=(
+ --enable-tcl
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)"
+ )
+ else
+ myconf+=(--disable-tcl )
+ fi
+
+ if [[ ${CHOST} == *-winnt* ]]; then
+ # this one should really say --enable-windows, but
+ # seems the db devs only support mingw ... doesn't enable
+ # anything too specific to mingw.
+ myconf+=(--enable-mingw)
+ myconf+=(--with-mutex=win32)
+ fi
+
+ # sql_compat will cause a collision with sqlite3
+ # --enable-sql_compat
+ # Don't --enable-sql* because we don't want to use bundled sqlite.
+ # See Gentoo bug #605688
+ ECONF_SOURCE="${S_BASE}"/dist \
+ STRIP="true" \
+ econf \
+ --enable-compat185 \
+ --enable-dbm \
+ --enable-o_direct \
+ --without-uniquename \
+ --disable-sql \
+ --disable-sql_codegen \
+ --disable-sql_compat \
+ $([[ ${ABI} == arm ]] && echo --with-mutex=ARM/gcc-assembly) \
+ $([[ ${ABI} == amd64 ]] && echo --with-mutex=x86/gcc-assembly) \
+ $(use_enable cxx) \
+ $(use_enable cxx stl) \
+ $(multilib_native_use_enable java) \
+ "${myconf[@]}" \
+ $(use_enable test)
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ db_src_install_headerslot
+
+ db_src_install_usrlibcleanup
+
+ if multilib_is_native_abi && use java; then
+ local ext=so
+ [[ ${CHOST} == *-darwin* ]] && ext=jnilib #313085
+ java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.${ext}
+ java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar
+ rm -f "${ED}"/usr/"$(get_libdir)"/*.jar
+ fi
+}
+
+multilib_src_install_all() {
+ db_src_install_usrbinslot
+
+ db_src_install_doc
+
+ dodir /usr/sbin
+ # This file is not always built, and no longer exists as of db-4.8
+ if [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] ; then
+ mv "${ED}"/usr/bin/berkeley_db_svc \
+ "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die
+ fi
+}
+
+pkg_postinst() {
+ multilib_foreach_abi db_fix_so
+}
+
+pkg_postrm() {
+ multilib_foreach_abi db_fix_so
+}
+
+src_test() {
+ # db_repsite is impossible to build, as upstream strips those sources.
+ # db_repsite is used directly in the setup_site_prog,
+ # setup_site_prog is called from open_site_prog
+ # which is called only from tests in the multi_repmgr group.
+ #sed -ri \
+ # -e '/set subs/s,multi_repmgr,,g' \
+ # "${S_BASE}/test/testparams.tcl"
+ sed -ri \
+ -e '/multi_repmgr/d' \
+ "${S_BASE}/test/tcl/test.tcl" || die
+
+ # This is the only failure in 5.2.28 so far, and looks like a false positive.
+ # Repmgr018 (btree): Test of repmgr stats.
+ # Repmgr018.a: Start a master.
+ # Repmgr018.b: Start a client.
+ # Repmgr018.c: Run some transactions at master.
+ # Rep_test: btree 20 key/data pairs starting at 0
+ # Rep_test.a: put/get loop
+ # FAIL:07:05:59 (00:00:00) perm_no_failed_stat: expected 0, got 1
+ sed -ri \
+ -e '/set parms.*repmgr018/d' \
+ -e 's/repmgr018//g' \
+ "${S_BASE}/test/tcl/test.tcl" || die
+
+ multilib-minimal_src_test
+}
+
+multilib_src_test() {
+ multilib_is_native_abi || return
+
+ S=${BUILD_DIR} db_src_test
+}
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 00000000..c239bb11
--- /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.0.35-winnt.patch b/sys-libs/db/files/db-6.0.35-winnt.patch
new file mode 100644
index 00000000..7b452960
--- /dev/null
+++ b/sys-libs/db/files/db-6.0.35-winnt.patch
@@ -0,0 +1,110 @@
+--- db-6.0.35/dist/aclocal/cxx.m4.orig 2017-09-21 14:38:27.091198600 +0200
++++ db-6.0.35/dist/aclocal/cxx.m4 2017-09-21 14:38:38.481785600 +0200
+@@ -171,6 +171,7 @@
+
+ t44 = t4;
+ t55 = t5;
++ return 0;
+ }
+
+ template <typename T4>
+@@ -178,6 +179,7 @@
+ {
+ T4 t44 = t4;
+ std::vector<T4> abc = t55;
++ return 0;
+ }
+
+ // maximum of two int values
+--- db-6.0.35/dist/aclocal/tls.m4.orig 2017-09-21 15:41:28.325565600 +0200
++++ db-6.0.35/dist/aclocal/tls.m4 2017-09-21 15:41:56.388089900 +0200
+@@ -21,10 +21,10 @@
+ class TLSClass2 {
+ public: static ] $ax_tls_decl_keyword [int tlsvar;
+ };
+- template<typename T> ] $ax_tls_defn_keyword [ T* TLSClass<T>::tlsvar = NULL;]
++ template<typename T> ] $ax_tls_defn_keyword [ T* TLSClass<T>::tlsvar = 0;]
+ $ax_tls_defn_keyword [int TLSClass2::tlsvar = 1;
+ static $ax_tls_decl_keyword int x = 0;],
+- [TLSClass<int>::tlsvar = NULL; TLSClass2::tlsvar = 1;],
++ [TLSClass<int>::tlsvar = 0; TLSClass2::tlsvar = 1;],
+ [ac_cv_tls=modifier ; break])
+ done
+ test "$ac_cv_tls" = none || break
+@@ -39,7 +39,7 @@
+ static pthread_key_t key;
+
+ static void init_once(void) {
+- pthread_key_create(&key, NULL);
++ pthread_key_create(&key, 0);
+ }
+ static void *get_tls() {
+ return (void *)pthread_getspecific(&key);
+--- db-6.0.35/dist/configure.ac.orig 2017-09-21 16:12:45.638028200 +0200
++++ db-6.0.35/dist/configure.ac 2017-09-21 16:13:11.731822700 +0200
+@@ -371,11 +371,11 @@
+ INSTALLER="\$(LIBTOOL) --mode=install cp -p"
+
+ MAKEFILE_CC="\$(LIBTOOL) --mode=compile ${MAKEFILE_CC}"
+-MAKEFILE_SOLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CCLINK} -avoid-version"
+-MAKEFILE_CCLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CCLINK}"
++MAKEFILE_SOLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CCLINK} -no-undefined -avoid-version"
++MAKEFILE_CCLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CCLINK} -no-undefined"
+ MAKEFILE_CXX="\$(LIBTOOL) --mode=compile ${MAKEFILE_CXX}"
+-MAKEFILE_XSOLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK} -avoid-version"
+-MAKEFILE_CXXLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK}"
++MAKEFILE_XSOLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK} -no-undefined -avoid-version"
++MAKEFILE_CXXLINK="\$(LIBTOOL) --mode=link ${MAKEFILE_CXXLINK} -no-undefined"
+
+
+ case "$host_os" in
+@@ -411,9 +411,6 @@
+ o=".lo"
+ fi
+ INSTALL_LIBS="$DEFAULT_LIB"
+-if test "$enable_static" = "yes"; then
+- INSTALL_LIBS="$INSTALL_LIBS \$(libdb)"
+-fi
+
+ # Optional C++ API.
+ if test "$db_cv_cxx" = "yes"; then
+@@ -424,9 +421,6 @@
+ DEFAULT_LIB_CXX="\$(libxso_target)"
+ fi
+ INSTALL_LIBS="$INSTALL_LIBS $DEFAULT_LIB_CXX"
+- if test "$enable_static" = "yes"; then
+- INSTALL_LIBS="$INSTALL_LIBS \$(libcxx)"
+- fi
+ fi
+
+ # Optional Java API / JDBC.
+@@ -553,9 +547,6 @@
+ DEFAULT_LIB_SQL="\$(libsqlso_target)"
+ fi
+ INSTALL_LIBS="$INSTALL_LIBS $DEFAULT_LIB_SQL"
+- if test "$enable_static" = "yes"; then
+- INSTALL_LIBS="$INSTALL_LIBS \$(libsql)"
+- fi
+
+ if test "$db_cv_test" = "yes"; then
+ subdirs="$subdirs sql"
+@@ -593,9 +584,6 @@
+ if test "$enable_shared" = "yes"; then
+ INSTALL_LIBS_EXTRA="$INSTALL_LIBS_EXTRA \$(libsqliteso)"
+ fi
+- if test "$enable_static" = "yes"; then
+- INSTALL_LIBS="$INSTALL_LIBS \$(libsqlite)"
+- fi
+ fi
+
+ # Optional SQL code generation tool.
+@@ -619,9 +607,6 @@
+ ADDITIONAL_INCS="$ADDITIONAL_INCS \$(topdir)/lang/cxx/stl/$f"
+ done
+ INSTALL_LIBS="$INSTALL_LIBS $DEFAULT_LIB_STL"
+- if test "$enable_static" = "yes"; then
+- INSTALL_LIBS="$INSTALL_LIBS \$(libstl)"
+- fi
+ fi
+
+ # Checks for include files, structures, C types.