--- /usr/portage/dev-libs/elfutils/elfutils-0.166.ebuild 2016-07-06 05:04:35.000000000 -0400 +++ /usr/local/portage/dev-libs/elfutils/elfutils-0.166.ebuild 2017-01-09 21:32:49.000000000 -0500 @@ -4,7 +4,7 @@ EAPI="5" -inherit eutils flag-o-matic multilib-minimal +inherit eutils flag-o-matic multilib-minimal autotools DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)" HOMEPAGE="https://fedorahosted.org/elfutils/" @@ -25,20 +25,28 @@ abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r11 !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] - )" + ) + elibc_uclibc? ( sys-libs/argp-standalone dev-libs/libintl )" # We need to require a newer glibc for its elf.h defs. #571814 DEPEND="${RDEPEND} !=sys-devel/flex-2.5.4a - sys-devel/m4" + sys-devel/m4 + test? ( app-arch/bzip2 )" src_prepare() { + epatch "${FILESDIR}"/0001-libelf-elf_begin.c-fall-back-on-mempcpy-if-no-__memp.patch + epatch "${FILESDIR}"/0006-Remove-DL_CALL_FCT-wrapper-which-is-used-in-profilin.patch epatch "${FILESDIR}"/${PN}-0.118-PaX-support.patch + epatch "${FILESDIR}"/elfutils-0.166-check-libc-dgettext.patch + epatch "${FILESDIR}"/elfutils-0.166-utimes-fallback.patch + epatch "${FILESDIR}"/elfutils-0.166-really-make-werror-conditional-to-build-werror.patch + epatch "${FILESDIR}"/elfutils-0.166-asprintf-insteadof-obstack_printf.patch + use static-libs || sed -i -e '/^lib_LIBRARIES/s:=.*:=:' -e '/^%.os/s:%.o$::' lib{asm,dw,elf}/Makefile.in sed -i 's:-Werror::' */Makefile.in - # some patches touch both configure and configure.ac - find -type f -exec touch -r configure {} + + eautoreconf } src_configure() { @@ -47,8 +55,11 @@ } multilib_src_configure() { + my_use_nls=$(use_enable nls) + use elibc_uclibc && my_use_nls=--enable-nls + ECONF_SOURCE="${S}" econf \ - $(use_enable nls) \ + ${my_use_nls} \ $(use_enable threads thread-safety) \ --program-prefix="eu-" \ --with-zlib \