diff options
author | 2014-01-31 08:12:04 +0000 | |
---|---|---|
committer | 2014-01-31 08:12:04 +0000 | |
commit | 35422a2c0a721d8730a2a3434dff0ae07bc1e342 (patch) | |
tree | 6de2b33b438b73947c48cec56777d177e1d9def3 /dev-libs/apr-util | |
parent | Simplify src_compile/src_install a bit -- no functional changes. (diff) | |
download | gentoo-2-35422a2c0a721d8730a2a3434dff0ae07bc1e342.tar.gz gentoo-2-35422a2c0a721d8730a2a3434dff0ae07bc1e342.tar.bz2 gentoo-2-35422a2c0a721d8730a2a3434dff0ae07bc1e342.zip |
Utilize SYSROOT to locate build-time paths when cross-compiling, and drop redundent -L/-R libdir flags to simplify linking. Rewrite build/rules.mk to pick up current env settings rather than clobbering at make time. #385775 by Bertrand Jacquin.
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
Diffstat (limited to 'dev-libs/apr-util')
-rw-r--r-- | dev-libs/apr-util/ChangeLog | 11 | ||||
-rw-r--r-- | dev-libs/apr-util/apr-util-1.5.3-r1.ebuild | 109 | ||||
-rw-r--r-- | dev-libs/apr-util/files/apr-util-1.5.3-sysroot.patch | 36 |
3 files changed, 155 insertions, 1 deletions
diff --git a/dev-libs/apr-util/ChangeLog b/dev-libs/apr-util/ChangeLog index cf11b957d4db..fe084fa8a8b8 100644 --- a/dev-libs/apr-util/ChangeLog +++ b/dev-libs/apr-util/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for dev-libs/apr-util # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/apr-util/ChangeLog,v 1.196 2014/01/31 08:07:39 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/apr-util/ChangeLog,v 1.197 2014/01/31 08:12:03 vapier Exp $ + +*apr-util-1.5.3-r1 (31 Jan 2014) + + 31 Jan 2014; Mike Frysinger <vapier@gentoo.org> +apr-util-1.5.3-r1.ebuild, + +files/apr-util-1.5.3-sysroot.patch: + Utilize SYSROOT to locate build-time paths when cross-compiling, and drop + redundent -L/-R libdir flags to simplify linking. Rewrite build/rules.mk to + pick up current env settings rather than clobbering at make time. #385775 by + Bertrand Jacquin. 31 Jan 2014; Mike Frysinger <vapier@gentoo.org> apr-util-1.5.3.ebuild: Simplify src_compile/src_install a bit -- no functional changes. diff --git a/dev-libs/apr-util/apr-util-1.5.3-r1.ebuild b/dev-libs/apr-util/apr-util-1.5.3-r1.ebuild new file mode 100644 index 000000000000..ee7086fdd6fb --- /dev/null +++ b/dev-libs/apr-util/apr-util-1.5.3-r1.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/apr-util/apr-util-1.5.3-r1.ebuild,v 1.1 2014/01/31 08:12:03 vapier Exp $ + +EAPI="4" + +# Usually apr-util has the same PV as apr, but in case of security fixes, this may change. +# APR_PV="${PV}" +APR_PV="1.4.6" + +inherit autotools db-use eutils libtool multilib toolchain-funcs + +DESCRIPTION="Apache Portable Runtime Utility Library" +HOMEPAGE="http://apr.apache.org/" +SRC_URI="mirror://apache/apr/${P}.tar.bz2" + +LICENSE="Apache-2.0" +SLOT="1" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="berkdb doc freetds gdbm ldap mysql nss odbc openssl postgres sqlite static-libs" +RESTRICT="test" + +RDEPEND="dev-libs/expat + >=dev-libs/apr-${APR_PV}:1 + berkdb? ( >=sys-libs/db-4 ) + freetds? ( dev-db/freetds ) + gdbm? ( sys-libs/gdbm ) + ldap? ( =net-nds/openldap-2* ) + mysql? ( =virtual/mysql-5* ) + nss? ( dev-libs/nss ) + odbc? ( dev-db/unixODBC ) + openssl? ( dev-libs/openssl ) + postgres? ( dev-db/postgresql-base ) + sqlite? ( dev-db/sqlite:3 )" +DEPEND="${RDEPEND} + doc? ( app-doc/doxygen )" + +DOCS=(CHANGES NOTICE README) + +src_prepare() { + epatch "${FILESDIR}"/${P}-berkdb6.patch #476374 + epatch "${FILESDIR}"/${PN}-1.5.3-sysroot.patch #385775 + eautoreconf + elibtoolize +} + +src_configure() { + local myconf=() + + tc-is-static-only && myconf+=( --disable-util-dso ) + + if use berkdb; then + local db_version + db_version="$(db_findver sys-libs/db)" || die "Unable to find Berkeley DB version" + db_version="$(db_ver_to_slot "${db_version}")" + db_version="${db_version/\./}" + myconf+=( + --with-dbm=db${db_version} + # We use $T for the libdir because otherwise it'd simply be the normal + # system libdir. That's pointless as the compiler will search it for + # us already. This makes cross-compiling and such easier. + --with-berkeley-db="${SYSROOT}$(db_includedir 2>/dev/null):${T}" + ) + else + myconf+=( --without-berkeley-db ) + fi + + econf \ + --datadir="${EPREFIX}"/usr/share/apr-util-1 \ + --with-apr="${SYSROOT}${EPREFIX}"/usr \ + --with-expat="${EPREFIX}"/usr \ + --without-sqlite2 \ + $(use_with freetds) \ + $(use_with gdbm) \ + $(use_with ldap) \ + $(use_with mysql) \ + $(use_with nss) \ + $(use_with odbc) \ + $(use_with openssl) \ + $(use_with postgres pgsql) \ + $(use_with sqlite sqlite3) \ + "${myconf[@]}" + # Use the current env build settings rather than whatever apr was built with. + sed -i -r \ + -e "/^(apr_builddir|apr_builders|top_builddir)=/s:=:=${SYSROOT}:" \ + -e "/^CC=/s:=.*:=$(tc-getCC):" \ + -e '/^(C|CPP|CXX|LD)FLAGS=/d' \ + -e '/^LTFLAGS/s:--silent::' \ + build/rules.mk || die +} + +src_compile() { + emake + use doc && emake dox +} + +src_install() { + default + + find "${ED}" -name "*.la" -delete + find "${ED}usr/$(get_libdir)/apr-util-${SLOT}" -name "*.a" -delete + use static-libs || find "${ED}" -name "*.a" -delete + + use doc && dohtml -r docs/dox/html/* + + # This file is only used on AIX systems, which Gentoo is not, + # and causes collisions between the SLOTs, so remove it. + rm -f "${ED}usr/$(get_libdir)/aprutil.exp" +} diff --git a/dev-libs/apr-util/files/apr-util-1.5.3-sysroot.patch b/dev-libs/apr-util/files/apr-util-1.5.3-sysroot.patch new file mode 100644 index 000000000000..ce07b1470525 --- /dev/null +++ b/dev-libs/apr-util/files/apr-util-1.5.3-sysroot.patch @@ -0,0 +1,36 @@ +https://bugs.gentoo.org/385775 + +utilize $SYSROOT to find the right includedir tree + +drop the -L/-R paths since we know our libdir is the standard path which +the compiler already knows how to locate + +--- a/apu-config.in ++++ b/apu-config.in +@@ -25,7 +25,7 @@ prefix="@prefix@" + exec_prefix="@exec_prefix@" + bindir="@bindir@" + libdir="@libdir@" +-includedir="@includedir@" ++includedir="${SYSROOT}@includedir@" + + LIBS="@APRUTIL_EXPORT_LIBS@" + INCLUDES="@APRUTIL_INCLUDES@" +@@ -166,7 +166,7 @@ while test $# -gt 0; do + --link-ld) + if test "$location" = "installed"; then + ### avoid using -L if libdir is a "standard" location like /usr/lib +- flags="$flags -L$libdir -l$APRUTIL_LIBNAME" ++ flags="$flags -l$APRUTIL_LIBNAME" + else + flags="$flags -L$APU_BUILD_DIR -l$APRUTIL_LIBNAME" + fi +@@ -182,7 +182,7 @@ while test $# -gt 0; do + ### avoid using -L if libdir is a "standard" location like /usr/lib + # Since the user is specifying they are linking with libtool, we + # *know* that -R will be recognized by libtool. +- flags="$flags -L$libdir -R$libdir -l$APRUTIL_LIBNAME" ++ flags="$flags -l$APRUTIL_LIBNAME" + else + flags="$flags $LA_FILE" + fi |