# $Id$ PNAME="elfutils" PVER="0.155" PBUILD="r6" SPLIT_PACKAGES="libelf elfutils-libs elfutils" PCAT="dev-libs" HOMEPAGE="https://fedorahosted.org/elfutils/" LIB_DEPEND=">= virtual/glibc" SDEPEND=">= virtual/sed >= sys-dev/gettext-0.18" SRCFILE="${PNAME}-${PVER}.tar.bz2" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mbuild multilib # disable src_check msetfeature "!check" SRC_URI=( https://fedorahosted.org/releases/${PNAME:0:1}/${PNAME:1:1}/${PNAME}/${PVER}/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/${PNAME}-${PVER}-portability.patch mirror://${PNAME}/${PNAME}-${PVER}-robustify.patch mirror://${PNAME}/${PNAME}-${PVER}-sizeof-pointer-memaccess.patch ) UP2DATE="updatecmd https://fedorahosted.org/releases/${PNAME:0:1}/${PNAME:1:1}/${PNAME}/ | lasttarball gz" split_info_libelf() { DESCRIPTION="Library to read and write ELF files." DEPEND="${LIB_DEPEND}" PCAT="sys-libs" } split_info_elfutils-libs() { DESCRIPTION="Libs to handle elf objects." DEPEND="== sys-libs/libelf-${PVER}" } split_info_elfutils() { DESCRIPTION="Utils to handle elf objects." DEPEND="== sys-libs/libelf-${PVER} == dev-libs/elfutils-libs-${PVER}" } src_prepare() { munpack ${SRCFILE} || die # with issues with gcc-4.8 (-Np1 is required!) mpatch -Np1 ${PNAME}-${PVER}-sizeof-pointer-memaccess.patch || die # redhat patches: mpatch ${PNAME}-${PVER}-portability.patch || die mpatch ${PNAME}-${PVER}-robustify.patch || die mautoreconf || die # fix some noisiness (taken from gentoo ebuild) all-abis "find . -name Makefile.in -print0 | xargs -0 sed -i -e 's:-W\(error\|extra\)::g'" } src_compile() { mconfigure \ --program-prefix="eu-" \ --enable-shared \ --enable-nls \ || die mmake || die } src_install_libelf() { mmake -C libelf DESTDIR=${BINDIR} install || die # install version.h mmake DESTDIR=${BINDIR} install-pkgincludeHEADERS || die } src_install_elfutils-libs() { mmake -C libebl DESTDIR=${BINDIR} install || die mmake -C libdw DESTDIR=${BINDIR} install || die mmake -C libdwfl DESTDIR=${BINDIR} install || die mmake -C libasm DESTDIR=${BINDIR} install || die mmake -C backends DESTDIR=${BINDIR} install || die } src_install_elfutils() { mmake -C src DESTDIR=${BINDIR} install || die mmake -C po DESTDIR=${BINDIR} install || die minstalldocs AUTHORS COPYING ChangeLog EXCEPTION \ GPG-KEY NEWS NOTES README THANKS TODO || die }