diff options
Diffstat (limited to 'sys-libs/db')
-rw-r--r-- | sys-libs/db/ChangeLog | 9 | ||||
-rw-r--r-- | sys-libs/db/Manifest | 26 | ||||
-rw-r--r-- | sys-libs/db/db-4.8.30-r1.ebuild | 185 | ||||
-rw-r--r-- | sys-libs/db/db-5.3.28-r2.ebuild | 229 |
4 files changed, 447 insertions, 2 deletions
diff --git a/sys-libs/db/ChangeLog b/sys-libs/db/ChangeLog index 96ef2bd9d891..c9105b4743de 100644 --- a/sys-libs/db/ChangeLog +++ b/sys-libs/db/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-libs/db # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/db/ChangeLog,v 1.346 2014/04/03 08:47:19 patrick Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/db/ChangeLog,v 1.347 2014/05/15 18:36:45 mgorny Exp $ + +*db-4.8.30-r1 (15 May 2014) +*db-5.3.28-r2 (15 May 2014) + + 15 May 2014; Michał Górny <mgorny@gentoo.org> +db-4.8.30-r1.ebuild, + +db-5.3.28-r2.ebuild: + Enable multilib support. *db-5.3.28-r1 (03 Apr 2014) diff --git a/sys-libs/db/Manifest b/sys-libs/db/Manifest index 88c8446aae39..2a47886bf3c0 100644 --- a/sys-libs/db/Manifest +++ b/sys-libs/db/Manifest @@ -1,3 +1,6 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA256 + AUX db-1.85-gentoo-paths.patch 684 SHA256 049052c74c544ac1c1f3b1b91c3e43df76b135c610148212679dfd324470cf2f SHA512 d7e2075a1683c7a04337830730e429c4bf2b5f0bdb49cdc3b625bda83be7cf579f4039204a355f5854c2981b6bd3234767e02bc6a7914e2bcde2a73d698fb914 WHIRLPOOL 272d1acc842c83f9b189deaaf9c38cabc67a0428a21f6b0ff6647899ffb6db7fb4944d18e76884f816baa02ec842d393f5b8c341ef41b820c74adf02d6e86d3a AUX db-3.2.9-fix-dep-link.patch 1005 SHA256 57e6f13170db99ba7f2f43aa0c7606085d25094127c63a48b76333c1289f6382 SHA512 42f8a6e495266209d7c9bf35bfba801abddffb10488b7b156a790bacdf8fe2d3d3113d8d0a1afddeca238736f64cf8a881141d181fd4a211e4b04da9ed010587 WHIRLPOOL d01855996c76b18793a6cb68ddfab8f3e9a439a13267c41299be13a294469f56d3842a418600475861181b97e90472e800696745068ffb3f47ccbccd74578513 AUX db-3.2.9-gcc43.patch 441 SHA256 102ac694f32719deabbefdcfbecd96a255b8a6cdc312095fb537cf99ca6b9d77 SHA512 17d44ae357337d938bbe296b519efc03b914792ce4440936c1178b09dbb21783034e16f4fb2ff03443b00e8af530afc0fce778a937b06f0ba8c598b02cbc989c WHIRLPOOL 89f49f22f7c89d8989b002dc1f9469216666d2e79aaf724f4849b30a05eb108e1c1e4a286b60e2331e6fad7139b74c28eb6eaa93fe16358bf7d29928907c990e @@ -76,13 +79,34 @@ EBUILD db-4.4.20_p4-r1.ebuild 4819 SHA256 6829e46cd1b3c8689517d7bd620cf9d0723259 EBUILD db-4.5.20_p2-r1.ebuild 5099 SHA256 be4380149b54e98e5656c93ac5c41e895fbb8aa14da76cf1f8d89e90edd0b1cc SHA512 40cef06cf34f451674581dc91d744218fa4b8b7201214db63c0944d57a73b1269fc657d1a6603e02f8db0396afdfd9ad28424c570938d3ddfc9a022a3ff8d482 WHIRLPOOL 75d3892f060c0b3d69267e9a664de862d6574d14f56c231942c13c404ec96bdf5226d05eaca25c468577bef8ef1c7c723738f60aabab481f52a9f9510b825094 EBUILD db-4.6.21_p4.ebuild 4825 SHA256 1f1a8ff9fb54421252df74603f5d3b3739ecb33fab4f254fe9a3d1ef62bfaec0 SHA512 baa46c38441fc982f287a582713a72179e2481158571e6a6790c3a4636874bd3e22566a58e4ad0f64c96b4a07d7ebaacdd6ae26fa8199976e3165359c194ed33 WHIRLPOOL c4dbed87d59372aaeb636241cd2cee445f5df7347dbb47129efa9027e254567320d64f47bff1fc10eb4818040d06500c59d0718856e059b8a9549083ae3f87da EBUILD db-4.7.25_p4.ebuild 4360 SHA256 c1326c862fcaacc626e239b155b78d3f2c3fda3403b372301c7efe1021b21a49 SHA512 92944741cc786bf27c22d4dba1cb7273978181d448794afcb7b98123b949fbf8cbc08be972df83c49083af10f7d651f156ed30fc6fb1eb4a72d33c0635bd6d4a WHIRLPOOL 68cf35de0017c9797521b7c24d5636ace309b839511918280ff72d3cb0f5cfd2176848eb40dba8c737451b5c9895ab6ff14de07bd007413d8f4aff4bc5e25658 +EBUILD db-4.8.30-r1.ebuild 5124 SHA256 8bcff0c59f77a2eded8259c66927871b9d4c358b0c73f832a3ea9551433578f6 SHA512 66b503023c9f192c1f79d23477d737b236b075cd7721a0245129bbe868bb75a48ed1e8df42f0b02a0d9fb106bf770ec1958dbf12eecfd41ade2853287aedbc0d WHIRLPOOL 5d8c6f392484de80591d04da9173dcb982b9410c59c33e040bb3aa3d72e491acc94f2389fa513bdf874516d82cba64897b99a633d4b5ee073a36b88ba1592f2c EBUILD db-4.8.30.ebuild 4562 SHA256 fe7409e1b17ccc13af1fe941f5f685d05ac310d66ad8a24b116d9957ac145f5f SHA512 2613a9cc3e04411d7a6faacdf62657d832ca505821af9d061eb6767a1169cc733f609928b335696d385837e676bee75f92e405fb7461ba4ac244b81d5c03d5dd WHIRLPOOL 02bcb8f47dce6a1a567465b93fd7ab8e197796832b1f87ae2dab18fd4f8ecb78006495bd475d96b9dfe0cb1f56e8ee3d5198112e96c756d9932791f5f53456aa EBUILD db-5.0.32.ebuild 5461 SHA256 573d8e3e998b7a58109f67418696e1ccf07fa52960450fbc48088105c56cdaed SHA512 69504d48fdc0912ea841ec38e7e67a53a24e1ccd61a48dd375ec4a74e636ec31b343f23ddaa34a59808f873ba4a41bb13a7083b42fbcf22fd3d6f498a35545be WHIRLPOOL ca3c08685eeb4946556a0d2b9dd32e992694dbe02fbbc718f445bbef23de719db20f3c8539939c01182e671e6c6b543cffe49621bb5634c3171a9c91cec3ce08 EBUILD db-5.1.29.ebuild 5393 SHA256 c6ac68ea12fccd4fe97892af30f25909418d605b1e98e92ff062714bc69a4b12 SHA512 f02dcf3434ca388a97bf59fb5e925503b1d4f332f63941c8d098eaaf8c8c3efda3dbe73852074de0f54329b949e73548fdbefa831f60a16167e2a5c4ac3a22ce WHIRLPOOL 89609f988335d512116ce103baf5ae24adcbb5b707ffd28e1a4c4975eaa7497202e20fd40a455c564f9fc6d0ee2914314dea7be3ca60ed74cead5d94f65fe773 EBUILD db-5.2.42.ebuild 6267 SHA256 8ac23b6377328fe41e39bce0dd4f41d7bb66ebf20f1fd8dd2fec173f53da268a SHA512 0461767e88f6a4edeba2ca4cbf3fb89beefd56d3c0406db0e01defa7dba0de4ac6bdb92f999a62638eacac7f2eeab06c7c3a7b154a2563b79aec806debbf416e WHIRLPOOL 564c1466b0e490632675b70d06e9e89c7cf2ff3142d929a5d706058fe0baeadb69fb6d60e93c7eee244e5743f4b44514c7a8954c3f081fe21706ac2637b06905 EBUILD db-5.3.21.ebuild 6284 SHA256 58da34cedccec25cd9eb001204ed58bdad382a8bfaf2a7e405b21c3b0f1cc00b SHA512 fb44d7b2aa60dd32e627d1ab8a67063b761a93a86c1f520ca077ca0d0778bb21fe844a7d9e3d371257a89dd235ce119c5df92c0cbaeaa44afed113b374402c7b WHIRLPOOL 62d50575d67ca0ba10655c0da35cd0a08d270f09d682cec5f9785e6e8311f3c9a91945deae3d3f1fd6a7ed657b0f4c662fd7790172172677dc51d6b11b5c7cf9 EBUILD db-5.3.28-r1.ebuild 6001 SHA256 a94917d542634b8581da841e3e9ed5d6c63670535ec9c6c8b9270bc3bfef9db2 SHA512 4dbfd845e29d4c85a8418da65f5614410c5a5d30008c99ffe8160757b2d3f0ce3bc19c61a02ebde468ea52e1cb70fac6ec39bda6334c4b4e666d5a82f615e774 WHIRLPOOL a08b10545c146ffa25305576fb906d75012a6eff385b84fdd1626da6c3d3d7f5f9f8113bf12307f887ecfb00d580bbd3b5f5d55d987480f41737ef239c781ef8 +EBUILD db-5.3.28-r2.ebuild 6486 SHA256 fce961234c88be1b12c62d9aa353dbe6253f92e1a1d66bda64e91111faeda8da SHA512 ae43064ebd5f398145149a1cf0d963bc11d7880376c4d17b5a9d3f4b49d020adeede9f9316d5176ab801481327de5b8f3e810fb17175090cc2871be2b0f2f78c WHIRLPOOL 0db0002a945d7ed54eb7c6de03a5bb8a29ceee21f4c4b27711aaeace7ffafe16340e856a6137b5c9ad2f18c255ad31ee3126aff07edbedc5bd18f4e520b529a7 EBUILD db-5.3.28.ebuild 6010 SHA256 1af32328c591410a2b215583d685790a3114024f4c1584450f137ce4e6b6786d SHA512 85f4566631aa54655b6ef986eedc06f8c887e8755926421b54ffa0c58b3768c4a8438809cfc39a8167c9e5617598ec4ce3cd88b612bde47c15b21e6694924c19 WHIRLPOOL f09347ced091748261d9db7947abd9fb6332a0c825317d3e08191b597dae84dbfb2a5a7b75869eec93a70cf96c1dcea88ee7cf18dae9fa3d4af10e94b10c3316 EBUILD db-6.0.20-r1.ebuild 6053 SHA256 803f7b05a2d4b0ae498296f51867e0d244cd40fd47e3cb91a8008cccf6c8e6a9 SHA512 b6d588f7113b131b73f495c50f922f2695cc4c9a2597e5ff4c8c4b5bfae0600def289775e0b6eac39721e7de1ba85bd420869dc1041e4d49e8c1d47b979419aa WHIRLPOOL 8e5d7c6cc3222745304a5bbe629adc2c976bb4eea782fa71563ab59a1b33592febf4d0eb6a653bd3263c6c47d4a00c12c82acc402a049c3a9be6df7b435913b1 -MISC ChangeLog 56208 SHA256 53525bfb658a763e9230f94b7305db98d15caa7ae7d7105ded377d1300a37375 SHA512 c00a7882616fda84eefc5953cd66f212ec7fdf1074ee3a9f9951177510e58b9c4aeb9d4273bb17848e2d37106bd3162132dfd1fd3a9f5054d60542d21f3e987a WHIRLPOOL efd1685c57739ca17b10ede451091420ba07e514b10dfff6db6a2249d7342de6eff1c8b63f72683220676ddf145463412dd6ea8fdaa176069b59920f810851b0 +MISC ChangeLog 56388 SHA256 baf90e05ca1c036f460070d2fad7d5619dc5aa71adbd13036e1558cf16ce46e5 SHA512 ff76f77729edba620d565b77b3b16af861ee7d30bd7abd73a5b5c332ca69d628a1c6e79a099232925edb8f332bcc6efb6366e7ac4612e3d0f7064b3e40919f31 WHIRLPOOL b18583f7a2474b5d4dedb8dfadee1ae9d8e4c7ba8244c148ddcf08843ad611cfed99d7e376966ee43f27bc6b3c7a60e05570c0149d95a68ebd6f78425d9254fa MISC metadata.xml 1231 SHA256 0aac93eb29b4674d00b215122f39eb1ec03248e105cab670bc1921cbcca1e927 SHA512 6d25e610cc6cdcba13f8ffaab19406ca9dd7b5eda0585a6666058408ef1eb23a062428483532f4d1461888039e49a97aad4afc6dceb96baa70b880f7c4cf59b9 WHIRLPOOL 1d6531dd2346d7bc02dd016688a58c1c454a9262c3bad846147a6bce51f3ab0aba11165782162a5fda678a1fae3bafcab0d57eb882d5450814ce4fa7b813de54 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.22 (GNU/Linux) + +iQJ8BAEBCABmBQJTdQlFXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w +ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ2REJCMDdDQzRGMERBRDA2RUEwQUZFNDFC +MDdBMUFFQUVGQjQ0NjRFAAoJELB6GurvtEZO/GkQAKGwwXL0344SNCRP0eCFy2AA +pSCJNFXSiESUrmAG2aQGUOC/S30qIbkS4sxlnhzZh/KmeCyyWPCDMomOS/W6s29l +lKM5aDrXC/LU5y3agpPj82C6rY+EugefvMVFwOE1qqXvbOuHaibMzSrdgn5G1/K/ +xj5sfPorOz7WlnoMyd9XVsGzu6Eu1a5fkjTxlKw+WPTBa7Fj527YhxseFeUcdBXf +gKWVZ5XxjFaDZTbz0bp9kiEr9YKAeY7ODaV/L58VsDHlNCIe/Zmb3gtmlTCxIDX+ +RCaOr+zPckKDErW+ALE7efvaDX8DNWV3t1L+a+hDfZfuBGEhurDjcuZWA4U4GlwM +Lx7EOIka1CboSdFeqLzxphsOFbMB53MODck5NFX0OoRupU5yza5IcUej4n4pWcmX +8VKHlw5DhgJHOzpKm/ZjYkKB2TMvt0+oSalh5kG4GkYlcClQ6Zs89zKJbQ1DPBtT +Smoi14FzlgMevdMfV4y556L9EBEfeL6Jv1Yv0Y4m5eyGQPB8U+f9e/b1V4129b1b +AEFsz4Qhar/EaEWfQVBJB2FS6FHSHBsnmV68Exz86cFCpcRcYobrzlmFIscWMu55 +8frvUDbTWzVtyRBYCKDSSg4ss7cxNnOUHUmJTKX8BdDmn+Y5x6kzRr5/hATx4rp+ +1B29hJNgpLEn1zfAxB23 +=BOFI +-----END PGP SIGNATURE----- diff --git a/sys-libs/db/db-4.8.30-r1.ebuild b/sys-libs/db/db-4.8.30-r1.ebuild new file mode 100644 index 000000000000..21301fdf71cd --- /dev/null +++ b/sys-libs/db/db-4.8.30-r1.ebuild @@ -0,0 +1,185 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/db/db-4.8.30-r1.ebuild,v 1.1 2014/05/15 18:36:45 mgorny Exp $ + +EAPI=4 + +inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib multilib-minimal + +#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="${WORKDIR}/${MY_P}/build_unix" +DESCRIPTION="Oracle Berkeley DB" +HOMEPAGE="http://www.oracle.com/technology/software/products/berkeley-db/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="4.8" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" +IUSE="doc java cxx tcl test" + +# the entire testsuite needs the TCL functionality +DEPEND="tcl? ( >=dev-lang/tcl-8.4[${MULTILIB_USEDEP}] ) + test? ( >=dev-lang/tcl-8.4[${MULTILIB_USEDEP}] ) + java? ( >=virtual/jdk-1.5 ) + >=sys-devel/binutils-2.16.1" +RDEPEND="tcl? ( dev-lang/tcl[${MULTILIB_USEDEP}] ) + java? ( >=virtual/jre-1.5 ) + abi_x86_32? ( + !<=app-emulation/emul-linux-x86-baselibs-20140508-r2 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] + )" + +src_unpack() { + unpack "${MY_P}".tar.gz +} + +src_prepare() { + cd "${WORKDIR}"/"${MY_P}" || die + for (( i=1 ; i<=${PATCHNO} ; i++ )) + do + epatch "${DISTDIR}"/patch."${MY_PV}"."${i}" + done + epatch "${FILESDIR}"/${PN}-4.8-libtool.patch + epatch "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch + epatch "${FILESDIR}"/${PN}-4.8.30-rename-atomic-compare-exchange.patch + + # 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 + + sed -e "/^DB_RELEASE_DATE=/s/%B %e, %Y/%Y-%m-%d/" -i 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}"/../dist/Makefile.in || die + + cd "${S}"/../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 + sed -i \ + -e "s/__EDIT_DB_VERSION_MAJOR__/$DB_VERSION_MAJOR/g" \ + -e "s/__EDIT_DB_VERSION_MINOR__/$DB_VERSION_MINOR/g" \ + -e "s/__EDIT_DB_VERSION_PATCH__/$DB_VERSION_PATCH/g" \ + -e "s/__EDIT_DB_VERSION_STRING__/$DB_VERSION_STRING/g" \ + -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \ + -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" configure || die +} + +src_configure() { + # Add linker versions to the symbols. Easier to do, and safer than header file + # mumbo jumbo. + if use userland_GNU ; then + append-ldflags -Wl,--default-symver + fi + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local myconf=() + + # 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 + + # 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=/usr/$(get_libdir) + ) + else + myconf+=(--disable-tcl ) + fi + + ECONF_SOURCE="${S}"/../dist \ + STRIP="true" \ + econf \ + --enable-compat185 \ + --enable-o_direct \ + --without-uniquename \ + $([[ ${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_test() { + multilib_is_native_abi || return + + S=${BUILD_DIR} db_src_test +} + +multilib_src_install() { + emake install DESTDIR="${D}" + + db_src_install_headerslot + + db_src_install_usrlibcleanup + + if multilib_is_native_abi && use java; then + java-pkg_regso "${D}"/usr/"$(get_libdir)"/libdb_java*.so + java-pkg_dojar "${D}"/usr/"$(get_libdir)"/*.jar + rm -f "${D}"/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 "${D}"/usr/bin/berkeley_db_svc ]] ; then + mv "${D}"/usr/bin/berkeley_db_svc \ + "${D}"/usr/sbin/berkeley_db"${SLOT/./}"_svc || die + fi +} + +pkg_postinst() { + multilib_foreach_abi db_fix_so +} + +pkg_postrm() { + multilib_foreach_abi db_fix_so +} diff --git a/sys-libs/db/db-5.3.28-r2.ebuild b/sys-libs/db/db-5.3.28-r2.ebuild new file mode 100644 index 000000000000..b295c8fee961 --- /dev/null +++ b/sys-libs/db/db-5.3.28-r2.ebuild @@ -0,0 +1,229 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/db/db-5.3.28-r2.ebuild,v 1.1 2014/05/15 18:36:45 mgorny Exp $ + +EAPI=5 +inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib multilib-minimal + +#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/technology/software/products/berkeley-db/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" +IUSE="doc java cxx tcl test" + +REQUIRED_USE="test? ( tcl )" + +# the entire testsuite needs the TCL functionality +DEPEND="tcl? ( >=dev-lang/tcl-8.4[${MULTILIB_USEDEP}] ) + test? ( >=dev-lang/tcl-8.4[${MULTILIB_USEDEP}] ) + java? ( >=virtual/jdk-1.5 ) + >=sys-devel/binutils-2.16.1" +RDEPEND="tcl? ( dev-lang/tcl[${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 + + # 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 + + # 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 + + # 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 +} + +src_configure() { + # Add linker versions to the symbols. Easier to do, and safer than header file + # mumbo jumbo. + if use userland_GNU ; then + append-ldflags -Wl,--default-symver + fi + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local myconf=() + + # 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 + + # 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=/usr/$(get_libdir) + ) + else + myconf+=(--disable-tcl ) + fi + + # sql_compat will cause a collision with sqlite3 + # --enable-sql_compat + ECONF_SOURCE="${S_BASE}"/dist \ + STRIP="true" \ + econf \ + --enable-compat185 \ + --enable-dbm \ + --enable-o_direct \ + --without-uniquename \ + --enable-sql \ + --enable-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 + java-pkg_regso "${D}"/usr/"$(get_libdir)"/libdb_java*.so + java-pkg_dojar "${D}"/usr/"$(get_libdir)"/*.jar + rm -f "${D}"/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 "${D}"/usr/bin/berkeley_db_svc ]] ; then + mv "${D}"/usr/bin/berkeley_db_svc \ + "${D}"/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 +} |