dev-libs/elfutils: Sync with Gentoo

It's from Gentoo commit 741a870f29fe2b0927e6f5b80edd72593a72991d.
This commit is contained in:
Krzesimir Nowak 2022-10-21 11:04:40 +02:00
parent 7c740e1cb0
commit 1f6ba36d82
4 changed files with 55 additions and 125 deletions

View File

@ -1,4 +1,3 @@
DIST elfutils-0.185-patches.tar.gz 7625 BLAKE2B 92aff147aa7e45976863e8129e25ecad74ad9bca231c9223897094c5933c3b350eb525a203b492d80c1eabee3b3808b43e30bdb879d7173eac968afa2005e97c SHA512 3f253c4de97190731ac157044572912b76df80f9473f3df335f0383dad6409f987593a749c5284672cf1b20241ac3ed9d77b126f730aaf594725703b6a426906 DIST elfutils-0.187-patches.tar.xz 2804 BLAKE2B 77cbd0666d8da3d5229baaba6605c84e7990200f39bfb72b2008eb2527e4567abd90c93c291cc0c8f3c10bbf97758ccf5877cbdae823780cf8dc97ff4ff2f932 SHA512 d056fdd6ae0e71471087af472a72384d6e73ff2d7fe1b708b5ec9f091a913c8327197660132b7a6619a0db86534715507ef67ee91691a00a591c1d24c55a99f4
DIST elfutils-0.185.tar.bz2 9187627 BLAKE2B 57cfa7e4060975c4bf6170dbd354687a19a92f7069c060db1ac2fa4da5a9d34e8bddd07c7ce376b5c28b5670ad5b8c1df795164cbcfb600a44cf1db60c20c4af SHA512 34de0de1355b11740e036e0fc64f2fc063587c8eb121b19216ee5548d3f0f268d8fc3995176c47190466b9d881007cfa11a9d01e9a50e38af6119492bf8bb47f DIST elfutils-0.188.tar.bz2 9112977 BLAKE2B 6b0474f1436eaf6af73b735b9b2ddd5448ab9c03fbaa0be745a31c89ae8f15b0e21a651409c38643ca125794ce82c19d7b46db4a079f3e72cb919d643560e7a4 SHA512 585551b2d937d19d1becfc2f28935db1dd1a3d25571a62f322b70ac8da98c1a741a55d070327705df6c3e2ee026652e0b9a3c733b050a0b0ec5f2fc75d5b74b5
DIST elfutils-0.186-patches.tar.gz 3323 BLAKE2B 360365597d3a08d6f4fe843d04bcddd07a44ca93dae2034615abc450517e1be21c81a55aa379c409902e134ae795b38bb7461c65cdba3934ac7ef1e4e0e53091 SHA512 e2d427be505fdc416751a1fbc3bb4f39577859d94ce43990faa83c135fe36be2ddb3a2ef0f1020cfa37060e6d43dc7b8cf3db0d07d62b31bf29cb9a4a5945ce1 DIST elfutils-0.188.tar.bz2.sig 310 BLAKE2B c8d9135cffde3b1dd337b692d5351855cf799915d3ebd553327febaac192bd2f108b3f45a6376d458e179390a1ceaf4809762cdc40ea1e05fed0214ac33ed56e SHA512 4cc8a7417d244e319a1650d71b1831660cfe41afc7c73e9c83d1f076f4013fe15247e8b4f5e12a5396d83c4f1c7663ca4be5ea42bff3dc23263f85331fd9d566
DIST elfutils-0.186.tar.bz2 9230491 BLAKE2B 49573d0a1f3519eab81d1ba3e94354cbc0935a36a94a3fdb22fe223a47b78cca8fd6e322870b0e335a809529fa6f54180b13c67936dec0242123c54ba20c9fc9 SHA512 c9180b27ec62935f18b9431268d176f6023d1bb938731d2af6e7626ae460af6608a70ba68483aa1ec7e6cb0fa0528b661ca8b68bc4f58ea8e18af527c5950c78

View File

@ -1,95 +0,0 @@
# Copyright 2003-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit flag-o-matic multilib-minimal
DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
HOMEPAGE="http://elfutils.org/"
SRC_URI="https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2"
SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-0.185-patches.tar.gz"
LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
IUSE="bzip2 lzma nls static-libs test +threads +utils valgrind zstd"
RDEPEND=">=sys-libs/zlib-1.2.8-r1[static-libs?,${MULTILIB_USEDEP}]
bzip2? ( >=app-arch/bzip2-1.0.6-r4[static-libs?,${MULTILIB_USEDEP}] )
lzma? ( >=app-arch/xz-utils-5.0.5-r1[static-libs?,${MULTILIB_USEDEP}] )
zstd? ( app-arch/zstd:=[static-libs?,${MULTILIB_USEDEP}] )
elibc_musl? (
dev-libs/libbsd
sys-libs/argp-standalone
sys-libs/fts-standalone
sys-libs/obstack-standalone
)
!dev-libs/libelf
"
DEPEND="${RDEPEND}
valgrind? ( dev-util/valgrind )
"
BDEPEND="nls? ( sys-devel/gettext )
>=sys-devel/flex-2.5.4a
sys-devel/m4
"
RESTRICT="!test? ( test )"
PATCHES=(
"${WORKDIR}"/${PN}-0.185-patches/
)
src_prepare() {
default
if use elibc_musl; then
eapply "${WORKDIR}"/${PN}-0.185-patches/musl/
fi
if ! use static-libs; then
sed -i -e '/^lib_LIBRARIES/s:=.*:=:' -e '/^%.os/s:%.o$::' lib{asm,dw,elf}/Makefile.in || die
fi
# https://sourceware.org/PR23914
sed -i 's:-Werror::' */Makefile.in || die
}
src_configure() {
use test && append-flags -g #407135
# Symbol aliases are implemented as asm statements.
# Will require porting: https://gcc.gnu.org/PR48200
filter-flags '-flto*'
multilib-minimal_src_configure
}
multilib_src_configure() {
ECONF_SOURCE="${S}" econf \
$(use_enable nls) \
$(use_enable threads thread-safety) \
$(use_enable valgrind) \
--disable-debuginfod \
--disable-libdebuginfod \
--program-prefix="eu-" \
--with-zlib \
$(use_with bzip2 bzlib) \
$(use_with lzma) \
$(use_with zstd)
}
multilib_src_test() {
env LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \
LC_ALL="C" \
emake check VERBOSE=1
}
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.
if ! use utils; then
rm -rf "${ED}"/usr/bin || die
fi
}

View File

@ -1,21 +1,26 @@
# Copyright 2003-2022 Gentoo Authors # Copyright 2003-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=7 EAPI=8
inherit flag-o-matic multilib-minimal VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/elfutils.gpg
inherit flag-o-matic multilib-minimal verify-sig
DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)" DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
HOMEPAGE="https://elfutils.org/" HOMEPAGE="https://sourceware.org/elfutils/"
SRC_URI="https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2" SRC_URI="https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2"
SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-0.186-patches.tar.gz" SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-0.187-patches.tar.xz"
SRC_URI+=" verify-sig? ( https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2.sig )"
LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )" LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )"
SLOT="0" SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
IUSE="bzip2 lzma nls static-libs test +threads +utils valgrind zstd" IUSE="bzip2 lzma nls static-libs test +utils valgrind zstd"
RESTRICT="!test? ( test )"
RDEPEND=">=sys-libs/zlib-1.2.8-r1[static-libs?,${MULTILIB_USEDEP}] RDEPEND="
!dev-libs/libelf
>=sys-libs/zlib-1.2.8-r1[static-libs?,${MULTILIB_USEDEP}]
bzip2? ( >=app-arch/bzip2-1.0.6-r4[static-libs?,${MULTILIB_USEDEP}] ) bzip2? ( >=app-arch/bzip2-1.0.6-r4[static-libs?,${MULTILIB_USEDEP}] )
lzma? ( >=app-arch/xz-utils-5.0.5-r1[static-libs?,${MULTILIB_USEDEP}] ) lzma? ( >=app-arch/xz-utils-5.0.5-r1[static-libs?,${MULTILIB_USEDEP}] )
zstd? ( app-arch/zstd:=[static-libs?,${MULTILIB_USEDEP}] ) zstd? ( app-arch/zstd:=[static-libs?,${MULTILIB_USEDEP}] )
@ -25,26 +30,36 @@ RDEPEND=">=sys-libs/zlib-1.2.8-r1[static-libs?,${MULTILIB_USEDEP}]
sys-libs/fts-standalone sys-libs/fts-standalone
sys-libs/obstack-standalone sys-libs/obstack-standalone
) )
!dev-libs/libelf
" "
DEPEND="${RDEPEND} DEPEND="
${RDEPEND}
valgrind? ( dev-util/valgrind ) valgrind? ( dev-util/valgrind )
" "
BDEPEND="nls? ( sys-devel/gettext ) BDEPEND="
>=sys-devel/flex-2.5.4a >=sys-devel/flex-2.5.4a
sys-devel/m4 sys-devel/m4
nls? ( sys-devel/gettext )
verify-sig? ( sec-keys/openpgp-keys-elfutils )
" "
RESTRICT="!test? ( test )"
PATCHES=( PATCHES=(
"${WORKDIR}"/${PN}-0.186-patches/ "${WORKDIR}"/${PN}-0.187-patches/
) )
src_unpack() {
if use verify-sig ; then
# Needed for downloaded patch (which is unsigned, which is fine)
verify-sig_verify_detached "${DISTDIR}"/${P}.tar.bz2{,.sig}
fi
default
}
src_prepare() { src_prepare() {
default default
if use elibc_musl; then if use elibc_musl; then
eapply "${WORKDIR}"/${PN}-0.186-patches/musl/ eapply "${WORKDIR}"/${PN}-0.187-patches/musl/
fi fi
if ! use static-libs; then if ! use static-libs; then
@ -56,7 +71,8 @@ src_prepare() {
} }
src_configure() { src_configure() {
use test && append-flags -g #407135 # bug #407135
use test && append-flags -g
# Symbol aliases are implemented as asm statements. # Symbol aliases are implemented as asm statements.
# Will require porting: https://gcc.gnu.org/PR48200 # Will require porting: https://gcc.gnu.org/PR48200
@ -66,17 +82,26 @@ src_configure() {
} }
multilib_src_configure() { multilib_src_configure() {
ECONF_SOURCE="${S}" econf \ local myeconfargs=(
$(use_enable nls) \ $(use_enable nls)
$(use_enable threads thread-safety) \ --disable-debuginfod
$(use_enable valgrind) \ --disable-libdebuginfod
--disable-debuginfod \
--disable-libdebuginfod \ # explicitly disable thread safety, it's not recommended by upstream
--program-prefix="eu-" \ # doesn't build either on musl.
--with-zlib \ --disable-thread-safety
$(use_with bzip2 bzlib) \
$(use_with lzma) \ # Valgrind option is just for running tests under it; dodgy under sandbox
# and indeed even w/ glibc with newer instructions.
--disable-valgrind
--program-prefix="eu-"
--with-zlib
$(use_with bzip2 bzlib)
$(use_with lzma)
$(use_with zstd) $(use_with zstd)
)
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
} }
multilib_src_test() { multilib_src_test() {
@ -87,7 +112,9 @@ multilib_src_test() {
multilib_src_install_all() { multilib_src_install_all() {
einstalldocs einstalldocs
dodoc NOTES dodoc NOTES
# These build quick, and are needed for most tests, so don't # These build quick, and are needed for most tests, so don't
# disable their building when the USE flag is disabled. # disable their building when the USE flag is disabled.
if ! use utils; then if ! use utils; then

View File

@ -7,7 +7,6 @@
</maintainer> </maintainer>
<use> <use>
<flag name="lzma">Support automatic decompression of LZMA-compressed files and kernel images</flag> <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> <flag name="utils">Install command-line utilities (all the eu-* programs)</flag>
<flag name="valgrind">Add support for memory debugging using <pkg>dev-util/valgrind</pkg></flag> <flag name="valgrind">Add support for memory debugging using <pkg>dev-util/valgrind</pkg></flag>
</use> </use>