summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/elfutils')
-rw-r--r--dev-libs/elfutils/Manifest13
-rw-r--r--dev-libs/elfutils/elfutils-0.158.ebuild73
-rw-r--r--dev-libs/elfutils/elfutils-0.159.ebuild72
-rw-r--r--dev-libs/elfutils/elfutils-0.160.ebuild72
-rw-r--r--dev-libs/elfutils/elfutils-0.161.ebuild73
-rw-r--r--dev-libs/elfutils/elfutils-0.162.ebuild72
-rw-r--r--dev-libs/elfutils/elfutils-0.163.ebuild72
-rw-r--r--dev-libs/elfutils/files/elfutils-0.118-PaX-support.patch26
-rw-r--r--dev-libs/elfutils/files/elfutils-0.143-configure.patch22
-rw-r--r--dev-libs/elfutils/files/elfutils-0.148-bashifications.patch23
-rw-r--r--dev-libs/elfutils/files/elfutils-0.150-bashifications.patch23
-rw-r--r--dev-libs/elfutils/files/elfutils-0.158-tests-backtrace-native-core.patch46
-rw-r--r--dev-libs/elfutils/files/elfutils-0.161-libelf-dir-traversal.patch51
-rw-r--r--dev-libs/elfutils/metadata.xml10
14 files changed, 648 insertions, 0 deletions
diff --git a/dev-libs/elfutils/Manifest b/dev-libs/elfutils/Manifest
new file mode 100644
index 000000000000..b88a8b7f8797
--- /dev/null
+++ b/dev-libs/elfutils/Manifest
@@ -0,0 +1,13 @@
+DIST elfutils-0.158-portability.patch 61898 SHA256 edc5e367b90dc3b179439c1c56ac28b04e810b09952d76c51b2df7a2a3f44e78 SHA512 3710f5b9e43a7ae230d8f3b7058addc667e34841fcbb85e3e6e289851b5daf1d82d8f6e592cfa62be127588ae1e274f5b04499156dec3e9c5922f1a06a0e845b WHIRLPOOL 7bc95985ed12c8b356fb6a8d7f92fd0d6aa2d5a8aedb157f85b894199ebb0ae63b2d7baebe759489895bb9db2b552a84647add04f0c02168d9ebfd598ab8fd69
+DIST elfutils-0.158-robustify.patch 62790 SHA256 dde94387e6565803d7c8d5b4351e4224e0fdeccfb9ef4a2080f15fabf43fe8bf SHA512 cdafe50d93ca74a38e62728f52965a48b37ef6dc05ca949893381c917549e498a2b007580ceb5de81c7292d86fbb11fd62315001216c12baffc243e2e6fd1015 WHIRLPOOL b3d0440230e23d66fc4862083ca9a9b2f3d58619c8789d086e6c9933af5c27b9b1c55dd8fa714acd708757bdee0707041cf6c8b09b804d7c6a4932f77a2648e4
+DIST elfutils-0.158.tar.bz2 4931570 SHA256 be27af5c21352f53e010342bf1c68e0b9e18232dbf3adec7e2f9b41f6bbe397d SHA512 6f27c07ad2b146d2ff857ad596f0d9150b0a041b4667f9174880a7766250ba2e52103bed9c4295e005255b683346d33d82efcda8f18f66c343df2722ca5d2ca2 WHIRLPOOL ff0c2224f9a514b83995c6f5a628e1331887e3906d3678c237c551d5572371b5a4c8bcf705f8e1389bff02bdab257460b26d8cfd3b3de2cbbc84e3f5a55445ac
+DIST elfutils-0.159-portability.patch 63319 SHA256 aaaa91cc9101962cdef221b2901346921945bf6e8b7806dbf99c5c2d76dc3ae0 SHA512 043ef48ea0f2cec718d952d7137e16f34c47420b7d1788a9e1685b3543576f8d4a9f8565069709ab87a1b65d32204db01da4e0f08be51c5d8a5890c548369568 WHIRLPOOL e690f510ebe97562dbee233b146481b56fb589c7ed7e99eafd121c3990f084d6adb58fc4db0824518a84cd609a0a10a65f125697f51819b18dfcd3e691c1abd9
+DIST elfutils-0.159.tar.bz2 5469000 SHA256 fffaad1ba0c4ac5c8cee56dc195746e1f1e7197ba3eba7052ad5a3635ac1242e SHA512 c58d95c90685fb0b37f728c83e9d462be2fabe1dfb7b271b3adcde5f10c532a90b07bcc1c51dd81bf768f0cd3d22fa231fafb74fb5e79098d94a566e139408ff WHIRLPOOL 71cc156658af3ea8461c4cebcf27331a3844af470e337c18a7532fd795ea91eca035ecdc74fa71e92100bf2354b9e724490eae6305cd3ab418202938a4818684
+DIST elfutils-0.160-portability.patch 63302 SHA256 feb307acf472598ea7af4e4b439251613a8f5d81e804b4abf9aeca195a5d4254 SHA512 a408596fe114392034c7c6f42c4ef2e7a6bdeae346ad07c733eebe29c30d644984d775756b0395ab360c6107eab7d526cdcd0d4955eb8431cccf9ca8a278bca1 WHIRLPOOL cd415d959c8fdf16ea656de84c7e328bb98de1f9b98ba36bdafffca80a008c3673787843b876f6ddd37e1bc0d13283ed85548b5407c90120de164971cee6ae44
+DIST elfutils-0.160.tar.bz2 5391252 SHA256 741b556863c069ceab2d81eb54aeda8c34f46728859704eaf9baef8503e9a9d1 SHA512 2df392739ae05e1a9ad333a02cc13e088f39370e3d14482072384b0b5285d5ba73e35562cc6c99211272f36744e657081d6d18e16e8c8519e49a51ece9151330 WHIRLPOOL afafd0c2fd2672c7b0e9cb4cdd4fc710fa38c819b7f117673e99cace7931594f03a46085a87fb4e819243572abc52f695d37cc03522bb46cdc6498be9f209582
+DIST elfutils-0.161-portability.patch 63317 SHA256 bf0363d03e1e4668778eb4e7ddd10e405a22f753b3ad813a537fc01164d1e3fe SHA512 78a8a46b5eaf0326916b79f2502d8e66dabd2783c5661248482572b1528173c5e47f84868693ba58bbf015dfeb3f9897bfe72a778d22aa1b396e7da81b2512b5 WHIRLPOOL bdaa682d3c4113f0d54409afe4d22a0e56f0b28d8f1e69e2c0c16cd31cf12341df56259d3ab38e70b840dd449b2686e7823d4961b282b76de5dde8c458f4e97a
+DIST elfutils-0.161.tar.bz2 5524766 SHA256 570c91a1783fa5386aaa2dfdd08dda1de777c2b63bf3b9c1437d635ffdd7a070 SHA512 c5061faa01cb6f211c326574f10bd5eb4fe8437afb2581f26cf34e88053d7bd91dc47bae1c8bdd143c35cad055bf48eab1e03acf4069a8e8843643ecf2a198df WHIRLPOOL adf14b937b38fff1de0e0cd18a6866d4080ed6ee80fab73a45c1b94ffe546fe4c1662b090f6802a522c5103fb7826fac46c5e4ccfc8441f09025285722d08ede
+DIST elfutils-0.162-portability.patch 70906 SHA256 71cd52c43af31a9e445ed14e2f51e4aee32a00c1ffb251390c1a247cfc503d23 SHA512 8bd5647a169b9201dfc93f98a6580ebae34433180941b481248cb644f4991cb670f073d7ca63b203821a398ddd96558b069461aef83b8dd1a60aa154f15dccd1 WHIRLPOOL c31586f846e6cff511996c97015b479d0bc4b80577fb69df140f9cbae817a17ddcaca58a1a0e16ded6efc7f9ae3f570e74b87888a32b524ab9d7c5d3a02f7419
+DIST elfutils-0.162.tar.bz2 6021217 SHA256 526106bc6be898b3b3281a66b83d64993aa0ef1b55b0416766868ad53d0a1951 SHA512 5d62a84b509f638cb62175b332fdeaa68e04677893d5647fd944e5b5928fa4f0daf8f161dc64f7762dc736f74471c8d617cbc54464cf2e1f79141e937d3db4a9 WHIRLPOOL 2e8bee400f0209206373d716199835729f4d4da97116a4ec76a2dfe977e8a431601208655d576d66e6f1e4eb630dab004eedebabd58a03e4938b745f71daf35d
+DIST elfutils-0.163-portability.patch 72818 SHA256 e4e82315dad2efaa4e4476503e7537e01b7c1b1f98a96de4ca1c7fa85f4f1045 SHA512 c657da2c4a37e8dac6fe4b399ef72ff60b6780000721f0617fb1dc0a6d962cb1e609b8e72fa0dc5b2d50db8dd68dcd58096bf2e475f7c5461f1765a4ee4c0d2e WHIRLPOOL 0ff248e4767778351f46c91fd5f189d7d2cfee59ac2afdfd5fee659151b72e33d310440273da0ed6f5611f76f9ec651ff51acffcc0557a0ec111c50b819db091
+DIST elfutils-0.163.tar.bz2 6029307 SHA256 7c774f1eef329309f3b05e730bdac50013155d437518a2ec0e24871d312f2e23 SHA512 80cb37b965e85f6c6b51247f0cb07cde9d9071e7cdde4c028479a609e12dfb196e428fa8743586ce8a46d49dac74073b55bcb812ea6118471c0de07b3dd7f772 WHIRLPOOL 5e2b7881ec96438e0ecb583b77202ccdad6ae7b46f2dcc0b2869119642173bc5da5f26d51bf4464fc9c5c1951f14a4a11bf8dfc6906e6dfd551782c4c9f28cd8
diff --git a/dev-libs/elfutils/elfutils-0.158.ebuild b/dev-libs/elfutils/elfutils-0.158.ebuild
new file mode 100644
index 000000000000..b27769d9147e
--- /dev/null
+++ b/dev-libs/elfutils/elfutils-0.158.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils flag-o-matic multilib-minimal
+
+DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
+HOMEPAGE="https://fedorahosted.org/elfutils/"
+SRC_URI="https://fedorahosted.org/releases/e/l/${PN}/${PV}/${P}.tar.bz2
+ https://fedorahosted.org/releases/e/l/${PN}/${PV}/${PN}-portability.patch -> ${P}-portability.patch
+ https://fedorahosted.org/releases/e/l/${PN}/${PV}/${PN}-robustify.patch -> ${P}-robustify.patch"
+
+LICENSE="GPL-2-with-exceptions"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="bzip2 lzma nls static-libs test +threads +utils zlib"
+
+# This pkg does not actually seem to compile currently in a uClibc
+# environment (xrealloc errs), but we need to ensure that glibc never
+# gets pulled in as a dep since this package does not respect virtual/libc
+RDEPEND="zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+ lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
+ !dev-libs/libelf
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20130224-r11
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )
+ >=sys-devel/flex-2.5.4a
+ sys-devel/m4"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.118-PaX-support.patch
+ epatch "${DISTDIR}"/${P}-{portability,robustify}.patch
+ epatch "${FILESDIR}"/${PN}-0.158-tests-backtrace-native-core.patch
+ use static-libs || sed -i -e '/^lib_LIBRARIES/s:=.*:=:' -e '/^%.os/s:%.o$::' lib{asm,dw,elf}/Makefile.in
+ # some patches touch both configure and configure.ac
+ find -type f -exec touch -r configure {} +
+}
+
+src_configure() {
+ use test && append-flags -g #407135
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ --disable-werror \
+ $(use_enable nls) \
+ $(use_enable threads thread-safety) \
+ --program-prefix="eu-" \
+ $(use_with zlib) \
+ $(use_with bzip2 bzlib) \
+ $(use_with lzma)
+}
+
+multilib_src_test() {
+ env LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \
+ LC_ALL="C" \
+ emake check || die
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ dodoc NOTES
+ # These build quick, and are needed for most tests, so don't
+ # disable their building when the USE flag is disabled.
+ use utils || rm -rf "${ED}"/usr/bin
+}
diff --git a/dev-libs/elfutils/elfutils-0.159.ebuild b/dev-libs/elfutils/elfutils-0.159.ebuild
new file mode 100644
index 000000000000..6ac8a28cab2a
--- /dev/null
+++ b/dev-libs/elfutils/elfutils-0.159.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils flag-o-matic multilib-minimal
+
+DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
+HOMEPAGE="https://fedorahosted.org/elfutils/"
+SRC_URI="https://fedorahosted.org/releases/e/l/${PN}/${PV}/${P}.tar.bz2
+ https://fedorahosted.org/releases/e/l/${PN}/${PV}/${PN}-portability.patch -> ${P}-portability.patch"
+
+LICENSE="GPL-2-with-exceptions"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="bzip2 lzma nls static-libs test +threads +utils zlib"
+
+# This pkg does not actually seem to compile currently in a uClibc
+# environment (xrealloc errs), but we need to ensure that glibc never
+# gets pulled in as a dep since this package does not respect virtual/libc
+RDEPEND="zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+ lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
+ !dev-libs/libelf
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20130224-r11
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )
+ >=sys-devel/flex-2.5.4a
+ sys-devel/m4"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.118-PaX-support.patch
+ epatch "${DISTDIR}"/${P}-portability.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 {} +
+}
+
+src_configure() {
+ use test && append-flags -g #407135
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ --disable-werror \
+ $(use_enable nls) \
+ $(use_enable threads thread-safety) \
+ --program-prefix="eu-" \
+ $(use_with zlib) \
+ $(use_with bzip2 bzlib) \
+ $(use_with lzma)
+}
+
+multilib_src_test() {
+ env LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \
+ LC_ALL="C" \
+ emake check || die
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ dodoc NOTES
+ # These build quick, and are needed for most tests, so don't
+ # disable their building when the USE flag is disabled.
+ use utils || rm -rf "${ED}"/usr/bin
+}
diff --git a/dev-libs/elfutils/elfutils-0.160.ebuild b/dev-libs/elfutils/elfutils-0.160.ebuild
new file mode 100644
index 000000000000..6ac8a28cab2a
--- /dev/null
+++ b/dev-libs/elfutils/elfutils-0.160.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils flag-o-matic multilib-minimal
+
+DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
+HOMEPAGE="https://fedorahosted.org/elfutils/"
+SRC_URI="https://fedorahosted.org/releases/e/l/${PN}/${PV}/${P}.tar.bz2
+ https://fedorahosted.org/releases/e/l/${PN}/${PV}/${PN}-portability.patch -> ${P}-portability.patch"
+
+LICENSE="GPL-2-with-exceptions"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="bzip2 lzma nls static-libs test +threads +utils zlib"
+
+# This pkg does not actually seem to compile currently in a uClibc
+# environment (xrealloc errs), but we need to ensure that glibc never
+# gets pulled in as a dep since this package does not respect virtual/libc
+RDEPEND="zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+ lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
+ !dev-libs/libelf
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20130224-r11
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )
+ >=sys-devel/flex-2.5.4a
+ sys-devel/m4"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.118-PaX-support.patch
+ epatch "${DISTDIR}"/${P}-portability.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 {} +
+}
+
+src_configure() {
+ use test && append-flags -g #407135
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ --disable-werror \
+ $(use_enable nls) \
+ $(use_enable threads thread-safety) \
+ --program-prefix="eu-" \
+ $(use_with zlib) \
+ $(use_with bzip2 bzlib) \
+ $(use_with lzma)
+}
+
+multilib_src_test() {
+ env LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \
+ LC_ALL="C" \
+ emake check || die
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ dodoc NOTES
+ # These build quick, and are needed for most tests, so don't
+ # disable their building when the USE flag is disabled.
+ use utils || rm -rf "${ED}"/usr/bin
+}
diff --git a/dev-libs/elfutils/elfutils-0.161.ebuild b/dev-libs/elfutils/elfutils-0.161.ebuild
new file mode 100644
index 000000000000..0b70488ecdad
--- /dev/null
+++ b/dev-libs/elfutils/elfutils-0.161.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils flag-o-matic multilib-minimal
+
+DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
+HOMEPAGE="https://fedorahosted.org/elfutils/"
+SRC_URI="https://fedorahosted.org/releases/e/l/${PN}/${PV}/${P}.tar.bz2
+ https://fedorahosted.org/releases/e/l/${PN}/${PV}/${PN}-portability-${PV}.patch -> ${P}-portability.patch"
+
+LICENSE="GPL-2-with-exceptions"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="bzip2 lzma nls static-libs test +threads +utils zlib"
+
+# This pkg does not actually seem to compile currently in a uClibc
+# environment (xrealloc errs), but we need to ensure that glibc never
+# gets pulled in as a dep since this package does not respect virtual/libc
+RDEPEND="zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+ lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
+ !dev-libs/libelf
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20130224-r11
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )
+ >=sys-devel/flex-2.5.4a
+ sys-devel/m4"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.118-PaX-support.patch
+ epatch "${DISTDIR}"/${P}-portability.patch
+ epatch "${FILESDIR}"/${P}-libelf-dir-traversal.patch #534000
+ 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 {} +
+}
+
+src_configure() {
+ use test && append-flags -g #407135
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ --disable-werror \
+ $(use_enable nls) \
+ $(use_enable threads thread-safety) \
+ --program-prefix="eu-" \
+ $(use_with zlib) \
+ $(use_with bzip2 bzlib) \
+ $(use_with lzma)
+}
+
+multilib_src_test() {
+ env LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \
+ LC_ALL="C" \
+ emake check || die
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ dodoc NOTES
+ # These build quick, and are needed for most tests, so don't
+ # disable their building when the USE flag is disabled.
+ use utils || rm -rf "${ED}"/usr/bin
+}
diff --git a/dev-libs/elfutils/elfutils-0.162.ebuild b/dev-libs/elfutils/elfutils-0.162.ebuild
new file mode 100644
index 000000000000..a2ae40f23fad
--- /dev/null
+++ b/dev-libs/elfutils/elfutils-0.162.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils flag-o-matic multilib-minimal
+
+DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
+HOMEPAGE="https://fedorahosted.org/elfutils/"
+SRC_URI="https://fedorahosted.org/releases/e/l/${PN}/${PV}/${P}.tar.bz2
+ https://fedorahosted.org/releases/e/l/${PN}/${PV}/${PN}-portability-${PV}.patch -> ${P}-portability.patch"
+
+LICENSE="GPL-2-with-exceptions"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="bzip2 lzma nls static-libs test +threads +utils zlib"
+
+# This pkg does not actually seem to compile currently in a uClibc
+# environment (xrealloc errs), but we need to ensure that glibc never
+# gets pulled in as a dep since this package does not respect virtual/libc
+RDEPEND="zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+ lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
+ !dev-libs/libelf
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20130224-r11
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )
+ >=sys-devel/flex-2.5.4a
+ sys-devel/m4"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.118-PaX-support.patch
+ epatch "${DISTDIR}"/${P}-portability.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 {} +
+}
+
+src_configure() {
+ use test && append-flags -g #407135
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ --disable-werror \
+ $(use_enable nls) \
+ $(use_enable threads thread-safety) \
+ --program-prefix="eu-" \
+ $(use_with zlib) \
+ $(use_with bzip2 bzlib) \
+ $(use_with lzma)
+}
+
+multilib_src_test() {
+ env LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \
+ LC_ALL="C" \
+ emake check || die
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ dodoc NOTES
+ # These build quick, and are needed for most tests, so don't
+ # disable their building when the USE flag is disabled.
+ use utils || rm -rf "${ED}"/usr/bin
+}
diff --git a/dev-libs/elfutils/elfutils-0.163.ebuild b/dev-libs/elfutils/elfutils-0.163.ebuild
new file mode 100644
index 000000000000..a2ae40f23fad
--- /dev/null
+++ b/dev-libs/elfutils/elfutils-0.163.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils flag-o-matic multilib-minimal
+
+DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
+HOMEPAGE="https://fedorahosted.org/elfutils/"
+SRC_URI="https://fedorahosted.org/releases/e/l/${PN}/${PV}/${P}.tar.bz2
+ https://fedorahosted.org/releases/e/l/${PN}/${PV}/${PN}-portability-${PV}.patch -> ${P}-portability.patch"
+
+LICENSE="GPL-2-with-exceptions"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+IUSE="bzip2 lzma nls static-libs test +threads +utils zlib"
+
+# This pkg does not actually seem to compile currently in a uClibc
+# environment (xrealloc errs), but we need to ensure that glibc never
+# gets pulled in as a dep since this package does not respect virtual/libc
+RDEPEND="zlib? ( >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] )
+ bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
+ lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
+ !dev-libs/libelf
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20130224-r11
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )
+ >=sys-devel/flex-2.5.4a
+ sys-devel/m4"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.118-PaX-support.patch
+ epatch "${DISTDIR}"/${P}-portability.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 {} +
+}
+
+src_configure() {
+ use test && append-flags -g #407135
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ ECONF_SOURCE="${S}" econf \
+ --disable-werror \
+ $(use_enable nls) \
+ $(use_enable threads thread-safety) \
+ --program-prefix="eu-" \
+ $(use_with zlib) \
+ $(use_with bzip2 bzlib) \
+ $(use_with lzma)
+}
+
+multilib_src_test() {
+ env LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \
+ LC_ALL="C" \
+ emake check || die
+}
+
+multilib_src_install_all() {
+ einstalldocs
+ dodoc NOTES
+ # These build quick, and are needed for most tests, so don't
+ # disable their building when the USE flag is disabled.
+ use utils || rm -rf "${ED}"/usr/bin
+}
diff --git a/dev-libs/elfutils/files/elfutils-0.118-PaX-support.patch b/dev-libs/elfutils/files/elfutils-0.118-PaX-support.patch
new file mode 100644
index 000000000000..083f32ff8553
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.118-PaX-support.patch
@@ -0,0 +1,26 @@
+Add support for PaX ELF markings
+
+Patch by Kevin F. Quinn <kevquinn@gentoo.org>
+
+http://bugs.gentoo.org/115100
+
+--- libelf/elf.h
++++ libelf/elf.h
+@@ -568,6 +568,7 @@
+ #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */
+ #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */
+ #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */
++#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */
+ #define PT_LOSUNW 0x6ffffffa
+ #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */
+ #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */
+--- src/elflint.c
++++ src/elflint.c
+@@ -3187,6 +3187,7 @@
+
+ if (phdr->p_type >= PT_NUM && phdr->p_type != PT_GNU_EH_FRAME
+ && phdr->p_type != PT_GNU_STACK && phdr->p_type != PT_GNU_RELRO
++ && phdr->p_type != PT_PAX_FLAGS
+ /* Check for a known machine-specific type. */
+ && ebl_segment_type_name (ebl, phdr->p_type, NULL, 0) == NULL)
+ ERROR (gettext ("\
diff --git a/dev-libs/elfutils/files/elfutils-0.143-configure.patch b/dev-libs/elfutils/files/elfutils-0.143-configure.patch
new file mode 100644
index 000000000000..4c00cd88d8ec
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.143-configure.patch
@@ -0,0 +1,22 @@
+https://bugs.gentoo.org/287130
+
+--- elfutils-0.143/configure
++++ elfutils-0.143/configure
+@@ -5460,7 +5460,7 @@
+
+ # 1.234<whatever> -> 1234<whatever>
+ case "$PACKAGE_VERSION" in
+-[0-9].*) eu_version="${PACKAGE_VERSION/./}" ;;
++[0-9].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;;
+ *) { { $as_echo "$as_me:$LINENO: error: confused by version number '$PACKAGE_VERSION'" >&5
+ $as_echo "$as_me: error: confused by version number '$PACKAGE_VERSION'" >&2;}
+ { (exit 1); exit 1; }; } ;;
+@@ -5495,7 +5495,7 @@
+ esac
+
+ # Round up to the next release API (x.y) version.
+-eu_version=$[($eu_version + 999) / 1000]
++eu_version=`expr \( $eu_version + 999 \) / 1000`
+
+ cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
diff --git a/dev-libs/elfutils/files/elfutils-0.148-bashifications.patch b/dev-libs/elfutils/files/elfutils-0.148-bashifications.patch
new file mode 100644
index 000000000000..5cdf34fa3a4b
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.148-bashifications.patch
@@ -0,0 +1,23 @@
+Remove bashifications
+https://bugs.gentoo.org/287130
+
+--- a/configure
++++ b/configure
+@@ -4874,7 +4874,7 @@ ac_config_files="$ac_config_files version.h:config/version.h.in"
+
+ # 1.234<whatever> -> 1234<whatever>
+ case "$PACKAGE_VERSION" in
+-[0-9].*) eu_version="${PACKAGE_VERSION/./}" ;;
++[0-9].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;;
+ *) as_fn_error "confused by version number '$PACKAGE_VERSION'" "$LINENO" 5 ;;
+ esac
+ case "$eu_version" in
+@@ -4903,7 +4903,7 @@ case "$eu_version" in
+ esac
+
+ # Round up to the next release API (x.y) version.
+-eu_version=$[($eu_version + 999) / 1000]
++eu_version=`expr \( $eu_version + 999 \) / 1000`
+
+ cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
diff --git a/dev-libs/elfutils/files/elfutils-0.150-bashifications.patch b/dev-libs/elfutils/files/elfutils-0.150-bashifications.patch
new file mode 100644
index 000000000000..a2f2b858574d
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.150-bashifications.patch
@@ -0,0 +1,23 @@
+Remove bashifications
+https://bugs.gentoo.org/287130
+
+--- a/configure
++++ b/configure
+@@ -4880,7 +4880,7 @@ ac_config_files="$ac_config_files version.h:config/version.h.in"
+
+ # 1.234<whatever> -> 1234<whatever>
+ case "$PACKAGE_VERSION" in
+-[0-9].*) eu_version="${PACKAGE_VERSION/./}" ;;
++[0-9].*) eu_version=`echo "$PACKAGE_VERSION" | sed 's@\.@@'` ;;
+ *) as_fn_error $? "confused by version number '$PACKAGE_VERSION'" "$LINENO" 5 ;;
+ esac
+ case "$eu_version" in
+@@ -4909,7 +4909,7 @@ case "$eu_version" in
+ esac
+
+ # Round up to the next release API (x.y) version.
+-eu_version=$[($eu_version + 999) / 1000]
++eu_version=`expr \( $eu_version + 999 \) / 1000`
+
+ cat >confcache <<\_ACEOF
+ # This file is a shell script that caches the results of configure
diff --git a/dev-libs/elfutils/files/elfutils-0.158-tests-backtrace-native-core.patch b/dev-libs/elfutils/files/elfutils-0.158-tests-backtrace-native-core.patch
new file mode 100644
index 000000000000..213b06b7a1fb
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.158-tests-backtrace-native-core.patch
@@ -0,0 +1,46 @@
+https://bugs.gentoo.org/497566
+
+From 435808a681cc375f0907f2066c4cc062173a6c7e Mon Sep 17 00:00:00 2001
+From: Jan Kratochvil <jan.kratochvil@redhat.com>
+Date: Sat, 18 Jan 2014 21:56:13 +0100
+Subject: [PATCH] Fix false FAILs on testsuite with ulimit -c unlimited.
+
+Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
+---
+ tests/ChangeLog | 6 ++++++
+ tests/backtrace-child.c | 8 +++++---
+ 2 files changed, 11 insertions(+), 3 deletions(-)
+
+2014-01-18 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Fix false FAILs on testsuite with ulimit -c unlimited.
+ * backtrace-child.c (sigusr2): Call pthread_exit.
+ (main): Return, do not call abort.
+
+diff --git a/tests/backtrace-child.c b/tests/backtrace-child.c
+index 0db1258..512aa23 100644
+--- a/tests/backtrace-child.c
++++ b/tests/backtrace-child.c
+@@ -100,7 +100,10 @@ sigusr2 (int signo)
+ if (! gencore)
+ {
+ raise (SIGUSR1);
+- /* It should not be reached. */
++ /* Do not return as stack may be invalid due to ptrace-patched PC to the
++ jmp function. */
++ pthread_exit (NULL);
++ /* Not reached. */
+ abort ();
+ }
+ /* Here we dump the core for --gencore. */
+@@ -218,6 +221,5 @@ main (int argc UNUSED, char **argv)
+ pthread_join (thread, NULL);
+ else
+ raise (SIGUSR2);
+- /* Not reached. */
+- abort ();
++ return 0;
+ }
+--
+1.8.5.3
+
diff --git a/dev-libs/elfutils/files/elfutils-0.161-libelf-dir-traversal.patch b/dev-libs/elfutils/files/elfutils-0.161-libelf-dir-traversal.patch
new file mode 100644
index 000000000000..84a28c71d234
--- /dev/null
+++ b/dev-libs/elfutils/files/elfutils-0.161-libelf-dir-traversal.patch
@@ -0,0 +1,51 @@
+https://bugs.gentoo.org/534000
+
+From 147018e729e7c22eeabf15b82d26e4bf68a0d18e Mon Sep 17 00:00:00 2001
+From: Alexander Cherepanov <cherepan@mccme.ru>
+Date: Sun, 28 Dec 2014 19:57:19 +0300
+Subject: [PATCH] libelf: Fix dir traversal vuln in ar extraction.
+
+read_long_names terminates names at the first '/' found but then skips
+one character without checking (it's supposed to be '\n'). Hence the
+next name could start with any character including '/'. This leads to
+a directory traversal vulnerability at the time the contents of the
+archive is extracted.
+
+The danger is mitigated by the fact that only one '/' is possible in a
+resulting filename and only in the leading position. Hence only files
+in the root directory can be written via this vuln and only when ar is
+executed as root.
+
+The fix for the vuln is to not skip any characters while looking
+for '/'.
+
+Signed-off-by: Alexander Cherepanov <cherepan@mccme.ru>
+---
+ libelf/ChangeLog | 5 +++++
+ libelf/elf_begin.c | 5 +----
+ 2 files changed, 6 insertions(+), 4 deletions(-)
+
+2014-12-28 Alexander Cherepanov <cherepan@mccme.ru>
+
+ * elf_begin.c (read_long_names): Don't miss '/' right after
+ another '/'. Fixes a dir traversal vuln in ar extraction.
+
+diff --git a/libelf/elf_begin.c b/libelf/elf_begin.c
+index 30abe0b..cd3756c 100644
+--- a/libelf/elf_begin.c
++++ b/libelf/elf_begin.c
+@@ -749,10 +749,7 @@ read_long_names (Elf *elf)
+ }
+
+ /* NUL-terminate the string. */
+- *runp = '\0';
+-
+- /* Skip the NUL byte and the \012. */
+- runp += 2;
++ *runp++ = '\0';
+
+ /* A sanity check. Somebody might have generated invalid
+ archive. */
+--
+2.2.1
+
diff --git a/dev-libs/elfutils/metadata.xml b/dev-libs/elfutils/metadata.xml
new file mode 100644
index 000000000000..6d5bc382fd7a
--- /dev/null
+++ b/dev-libs/elfutils/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>toolchain</herd>
+ <use>
+ <flag name="lzma">Support automatic decompression of LZMA-compressed files and kernel images</flag>
+ <flag name="threads">Build the libraries with thread safe support</flag>
+ <flag name="utils">Install command-line utilities (all the eu-* programs)</flag>
+ </use>
+</pkgmetadata>