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>
--enable-cxx
--enable-compat185
--enable-dump185
- --libdir="${EPREFIX}"/usr/$(get_libdir)
- --prefix="${EPREFIX}"/usr
)
local conf_shared=(
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)..."
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
}
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"
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)
)
fi
- [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
# the entire testsuite needs the TCL functionality
if use tcl && use test; then
myconf+=( --enable-test )
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"
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
)
fi
- [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
# the entire testsuite needs the TCL functionality
if use tcl && use test ; then
myconf+=( --enable-test )
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"
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
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
)
fi
- [[ -n ${CBUILD} ]] && myconf+=( --build=${CBUILD} )
-
# the entire testsuite needs the TCL functionality
if use tcl && use test ; then
myconf+=( --enable-test )
-# 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"
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"
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
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
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
-# 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"
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"
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
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
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
# 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"
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"
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
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
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
---- 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
---- 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
---- 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