Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/elfutils/
Date: Sat, 10 Sep 2022 11:18:50
Message-Id: 1662808673.e440ecce4fd2586884a7e551c4f088c5c86a6dbf.sam@gentoo
1 commit: e440ecce4fd2586884a7e551c4f088c5c86a6dbf
2 Author: Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com>
3 AuthorDate: Sun Sep 4 14:07:32 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 10 11:17:53 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e440ecce
7
8 dev-libs/elfutils: revbump to unconditionally disable thread safety
9
10 Upstream recommends disabling thread safety. It's marked as experimental
11 upstream and doesn't even build (been masked for years).
12
13 Closes: https://bugs.gentoo.org/868402
14 Signed-off-by: Holger Hoffstätte <holger <AT> applied-asynchrony.com>
15 Closes: https://github.com/gentoo/gentoo/pull/27139
16 Signed-off-by: Sam James <sam <AT> gentoo.org>
17
18 dev-libs/elfutils/elfutils-0.187-r1.ebuild | 109 +++++++++++++++++++++++++++++
19 1 file changed, 109 insertions(+)
20
21 diff --git a/dev-libs/elfutils/elfutils-0.187-r1.ebuild b/dev-libs/elfutils/elfutils-0.187-r1.ebuild
22 new file mode 100644
23 index 000000000000..3fcb27f7b6a2
24 --- /dev/null
25 +++ b/dev-libs/elfutils/elfutils-0.187-r1.ebuild
26 @@ -0,0 +1,109 @@
27 +# Copyright 2003-2022 Gentoo Authors
28 +# Distributed under the terms of the GNU General Public License v2
29 +
30 +EAPI=7
31 +
32 +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/elfutils.gpg
33 +inherit flag-o-matic multilib-minimal verify-sig
34 +
35 +DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
36 +HOMEPAGE="https://sourceware.org/elfutils/"
37 +SRC_URI="https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2"
38 +SRC_URI+=" https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-0.187-patches.tar.xz"
39 +SRC_URI+=" verify-sig? ( https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2.sig )"
40 +
41 +LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )"
42 +SLOT="0"
43 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
44 +IUSE="bzip2 lzma nls static-libs test +utils valgrind zstd"
45 +
46 +RDEPEND=">=sys-libs/zlib-1.2.8-r1[static-libs?,${MULTILIB_USEDEP}]
47 + bzip2? ( >=app-arch/bzip2-1.0.6-r4[static-libs?,${MULTILIB_USEDEP}] )
48 + lzma? ( >=app-arch/xz-utils-5.0.5-r1[static-libs?,${MULTILIB_USEDEP}] )
49 + zstd? ( app-arch/zstd:=[static-libs?,${MULTILIB_USEDEP}] )
50 + elibc_musl? (
51 + dev-libs/libbsd
52 + sys-libs/argp-standalone
53 + sys-libs/fts-standalone
54 + sys-libs/obstack-standalone
55 + )
56 + !dev-libs/libelf"
57 +DEPEND="${RDEPEND}
58 + valgrind? ( dev-util/valgrind )"
59 +BDEPEND=">=sys-devel/flex-2.5.4a
60 + sys-devel/m4
61 + nls? ( sys-devel/gettext )
62 + verify-sig? ( sec-keys/openpgp-keys-elfutils )"
63 +RESTRICT="!test? ( test )"
64 +
65 +PATCHES=(
66 + "${WORKDIR}"/${PN}-0.187-patches/
67 +)
68 +
69 +src_unpack() {
70 + if use verify-sig ; then
71 + # Needed for downloaded patch (which is unsigned, which is fine)
72 + verify-sig_verify_detached "${DISTDIR}"/${P}.tar.bz2{,.sig}
73 + fi
74 +
75 + default
76 +}
77 +
78 +src_prepare() {
79 + default
80 +
81 + if use elibc_musl; then
82 + eapply "${WORKDIR}"/${PN}-0.187-patches/musl/
83 + fi
84 +
85 + if ! use static-libs; then
86 + sed -i -e '/^lib_LIBRARIES/s:=.*:=:' -e '/^%.os/s:%.o$::' lib{asm,dw,elf}/Makefile.in || die
87 + fi
88 +
89 + # https://sourceware.org/PR23914
90 + sed -i 's:-Werror::' */Makefile.in || die
91 +}
92 +
93 +src_configure() {
94 + # bug #407135
95 + use test && append-flags -g
96 +
97 + # Symbol aliases are implemented as asm statements.
98 + # Will require porting: https://gcc.gnu.org/PR48200
99 + filter-flags '-flto*'
100 +
101 + multilib-minimal_src_configure
102 +}
103 +
104 +multilib_src_configure() {
105 + # Valgrind option is just for running tests under it; dodgy under sandbox
106 + # and indeed even w/ glibc with newer instructions.
107 + ECONF_SOURCE="${S}" econf \
108 + $(use_enable nls) \
109 + --disable-debuginfod \
110 + --disable-libdebuginfod \
111 + # explicitly disable thread safety: not recommended by upstream
112 + --disable-thread-safety \
113 + --disable-valgrind \
114 + --program-prefix="eu-" \
115 + --with-zlib \
116 + $(use_with bzip2 bzlib) \
117 + $(use_with lzma) \
118 + $(use_with zstd)
119 +}
120 +
121 +multilib_src_test() {
122 + env LD_LIBRARY_PATH="${BUILD_DIR}/libelf:${BUILD_DIR}/libebl:${BUILD_DIR}/libdw:${BUILD_DIR}/libasm" \
123 + LC_ALL="C" \
124 + emake check VERBOSE=1
125 +}
126 +
127 +multilib_src_install_all() {
128 + einstalldocs
129 + dodoc NOTES
130 + # These build quick, and are needed for most tests, so don't
131 + # disable their building when the USE flag is disabled.
132 + if ! use utils; then
133 + rm -rf "${ED}"/usr/bin || die
134 + fi
135 +}