diff options
Diffstat (limited to 'sys-libs/db/db-4.8.30-r1.ebuild')
-rw-r--r-- | sys-libs/db/db-4.8.30-r1.ebuild | 90 |
1 files changed, 57 insertions, 33 deletions
diff --git a/sys-libs/db/db-4.8.30-r1.ebuild b/sys-libs/db/db-4.8.30-r1.ebuild index 372ffad..a26438c 100644 --- a/sys-libs/db/db-4.8.30-r1.ebuild +++ b/sys-libs/db/db-4.8.30-r1.ebuild @@ -2,7 +2,12 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/sys-libs/db/db-4.8.30.ebuild,v 1.16 2013/09/23 19:21:24 ago Exp $ -inherit eutils db flag-o-matic java-pkg-opt-2 autotools multilib +EAPI=5 + +inherit eutils flag-o-matic java-pkg-opt-2 autotools-multilib db-multilib + +AUTOTOOLS_MULTILIB_PARALLEL_PHASES="src_configure src_compile" +DB_MULTILIB_PARALLEL_TEST=yes #Number of official patches #PATCHNO=`echo ${PV}|sed -e "s,\(.*_p\)\([0-9]*\),\2,"` @@ -30,15 +35,18 @@ KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~a IUSE="doc java cxx tcl test" # the entire testsuite needs the TCL functionality -DEPEND="tcl? ( >=dev-lang/tcl-8.4 ) - test? ( >=dev-lang/tcl-8.4 ) +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 ) + >=sys-devel/binutils-2.16.1 + abi_x86_32? ( + !<=app-emulation/emul-linux-x86-baselibs-20130224-r9 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] + )" +RDEPEND="tcl? ( dev-lang/tcl[${MULTILIB_USEDEP}] ) java? ( >=virtual/jre-1.5 )" -src_unpack() { - unpack "${MY_P}".tar.gz +src_prepare() { cd "${WORKDIR}"/"${MY_P}" for (( i=1 ; i<=${PATCHNO} ; i++ )) do @@ -68,7 +76,9 @@ src_unpack() { sed -i \ -e '/^AC_PATH_TOOL/s/ sh, none/ bash, none/' \ aclocal/programs.m4 - AT_M4DIR="aclocal aclocal_java" eautoreconf + + AUTOTOOLS_AUTORECONF=yes + AT_M4DIR="aclocal aclocal_java" autotools-multilib_src_prepare # Upstream sucks - they do autoconf and THEN replace the version variables. . ./RELEASE sed -i \ @@ -80,15 +90,9 @@ src_unpack() { -e "s/__EDIT_DB_VERSION__/$DB_VERSION/g" configure } -src_compile() { +src_configure() { local myconf='' - # 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 - # use `set` here since the java opts will contain whitespace set -- if use java ; then @@ -106,57 +110,77 @@ src_compile() { # Bug #270851: test needs TCL support if use tcl || use test ; then myconf="${myconf} --enable-tcl" - myconf="${myconf} --with-tcl=/usr/$(get_libdir)" + myconf="${myconf} --with-tcl=/usr/@GET_LIBDIR@" else myconf="${myconf} --disable-tcl" fi - cd "${S}" + ehook autotools-multilib-per-abi-pre_src_configure \ + db_perabi_src_configure + ECONF_SOURCE="${S}"/../dist \ STRIP="true" \ - econf \ + autotools-multilib_src_configure \ --enable-compat185 \ --enable-o_direct \ --without-uniquename \ - $(use arm && echo --with-mutex=ARM/gcc-assembly) \ - $(use amd64 && echo --with-mutex=x86/gcc-assembly) \ $(use_enable cxx) \ $(use_enable cxx stl) \ $(use_enable java) \ ${myconf} \ $(use_enable test) \ "$@" +} - emake || die "make failed" +db_perabi_src_configure() { + # compilation with -O0 fails on amd64, see bug #171231 + if abi_arch_use amd64; then + replace-flags -O0 -O2 + is-flagq -O[s123] || append-flags -O2 + fi + + abi_arch_use arm && autotools_multilib_invocation_args+=( + --with-mutex=ARM/gcc-assembly + ) + abi_arch_use amd64 && autotools_multilib_invocation_args+=( + --with-mutex=x86/gcc-assembly + ) + return 0 } src_install() { - emake install DESTDIR="${D}" || die + ehook autotools-multilib-per-abi-post_src_install \ + db_perabi_src_install + autotools-multilib_src_install 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 "${D}"/usr/bin/berkeley_db_svc ]] && \ - mv "${D}"/usr/bin/berkeley_db_svc "${D}"/usr/sbin/berkeley_db"${SLOT/./}"_svc + [[ -f "${ED}"/usr/bin/berkeley_db_svc ]] && \ + mv "${ED}"/usr/bin/berkeley_db_svc "${ED}"/usr/sbin/berkeley_db"${SLOT/./}"_svc +} + +db_perabi_src_install() { + # headerslot must run before usrlibcleanup -- otherwise db{,_185}.h are lost + db_src_install_headerslot + + db_src_install_usrlibcleanup if 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 + 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 + multilib_foreach_abi db_fix_so } pkg_postrm() { - db_fix_so + multilib_foreach_abi db_fix_so } |