commit: a159ca3e2c2f6466507807024a3035fe2cd62e24 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> AuthorDate: Thu Nov 7 22:17:39 2019 +0000 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> CommitDate: Thu Nov 7 22:19:03 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a159ca3e
sys-libs/db: Next batch of EAPI-7 revbumps 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 <AT> gentoo.org> sys-libs/db/db-3.2.9_p2-r1.ebuild | 6 +- sys-libs/db/db-4.2.52_p5-r2.ebuild | 11 +- sys-libs/db/db-4.3.29_p1-r2.ebuild | 11 +- sys-libs/db/db-4.4.20_p4-r2.ebuild | 13 +- sys-libs/db/db-4.5.20_p2-r1.ebuild | 177 --------------------- ...{db-4.6.21_p4.ebuild => db-4.5.20_p2-r2.ebuild} | 155 ++++++++++-------- ...-4.3.29_p1-r2.ebuild => db-4.6.21_p4-r1.ebuild} | 50 +++--- ...{db-4.7.25_p4.ebuild => db-4.7.25_p4-r1.ebuild} | 135 +++++++++------- sys-libs/db/files/db-4.5-libtool.patch | 4 +- .../db/files/db-4.6-jni-check-prefix-first.patch | 4 +- sys-libs/db/files/db-4.6-libtool.patch | 4 +- 11 files changed, 193 insertions(+), 377 deletions(-) diff --git a/sys-libs/db/db-3.2.9_p2-r1.ebuild b/sys-libs/db/db-3.2.9_p2-r1.ebuild index 39694fde8a7..a575baafe1c 100644 --- a/sys-libs/db/db-3.2.9_p2-r1.ebuild +++ b/sys-libs/db/db-3.2.9_p2-r1.ebuild @@ -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 } diff --git a/sys-libs/db/db-4.2.52_p5-r2.ebuild b/sys-libs/db/db-4.2.52_p5-r2.ebuild index ee47ba9b383..2db608127cc 100644 --- a/sys-libs/db/db-4.2.52_p5-r2.ebuild +++ b/sys-libs/db/db-4.2.52_p5-r2.ebuild @@ -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 ) diff --git a/sys-libs/db/db-4.3.29_p1-r2.ebuild b/sys-libs/db/db-4.3.29_p1-r2.ebuild index 1a90b1c6f2f..a152f3a66fa 100644 --- a/sys-libs/db/db-4.3.29_p1-r2.ebuild +++ b/sys-libs/db/db-4.3.29_p1-r2.ebuild @@ -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 ) diff --git a/sys-libs/db/db-4.4.20_p4-r2.ebuild b/sys-libs/db/db-4.4.20_p4-r2.ebuild index 441402e080c..64d3c53846b 100644 --- a/sys-libs/db/db-4.4.20_p4-r2.ebuild +++ b/sys-libs/db/db-4.4.20_p4-r2.ebuild @@ -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 ) diff --git a/sys-libs/db/db-4.5.20_p2-r1.ebuild b/sys-libs/db/db-4.5.20_p2-r1.ebuild deleted file mode 100644 index 6509b963439..00000000000 --- a/sys-libs/db/db-4.5.20_p2-r1.ebuild +++ /dev/null @@ -1,177 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=0 - -inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib - -#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/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="4.5" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86" -IUSE="tcl java doc cxx rpc" - -DEPEND="tcl? ( >=dev-lang/tcl-8.4 ) - java? ( >=virtual/jdk-1.4 ) - >=sys-devel/binutils-2.16.1" -RDEPEND="tcl? ( dev-lang/tcl ) - java? ( >=virtual/jre-1.4 )" - -src_unpack() { - unpack "${MY_P}".tar.gz - cd "${WORKDIR}"/"${MY_P}" - for (( i=1 ; i<=${PATCHNO} ; i++ )) - do - epatch "${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 - - sed -e "/^DB_RELEASE_DATE=/s/%B %e, %Y/%Y-%m-%d/" -i dist/RELEASE - - # 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 - - # 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 \ - -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \ - configure.ac - sed -i \ - -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \ - aclocal/programs.m4 - 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 -} - -src_compile() { - # compilation with -O0 fails on amd64, see bug #171231 - 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)" - - 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)" - fi - - [[ -n ${CBUILD} ]] && myconf="${myconf} --build=${CBUILD}" - - # the entire testsuite needs the TCL functionality - if use tcl && use test ; then - myconf="${myconf} --enable-test" - else - myconf="${myconf} --disable-test" - fi - - # 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 - - 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" -} - -src_install() { - einstall libdir="${ED}/usr/$(get_libdir)" STRIP="true" || die - - db_src_install_usrbinslot - - db_src_install_headerslot - - db_src_install_doc - - db_src_install_usrlibcleanup - - 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 use java; then - java-pkg_regso "${ED}"/usr/"$(get_libdir)"/libdb_java*.so - java-pkg_dojar "${ED}"/usr/"$(get_libdir)"/*.jar - rm -f "${ED}"/usr/"$(get_libdir)"/*.jar - fi -} - -pkg_postinst() { - db_fix_so -} - -pkg_postrm() { - db_fix_so -} diff --git a/sys-libs/db/db-4.6.21_p4.ebuild b/sys-libs/db/db-4.5.20_p2-r2.ebuild 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 ed807c87586..c44739cf0a9 100644 --- a/sys-libs/db/db-4.6.21_p4.ebuild +++ b/sys-libs/db/db-4.5.20_p2-r2.ebuild @@ -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 diff --git a/sys-libs/db/db-4.3.29_p1-r2.ebuild b/sys-libs/db/db-4.6.21_p4-r1.ebuild similarity index 79% copy from sys-libs/db/db-4.3.29_p1-r2.ebuild copy to sys-libs/db/db-4.6.21_p4-r1.ebuild index 1a90b1c6f2f..00ab2118d14 100644 --- a/sys-libs/db/db-4.3.29_p1-r2.ebuild +++ b/sys-libs/db/db-4.6.21_p4-r1.ebuild @@ -26,8 +26,8 @@ for (( i=1 ; i<=${PATCHNO} ; i++ )) ; do done LICENSE="Sleepycat" -SLOT="4.3" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ppc ppc64 s390 sh sparc x86" +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" DEPEND="tcl? ( >=dev-lang/tcl-8.4 ) @@ -41,9 +41,7 @@ PATCHES=( # use the includes from the prefix "${FILESDIR}"/"${PN}"-"${SLOT}"-jni-check-prefix-first.patch - "${FILESDIR}"/"${PN}"-"${SLOT}"-listen-to-java-options.patch - - "${FILESDIR}"/"${PN}"-4.3.27-fix-dep-link.patch + "${FILESDIR}"/"${PN}"-4.3-listen-to-java-options.patch ) # Required to avoid unpack attempt of patches @@ -67,27 +65,15 @@ src_prepare() { # This supersedes the unused jarlocation patches. sed -r \ -e '/jarfile=.*\.jar$/s,(.jar$),-$(LIBVERSION)\1,g' \ - 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 + -i dist/Makefile.in || die pushd dist &>/dev/null || die - rm aclocal/libtool.{m4,ac} || die + rm aclocal/libtool.m4 || die sed \ -e '/AC_PROG_LIBTOOL$/aLT_OUTPUT' \ -i configure.ac || die sed \ - -e '/^AC_PATH_TOOL/s/ sh, missing_sh/ bash, missing_sh/' \ + -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \ -i aclocal/programs.m4 || die AT_M4DIR="aclocal aclocal_java" eautoreconf @@ -102,19 +88,19 @@ src_prepare() { -e "s/__EDIT_DB_VERSION_UNIQUE_NAME__/$DB_VERSION_UNIQUE_NAME/g" \ -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" \ -i configure || die + popd &>/dev/null || die popd &>/dev/null || die } src_configure() { + # compilation with -O0 fails on amd64, see bug #171231 + if use amd64 ; then + replace-flags -O0 -O2 + is-flagq -O[s123] || append-flags -O2 + fi + 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 +121,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 ) @@ -144,21 +128,23 @@ src_configure() { myconf+=( --disable-test ) fi - # Add linker versions to the symbols. Easier to do, and safer than header - # file mumbo jumbo. + # 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 ECONF_SOURCE="${S}"/../dist \ econf "${myconf[@]}" + + sed -e "s,\(^STRIP *=\).*,\1\"true\"," -i Makefile || die } src_install() { emake \ DESTDIR="${D}" \ libdir="${EPREFIX}/usr/$(get_libdir)" \ - strip="${EPREFIX}/bin/strip" \ + STRIP="true" \ install db_src_install_usrbinslot diff --git a/sys-libs/db/db-4.7.25_p4.ebuild b/sys-libs/db/db-4.7.25_p4-r1.ebuild 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 7134fc1a80a..69af40930ef 100644 --- a/sys-libs/db/db-4.7.25_p4.ebuild +++ b/sys-libs/db/db-4.7.25_p4-r1.ebuild @@ -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 diff --git a/sys-libs/db/files/db-4.5-libtool.patch b/sys-libs/db/files/db-4.5-libtool.patch index 3d86b88f86b..b4d2fc8d73c 100644 --- a/sys-libs/db/files/db-4.5-libtool.patch +++ b/sys-libs/db/files/db-4.5-libtool.patch @@ -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 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 index 63735e62469..a0b2800d128 100644 --- 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 @@ -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 diff --git a/sys-libs/db/files/db-4.6-libtool.patch b/sys-libs/db/files/db-4.6-libtool.patch index 3d86b88f86b..b4d2fc8d73c 100644 --- a/sys-libs/db/files/db-4.6-libtool.patch +++ b/sys-libs/db/files/db-4.6-libtool.patch @@ -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
