--- db-5.3.28-r3.ebuild 2018-05-08 01:12:00.084331781 -0500 +++ db-5.3.28-r4.ebuild 2018-05-08 20:35:18.890934589 -0500 @@ -1,8 +1,8 @@ # Copyright 1999-2018 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 +EAPI=6 +inherit db eapi7-ver flag-o-matic java-pkg-opt-2 autotools multilib-minimal toolchain-funcs #Number of official patches #PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"` @@ -16,8 +16,8 @@ MY_P=${PN}-${MY_PV} fi -S_BASE="${WORKDIR}/${MY_P}" -S="${S_BASE}/build_unix" +S="${WORKDIR}/${MY_P}" +BUILD_DIR="${S}/build${MULTIBUILD_VARIANT}" 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" @@ -26,7 +26,7 @@ done LICENSE="Sleepycat" -SLOT="5.3" +SLOT="$(ver_cut 1-2)" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" IUSE="doc java cxx tcl test" @@ -41,50 +41,53 @@ java? ( >=virtual/jre-1.5 )" MULTILIB_WRAPPED_HEADERS=( - /usr/include/db5.3/db.h + /usr/include/db$(ver_cut 1-2)/db.h ) -src_prepare() { - cd "${WORKDIR}"/"${MY_P}" - for (( i=1 ; i<=${PATCHNO} ; i++ )) - do - epatch "${DISTDIR}"/patch."${MY_PV}"."${i}" - done - +PATCHES=() +for (( i=1 ; i<=${PATCHNO} ; i++ )) +do + PATCHES+=( "${DISTDIR}"/patch."${MY_PV}"."${i}" ) +done +PATCHES+=( # bug #510506 - epatch "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.patch + "${FILESDIR}"/${PN}-4.8.24-java-manifest-location.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 + "${FILESDIR}"/${PN}-4.6-jni-check-prefix-first.patch + "${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 + "${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 + "${FILESDIR}"/${PN}-6.0.20-test-link.patch # Needed when compiling with clang - epatch "${FILESDIR}"/${PN}-5.1.29-rename-atomic-compare-exchange.patch + "${FILESDIR}"/${PN}-5.1.29-rename-atomic-compare-exchange.patch +) + +src_prepare() { + default # 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)" + dist/configure)" sed -r -i \ -e "/^DB_RELEASE_DATE=/s~=.*~='${REAL_DB_RELEASE_DATE}'~g" \ - "${S_BASE}"/dist/RELEASE || die + 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 + "${S}"/dist/Makefile.in || die - cd "${S_BASE}"/dist || die + cd dist || die rm -f aclocal/libtool.m4 sed -i \ -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \ @@ -108,7 +111,7 @@ # looks for 'Skipping\s' sed -i \ -e '/db_repsite/s,Skipping:,Skipping,g' \ - "${S_BASE}"/test/tcl/reputils.tcl || die + "${S}"/test/tcl/reputils.tcl || die } multilib_src_configure() { @@ -151,7 +154,7 @@ # --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 \ + ECONF_SOURCE="${S}"/dist \ STRIP="true" \ econf \ --enable-compat185 \ @@ -215,7 +218,7 @@ # "${S_BASE}/test/testparams.tcl" sed -ri \ -e '/multi_repmgr/d' \ - "${S_BASE}/test/tcl/test.tcl" || die + "${S}/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. @@ -228,7 +231,7 @@ sed -ri \ -e '/set parms.*repmgr018/d' \ -e 's/repmgr018//g' \ - "${S_BASE}/test/tcl/test.tcl" || die + "${S}/test/tcl/test.tcl" || die multilib-minimal_src_test }