sys-libs/db: Next batch of EAPI-7 revbumps
authorLars Wendler <polynomial-c@gentoo.org>
Thu, 7 Nov 2019 22:17:39 +0000 (23:17 +0100)
committerLars Wendler <polynomial-c@gentoo.org>
Thu, 7 Nov 2019 22:19:03 +0000 (23:19 +0100)
Fixed some minor issues from previous EAPI-7 revbump.

Closes: https://bugs.gentoo.org/697542
Package-Manager: Portage-2.3.78, Repoman-2.3.17
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
sys-libs/db/db-3.2.9_p2-r1.ebuild
sys-libs/db/db-4.2.52_p5-r2.ebuild
sys-libs/db/db-4.3.29_p1-r2.ebuild
sys-libs/db/db-4.4.20_p4-r2.ebuild
sys-libs/db/db-4.5.20_p2-r2.ebuild [moved from sys-libs/db/db-4.6.21_p4.ebuild with 53% similarity]
sys-libs/db/db-4.6.21_p4-r1.ebuild [moved from sys-libs/db/db-4.5.20_p2-r1.ebuild with 50% similarity]
sys-libs/db/db-4.7.25_p4-r1.ebuild [moved from sys-libs/db/db-4.7.25_p4.ebuild with 65% similarity]
sys-libs/db/files/db-4.5-libtool.patch
sys-libs/db/files/db-4.6-jni-check-prefix-first.patch
sys-libs/db/files/db-4.6-libtool.patch

index 39694fde8a7dd2cbbdcb09903c9e1e212de929b5..a575baafe1c961a0845ef5f6de57c0731dd47b5d 100644 (file)
@@ -81,8 +81,6 @@ src_configure() {
                --enable-cxx
                --enable-compat185
                --enable-dump185
-               --libdir="${EPREFIX}"/usr/$(get_libdir)
-               --prefix="${EPREFIX}"/usr
        )
 
        local conf_shared=(
@@ -113,7 +111,7 @@ src_configure() {
        pushd build-static &>/dev/null || die
        strip="${EPREFIX}"/bin/true \
        ECONF_SOURCE="${S}"/dist \
-       econf ${conf[@]} ${conf_static[@]}
+       econf "${conf[@]}" "${conf_static[@]}"
        popd &>/dev/null || die
 
        einfo "Configuring ${P} (shared)..."
@@ -121,7 +119,7 @@ src_configure() {
        pushd build-shared &>/dev/null || die
        strip="${EPREFIX}"/bin/true \
        ECONF_SOURCE="${S}"/dist \
-       econf ${conf[@]} ${conf_shared[@]}
+       econf "${conf[@]}" "${conf_shared[@]}"
        popd &>/dev/null || die
 }
 
index ee47ba9b38333267d043e952478969cc0310e6f1..2db608127ccd4d2559a1fcb907028b899c8ac0a8 100644 (file)
@@ -26,7 +26,7 @@ for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
 done
 
 LICENSE="Sleepycat"
-SLOT="4.2"
+SLOT="$(ver_cut 1-2)"
 KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
 IUSE="tcl java doc cxx rpc"
 
@@ -107,13 +107,6 @@ src_prepare() {
 
 src_configure() {
        local myconf=(
-               --prefix="${EPREFIX}"/usr
-               --mandir="${EPREFIX}"/usr/share/man
-               --infodir="${EPREFIX}"/usr/share/info
-               --datadir="${EPREFIX}"/usr/share
-               --sysconfdir="${EPREFIX}"/etc
-               --localstatedir="${EPREFIX}"/var/lib
-               --libdir="${EPREFIX}"/usr/"$(get_libdir)"
                --enable-compat185
                --with-uniquename
                $(use_enable rpc)
@@ -133,8 +126,6 @@ src_configure() {
                )
        fi
 
-       [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
        # the entire testsuite needs the TCL functionality
        if use tcl && use test; then
                myconf+=( --enable-test )
index 1a90b1c6f2f1e6555941ff29d5139e5912d550cd..a152f3a66fa3b78795b85255ef2946c3120dfaae 100644 (file)
@@ -26,7 +26,7 @@ for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
 done
 
 LICENSE="Sleepycat"
-SLOT="4.3"
+SLOT="$(ver_cut 1-2)"
 KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ppc ppc64 s390 sh sparc x86"
 IUSE="tcl java doc cxx rpc"
 
@@ -108,13 +108,6 @@ src_prepare() {
 
 src_configure() {
        local myconf=(
-               --prefix="${EPREFIX}"/usr
-               --mandir="${EPREFIX}"/usr/share/man
-               --infodir="${EPREFIX}"/usr/share/info
-               --datadir="${EPREFIX}"/usr/share
-               --sysconfdir="${EPREFIX}"/etc
-               --localstatedir="${EPREFIX}"/var/lib
-               --libdir="${EPREFIX}"/usr/"$(get_libdir)"
                --enable-compat185
                --enable-o_direct
                --without-uniquename
@@ -135,8 +128,6 @@ src_configure() {
                )
        fi
 
-       [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
        # the entire testsuite needs the TCL functionality
        if use tcl && use test ; then
                myconf+=( --enable-test )
index 441402e080c89396c076c12317d44d3374a2c9c3..64d3c53846b49121b2d33c33028b3527838c5ab2 100644 (file)
@@ -27,7 +27,7 @@ for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
 done
 
 LICENSE="Sleepycat BSD"
-SLOT="4.4"
+SLOT="$(ver_cut 1-2)"
 KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~m68k ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
 IUSE="tcl java doc cxx rpc"
 
@@ -81,7 +81,7 @@ src_prepare() {
        done
        # END of 4.5+earlier specific
        pushd dist &>/dev/null || die
-       rm -f aclocal/libtool.{m4,ac} || die
+       rm aclocal/libtool.{m4,ac} || die
 
        AT_M4DIR="aclocal aclocal_java" eautoreconf
 
@@ -102,13 +102,6 @@ src_prepare() {
 
 src_configure() {
        local myconf=(
-               --prefix="${EPREFIX}"/usr
-               --mandir="${EPREFIX}"/usr/share/man
-               --infodir="${EPREFIX}"/usr/share/info
-               --datadir="${EPREFIX}"/usr/share
-               --sysconfdir="${EPREFIX}"/etc
-               --localstatedir="${EPREFIX}"/var/lib
-               --libdir="${EPREFIX}"/usr/"$(get_libdir)"
                --enable-compat185
                --enable-o_direct
                --without-uniquename
@@ -129,8 +122,6 @@ src_configure() {
                )
        fi
 
-       [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
        # the entire testsuite needs the TCL functionality
        if use tcl && use test ; then
                myconf+=( --enable-test )
similarity index 53%
rename from sys-libs/db/db-4.6.21_p4.ebuild
rename to sys-libs/db/db-4.5.20_p2-r2.ebuild
index ed807c87586b985f7378429dfbb297fd2e7c42ae..c44739cf0a9026c647a79852c58ec7bb68e1ae38 100644 (file)
@@ -1,20 +1,20 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=0
+EAPI=7
 
-inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib
+inherit autotools db flag-o-matic java-pkg-opt-2 multilib
 
 #Number of official patches
 #PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
-PATCHNO=${PV/*.*.*_p}
+PATCHNO="${PV/*.*.*_p}"
 if [[ ${PATCHNO} == "${PV}" ]] ; then
-       MY_PV=${PV}
-       MY_P=${P}
+       MY_PV="${PV}"
+       MY_P="${P}"
        PATCHNO=0
 else
-       MY_PV=${PV/_p${PATCHNO}}
-       MY_P=${PN}-${MY_PV}
+       MY_PV="${PV/_p${PATCHNO}}"
+       MY_P="${PN}-${MY_PV}"
 fi
 
 S="${WORKDIR}/${MY_P}/build_unix"
@@ -26,7 +26,7 @@ for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
 done
 
 LICENSE="Sleepycat"
-SLOT="4.6"
+SLOT="$(ver_cut 1-2)"
 KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
 IUSE="tcl java doc cxx rpc"
 
@@ -36,79 +36,107 @@ DEPEND="tcl? ( >=dev-lang/tcl-8.4 )
 RDEPEND="tcl? ( dev-lang/tcl )
        java? ( >=virtual/jre-1.4 )"
 
+PATCHES=(
+       "${FILESDIR}"/"${PN}"-"${SLOT}"-libtool.patch
+
+       # use the includes from the prefix
+       "${FILESDIR}"/"${PN}"-4.3-jni-check-prefix-first.patch
+       "${FILESDIR}"/"${PN}"-4.3-listen-to-java-options.patch
+)
+
+# Required to avoid unpack attempt of patches
 src_unpack() {
        unpack "${MY_P}".tar.gz
-       cd "${WORKDIR}"/"${MY_P}"
+}
+
+src_prepare() {
+       pushd "${WORKDIR}"/"${MY_P}" &>/dev/null || die
        for (( i=1 ; i<=${PATCHNO} ; i++ ))
        do
-               epatch "${DISTDIR}"/patch."${MY_PV}"."${i}"
+               eapply -p0 "${DISTDIR}"/patch."${MY_PV}"."${i}"
        done
-       epatch "${FILESDIR}"/"${PN}"-"${SLOT}"-libtool.patch
 
-       # use the includes from the prefix
-       epatch "${FILESDIR}"/"${PN}"-"${SLOT}"-jni-check-prefix-first.patch
-       epatch "${FILESDIR}"/"${PN}"-4.3-listen-to-java-options.patch
+       default
 
-       sed -e "/^DB_RELEASE_DATE=/s/%B %e, %Y/%Y-%m-%d/" -i dist/RELEASE
+       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 \
+       sed -r \
                -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
-               "${S}"/../dist/Makefile.in
-
-       cd "${S}"/../dist
-       rm -f aclocal/libtool.m4
-       sed -i \
+               -i dist/Makefile.in || die
+
+       # START of 4.5+earlier specific
+       # Upstream sucks, they normally concat these
+       local i j
+       for j in dist/aclocal{,_java} ; do
+               pushd ${j} &>/dev/null || die
+               for i in * ; do
+                       ln -s ${i} ${i%.ac}.m4 || die
+               done
+               popd &>/dev/null || die
+       done
+       # END of 4.5+earlier specific
+       pushd dist &>/dev/null || die
+       rm aclocal/libtool.{m4,ac} || die
+       sed \
                -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
-               configure.ac
-       sed -i \
+               -i configure.ac || die
+       sed \
                -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
-               aclocal/programs.m4
+               -i aclocal/programs.m4 || die
+
        AT_M4DIR="aclocal aclocal_java" eautoreconf
+
        # Upstream sucks - they do autoconf and THEN replace the version variables.
        . ./RELEASE
-       sed -i \
+       sed \
                -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
+               -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" \
+               -i configure || die
+
+       popd &>/dev/null || die
+       popd &>/dev/null || die
 }
 
-src_compile() {
+src_configure() {
        # compilation with -O0 fails on amd64, see bug #171231
-       if use amd64; then
+       if use amd64 ; then
                replace-flags -O0 -O2
                is-flagq -O[s123] || append-flags -O2
        fi
 
-       local myconf=""
-
-       use amd64 && myconf="${myconf} --with-mutex=x86/gcc-assembly"
+       local myconf=(
+               --enable-compat185
+               --enable-o_direct
+               --without-uniquename
+               $(use_enable rpc)
+               --host="${CHOST}"
 
-       myconf="${myconf} $(use_enable cxx)"
+               $(usex amd64 '--with-mutex=x86/gcc-assembly' '')
+               $(use_enable cxx)
+               $(use_enable tcl)
+               $(usex tcl "--with-tcl=${EPREFIX}/usr/$(get_libdir)" '') #"
+               $(use_enable java)
+       )
 
-       use tcl \
-               && myconf="${myconf} --enable-tcl --with-tcl=${EPREFIX}/usr/$(get_libdir)" \
-               || myconf="${myconf} --disable-tcl"
-
-       myconf="${myconf} $(use_enable java)"
        if use java; then
-               myconf="${myconf} --with-java-prefix=${JAVA_HOME}"
-               # Can't get this working any other way, since it returns spaces, and
-               # bash doesn't seem to want to pass correctly in any way i try
-               local javaconf="-with-javac-flags=$(java-pkg_javac-args)"
+               myconf+=(
+                       --with-java-prefix="${JAVA_HOME}"
+                       --with-javac-flags="$(java-pkg_javac-args)"
+               )
        fi
 
-       [[ -n ${CBUILD} ]] && myconf="${myconf} --build=${CBUILD}"
-
        # the entire testsuite needs the TCL functionality
        if use tcl && use test ; then
-               myconf="${myconf} --enable-test"
+               myconf+=( --enable-test )
        else
-               myconf="${myconf} --disable-test"
+               myconf+=( --disable-test )
        fi
 
        # Add linker versions to the symbols. Easier to do, and safer than header file
@@ -117,29 +145,18 @@ src_compile() {
                append-ldflags -Wl,--default-symver
        fi
 
-       cd "${S}" && ECONF_SOURCE="${S}"/../dist econf \
-               --prefix="${EPREFIX}"/usr \
-               --mandir="${EPREFIX}"/usr/share/man \
-               --infodir="${EPREFIX}"/usr/share/info \
-               --datadir="${EPREFIX}"/usr/share \
-               --sysconfdir="${EPREFIX}"/etc \
-               --localstatedir="${EPREFIX}"/var/lib \
-               --libdir="${EPREFIX}"/usr/"$(get_libdir)" \
-               --enable-compat185 \
-               --enable-o_direct \
-               --without-uniquename \
-               $(use_enable rpc) \
-               --host="${CHOST}" \
-               ${myconf}  "${javaconf}" || die "configure failed"
-
-       sed -e "s,\(^STRIP *=\).*,\1\"true\"," Makefile > Makefile.cpy \
-           && mv Makefile.cpy Makefile
-
-       emake || die "make failed"
+       ECONF_SOURCE="${S}"/../dist \
+       econf "${myconf[@]}"
+
+       sed -e "s,\(^STRIP *=\).*,\1\"true\"," -i Makefile || die
 }
 
 src_install() {
-       einstall libdir="${ED}/usr/$(get_libdir)" STRIP="true" || die
+       emake \
+               DESTDIR="${D}" \
+               libdir="${EPREFIX}/usr/$(get_libdir)" \
+               STRIP="true" \
+               install
 
        db_src_install_usrbinslot
 
@@ -151,8 +168,10 @@ src_install() {
 
        dodir /usr/sbin
        # This file is not always built, and no longer exists as of db-4.8
-       [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] && \
-       mv "${ED}"/usr/bin/berkeley_db_svc "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc
+       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
 
        if use java; then
                java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
similarity index 50%
rename from sys-libs/db/db-4.5.20_p2-r1.ebuild
rename to sys-libs/db/db-4.6.21_p4-r1.ebuild
index 6509b9634399d64d98a47d100dca49a5678f4766..00ab2118d14957655fc061178adcd9e29096d6bd 100644 (file)
@@ -1,20 +1,20 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=0
+EAPI=7
 
-inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib
+inherit autotools db flag-o-matic java-pkg-opt-2 multilib
 
 #Number of official patches
 #PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
-PATCHNO=${PV/*.*.*_p}
+PATCHNO="${PV/*.*.*_p}"
 if [[ ${PATCHNO} == "${PV}" ]] ; then
-       MY_PV=${PV}
-       MY_P=${P}
+       MY_PV="${PV}"
+       MY_P="${P}"
        PATCHNO=0
 else
-       MY_PV=${PV/_p${PATCHNO}}
-       MY_P=${PN}-${MY_PV}
+       MY_PV="${PV/_p${PATCHNO}}"
+       MY_P="${PN}-${MY_PV}"
 fi
 
 S="${WORKDIR}/${MY_P}/build_unix"
@@ -26,7 +26,7 @@ for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
 done
 
 LICENSE="Sleepycat"
-SLOT="4.5"
+SLOT="$(ver_cut 1-2)"
 KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86"
 IUSE="tcl java doc cxx rpc"
 
@@ -36,86 +36,96 @@ DEPEND="tcl? ( >=dev-lang/tcl-8.4 )
 RDEPEND="tcl? ( dev-lang/tcl )
        java? ( >=virtual/jre-1.4 )"
 
+PATCHES=(
+       "${FILESDIR}"/"${PN}"-"${SLOT}"-libtool.patch
+
+       # use the includes from the prefix
+       "${FILESDIR}"/"${PN}"-"${SLOT}"-jni-check-prefix-first.patch
+       "${FILESDIR}"/"${PN}"-4.3-listen-to-java-options.patch
+)
+
+# Required to avoid unpack attempt of patches
 src_unpack() {
        unpack "${MY_P}".tar.gz
-       cd "${WORKDIR}"/"${MY_P}"
+}
+
+src_prepare() {
+       pushd "${WORKDIR}"/"${MY_P}" &>/dev/null || die
        for (( i=1 ; i<=${PATCHNO} ; i++ ))
        do
-               epatch "${DISTDIR}"/patch."${MY_PV}"."${i}"
+               eapply -p0 "${DISTDIR}"/patch."${MY_PV}"."${i}"
        done
-       epatch "${FILESDIR}"/"${PN}"-"${SLOT}"-libtool.patch
 
-       # use the includes from the prefix
-       epatch "${FILESDIR}"/"${PN}"-4.3-jni-check-prefix-first.patch
-       epatch "${FILESDIR}"/"${PN}"-4.3-listen-to-java-options.patch
+       default
 
-       sed -e "/^DB_RELEASE_DATE=/s/%B %e, %Y/%Y-%m-%d/" -i dist/RELEASE
+       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 \
+       sed -r \
                -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
-               "${S}"/../dist/Makefile.in
-
-       # START of 4.5+earlier specific
-       # Upstream sucks, they normally concat these
-       cd "${S}"/../dist/aclocal
-       for i in *; do ln -s $i ${i%.ac}.m4 ; done ;
-       cd "${S}"/../dist/aclocal_java
-       for i in *; do ln -s $i ${i%.ac}.m4 ; done ;
-       # END of 4.5+earlier specific
-       cd "${S}"/../dist
-       rm -f aclocal/libtool.{m4,ac} aclocal.m4
-       sed -i \
+               -i dist/Makefile.in || die
+
+       pushd dist &>/dev/null || die
+       rm aclocal/libtool.m4 || die
+       sed \
                -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
-               configure.ac
-       sed -i \
+               -i configure.ac || die
+       sed \
                -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
-               aclocal/programs.m4
+               -i aclocal/programs.m4 || die
+
        AT_M4DIR="aclocal aclocal_java" eautoreconf
+
        # Upstream sucks - they do autoconf and THEN replace the version variables.
        . ./RELEASE
-       sed -i \
+       sed \
                -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
+               -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" \
+               -i configure || die
+
+       popd &>/dev/null || die
+       popd &>/dev/null || die
 }
 
-src_compile() {
+src_configure() {
        # compilation with -O0 fails on amd64, see bug #171231
-       if use amd64; then
+       if use amd64 ; then
                replace-flags -O0 -O2
                is-flagq -O[s123] || append-flags -O2
        fi
 
-       local myconf=""
-
-       use amd64 && myconf="${myconf} --with-mutex=x86/gcc-assembly"
-
-       myconf="${myconf} $(use_enable cxx)"
+       local myconf=(
+               --enable-compat185
+               --enable-o_direct
+               --without-uniquename
+               $(use_enable rpc)
+               --host="${CHOST}"
 
-       use tcl \
-               && myconf="${myconf} --enable-tcl --with-tcl=${EPREFIX}/usr/$(get_libdir)" \
-               || myconf="${myconf} --disable-tcl"
+               $(usex amd64 '--with-mutex=x86/gcc-assembly' '')
+               $(use_enable cxx)
+               $(use_enable tcl)
+               $(usex tcl "--with-tcl=${EPREFIX}/usr/$(get_libdir)" '') #"
+               $(use_enable java)
+       )
 
-       myconf="${myconf} $(use_enable java)"
        if use java; then
-               myconf="${myconf} --with-java-prefix=${JAVA_HOME}"
-               # Can't get this working any other way, since it returns spaces, and
-               # bash doesn't seem to want to pass correctly in any way i try
-               local javaconf="-with-javac-flags=$(java-pkg_javac-args)"
+               myconf+=(
+                       --with-java-prefix="${JAVA_HOME}"
+                       --with-javac-flags="$(java-pkg_javac-args)"
+               )
        fi
 
-       [[ -n ${CBUILD} ]] && myconf="${myconf} --build=${CBUILD}"
-
        # the entire testsuite needs the TCL functionality
        if use tcl && use test ; then
-               myconf="${myconf} --enable-test"
+               myconf+=( --enable-test )
        else
-               myconf="${myconf} --disable-test"
+               myconf+=( --disable-test )
        fi
 
        # Add linker versions to the symbols. Easier to do, and safer than header file
@@ -124,29 +134,18 @@ src_compile() {
                append-ldflags -Wl,--default-symver
        fi
 
-       cd "${S}" && ECONF_SOURCE="${S}"/../dist econf \
-               --prefix="${EPREFIX}"/usr \
-               --mandir="${EPREFIX}"/usr/share/man \
-               --infodir="${EPREFIX}"/usr/share/info \
-               --datadir="${EPREFIX}"/usr/share \
-               --sysconfdir="${EPREFIX}"/etc \
-               --localstatedir="${EPREFIX}"/var/lib \
-               --libdir="${EPREFIX}"/usr/"$(get_libdir)" \
-               --enable-compat185 \
-               --enable-o_direct \
-               --without-uniquename \
-               $(use_enable rpc) \
-               --host="${CHOST}" \
-               ${myconf}  "${javaconf}" || die "configure failed"
-
-       sed -e "s,\(^STRIP *=\).*,\1\"true\"," Makefile > Makefile.cpy \
-           && mv Makefile.cpy Makefile
-
-       emake || die "make failed"
+       ECONF_SOURCE="${S}"/../dist \
+       econf "${myconf[@]}"
+
+       sed -e "s,\(^STRIP *=\).*,\1\"true\"," -i Makefile || die
 }
 
 src_install() {
-       einstall libdir="${ED}/usr/$(get_libdir)" STRIP="true" || die
+       emake \
+               DESTDIR="${D}" \
+               libdir="${EPREFIX}/usr/$(get_libdir)" \
+               STRIP="true" \
+               install
 
        db_src_install_usrbinslot
 
@@ -158,8 +157,10 @@ src_install() {
 
        dodir /usr/sbin
        # This file is not always built, and no longer exists as of db-4.8
-       [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] && \
-       mv "${ED}"/usr/bin/berkeley_db_svc "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc
+       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
 
        if use java; then
                java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
similarity index 65%
rename from sys-libs/db/db-4.7.25_p4.ebuild
rename to sys-libs/db/db-4.7.25_p4-r1.ebuild
index 7134fc1a80af5509f22cbb897e13937f801ab6eb..69af40930efd1f6b13140e0c932516009b7b1712 100644 (file)
@@ -1,20 +1,20 @@
 # Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=0
+EAPI=7
 
-inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib
+inherit autotools db flag-o-matic java-pkg-opt-2 multilib
 
 #Number of official patches
 #PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"`
-PATCHNO=${PV/*.*.*_p}
+PATCHNO="${PV/*.*.*_p}"
 if [[ ${PATCHNO} == "${PV}" ]] ; then
-       MY_PV=${PV}
-       MY_P=${P}
+       MY_PV="${PV}"
+       MY_P="${P}"
        PATCHNO=0
 else
-       MY_PV=${PV/_p${PATCHNO}}
-       MY_P=${PN}-${MY_PV}
+       MY_PV="${PV/_p${PATCHNO}}"
+       MY_P="${PN}-${MY_PV}"
 fi
 
 S="${WORKDIR}/${MY_P}/build_unix"
@@ -26,7 +26,7 @@ for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do
 done
 
 LICENSE="Sleepycat"
-SLOT="4.7"
+SLOT="$(ver_cut 1-2)"
 KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ppc ppc64 s390 sh sparc x86"
 IUSE="doc java cxx tcl test rpc"
 
@@ -38,62 +38,96 @@ DEPEND="tcl? ( >=dev-lang/tcl-8.4 )
 RDEPEND="tcl? ( dev-lang/tcl )
        java? ( >=virtual/jre-1.5 )"
 
+PATCHES=(
+       "${FILESDIR}"/"${PN}"-4.6-libtool.patch
+
+       # use the includes from the prefix
+       "${FILESDIR}"/"${PN}"-4.6-jni-check-prefix-first.patch
+       "${FILESDIR}"/"${PN}"-4.3-listen-to-java-options.patch
+)
+
+# Required to avoid unpack attempt of patches
 src_unpack() {
        unpack "${MY_P}".tar.gz
-       cd "${WORKDIR}"/"${MY_P}"
+}
+
+src_prepare() {
+       pushd "${WORKDIR}"/"${MY_P}" &>/dev/null || die
        for (( i=1 ; i<=${PATCHNO} ; i++ ))
        do
-               epatch "${DISTDIR}"/patch."${MY_PV}"."${i}"
+               eapply -p0 "${DISTDIR}"/patch."${MY_PV}"."${i}"
        done
-       epatch "${FILESDIR}"/"${PN}"-4.6-libtool.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
+       default
 
-       sed -e "/^DB_RELEASE_DATE=/s/%B %e, %Y/%Y-%m-%d/" -i dist/RELEASE
+       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 \
+       sed -r \
                -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \
-               "${S}"/../dist/Makefile.in
+               -i dist/Makefile.in || die
 
-       cd "${S}"/../dist
-       rm -f aclocal/libtool.m4
-       sed -i \
+       pushd dist &>/dev/null || die
+       rm aclocal/libtool.m4 || die
+       sed \
                -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \
-               configure.ac
-       sed -i \
+               -i configure.ac || die
+       sed \
                -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \
-               aclocal/programs.m4
+               -i aclocal/programs.m4 || die
+
        AT_M4DIR="aclocal aclocal_java" eautoreconf
+
        # Upstream sucks - they do autoconf and THEN replace the version variables.
        . ./RELEASE
-       sed -i \
+       sed \
                -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
-}
+               -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" \
+               -i configure || die
 
-src_compile() {
-       local myconf=''
+       popd &>/dev/null || die
+       popd &>/dev/null || die
+}
 
+src_configure() {
        # compilation with -O0 fails on amd64, see bug #171231
-       if use amd64; then
+       if use amd64 ; then
                replace-flags -O0 -O2
                is-flagq -O[s123] || append-flags -O2
        fi
 
-       # use `set` here since the java opts will contain whitespace
-       set --
-       if use java ; then
-               set -- "$@" \
-                       --with-java-prefix="${JAVA_HOME}" \
+       local myconf=(
+               --enable-compat185
+               --enable-o_direct
+               --without-uniquename
+               $(use_enable rpc)
+
+               $(usex amd64 '--with-mutex=x86/gcc-assembly' '')
+               $(use_enable cxx)
+               $(use_enable tcl)
+               $(usex tcl "--with-tcl=${EPREFIX}/usr/$(get_libdir)" '') #"
+               $(use_enable java)
+               $(use_enable test)
+       )
+
+       if 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-test )
+       else
+               myconf+=( --disable-test )
        fi
 
        # Add linker versions to the symbols. Easier to do, and safer than header file
@@ -102,41 +136,22 @@ src_compile() {
                append-ldflags -Wl,--default-symver
        fi
 
-       # Bug #270851: test needs TCL support
-       if use tcl || use test ; then
-               myconf="${myconf} --enable-tcl"
-               myconf="${myconf} --with-tcl=${EPREFIX}/usr/$(get_libdir)"
-       else
-               myconf="${myconf} --disable-tcl"
-       fi
-
-       cd "${S}"
        ECONF_SOURCE="${S}"/../dist \
        STRIP="true" \
-       econf \
-               --enable-compat185 \
-               --enable-o_direct \
-               --without-uniquename \
-               $(use_enable rpc) \
-               $(use amd64 && echo --with-mutex=x86/gcc-assembly) \
-               $(use_enable cxx) \
-               $(use_enable java) \
-               ${myconf} \
-               $(use_enable test) \
-               "$@"
+       econf "${myconf[@]}"
+
        # The embedded assembly on ARM does not work on newer hardware
        # so you CANNOT use --with-mutex=ARM/gcc-assembly anymore.
        # Specifically, it uses the SWPB op, which was deprecated:
        # http://www.keil.com/support/man/docs/armasm/armasm_dom1361289909499.htm
+
        # The op ALSO cannot be used in ARM-Thumb mode.
        # Trust the compiler instead.
        # >=db-6.1 uses LDREX instead.
-
-       emake || die "make failed"
 }
 
 src_install() {
-       emake install DESTDIR="${D}" || die
+       emake DESTDIR="${D}" install
 
        db_src_install_usrbinslot
 
@@ -148,8 +163,10 @@ src_install() {
 
        dodir /usr/sbin
        # This file is not always built, and no longer exists as of db-4.8
-       [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] && \
-       mv "${ED}"/usr/bin/berkeley_db_svc "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc
+       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
 
        if use java; then
                java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so
index 3d86b88f86b37a889728dc6a2a65de4f39355d93..b4d2fc8d73cfc1122182d38b6b534ca6f82f70df 100644 (file)
@@ -1,5 +1,5 @@
---- dist/configure.orig        2006-01-31 10:23:58.000000000 +0100
-+++ dist/configure     2006-01-31 10:26:43.000000000 +0100
+--- a/dist/configure
++++ b/dist/configure
 @@ -5765,7 +5765,7 @@
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else
index 63735e62469f07a326adc4a5043c1e51e600c823..a0b2800d12866bb194edfbc2fb7870685da97ebd 100644 (file)
@@ -1,5 +1,5 @@
---- 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
+--- a/dist/aclocal_java/ac_jni_include_dirs.m4
++++ b/dist/aclocal_java/ac_jni_include_dirs.m4
 @@ -43,14 +43,19 @@
  *)    AC_MSG_ERROR([$_ACJNI_JAVAC is not an absolute path name]);;
  esac
index 3d86b88f86b37a889728dc6a2a65de4f39355d93..b4d2fc8d73cfc1122182d38b6b534ca6f82f70df 100644 (file)
@@ -1,5 +1,5 @@
---- dist/configure.orig        2006-01-31 10:23:58.000000000 +0100
-+++ dist/configure     2006-01-31 10:26:43.000000000 +0100
+--- a/dist/configure
++++ b/dist/configure
 @@ -5765,7 +5765,7 @@
    echo $ECHO_N "(cached) $ECHO_C" >&6
  else