Index: apr-util-1.5.3.ebuild =================================================================== RCS file: /var/cvsroot/gentoo-x86/dev-libs/apr-util/apr-util-1.5.3.ebuild,v --- apr-util-1.5.3.ebuild 30 Jan 2014 01:03:49 -0000 1.4 +++ apr-util-1.5.3.ebuild 30 Jan 2014 06:47:08 -0000 @@ -61,7 +61,7 @@ src_configure() { econf \ --datadir="${EPREFIX}"/usr/share/apr-util-1 \ - --with-apr="${EPREFIX}"/usr \ + --with-apr="${SYSROOT}${EPREFIX}"/usr \ --with-expat="${EPREFIX}"/usr \ --without-sqlite2 \ $(use_with freetds) \ @@ -74,14 +74,21 @@ src_configure() { $(use_with postgres pgsql) \ $(use_with sqlite sqlite3) \ ${myconf} + 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 + sed -i -r \ + -e "/^APRUTIL_(LDFLAGS|LIBS)/s:-[RL]/[^ ]*::g" \ + -e "/^INCLUDES/s:(-I)(/usr/include):\1${SYSROOT}\2:g" \ + Makefile || die } src_compile() { - emake CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" - - if use doc; then - emake dox - fi + emake + use doc && emake dox } src_install() {