mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-13 16:06:59 +02:00
dev-libs/elfutils: Sync with Gentoo
It's from Gentoo commit 1a3799db411d857f43d5f26833e41615fa2ccbf5.
This commit is contained in:
parent
0dede30630
commit
4e7d683a16
@ -1,5 +1,3 @@
|
||||
DIST elfutils-0.190.tar.bz2 9162766 BLAKE2B 9934aff08f1898377708b28595fb52130ef9f80408132ac7d306845b10672ba45cf1ac69783da07b3eea9fd647741d44da45b8b2626c45a768cb2844c6186513 SHA512 9c4f5328097e028286c42f29e39dc3d80914b656cdfbbe05b639e91bc787ae8ae64dd4d69a6e317ce30c01648ded10281b86a51e718295f4c589df1225a48102
|
||||
DIST elfutils-0.190.tar.bz2.sig 310 BLAKE2B d6a2d490aa6815ed9a7c3624050716ebf7c50465af9907d471d47aa3b57590faf9b9ee03de127c6b3bdffa6948414aab6aa8c784ce29570f76bb03ee2021c062 SHA512 7cd88c19402a959679204a5b01ddd48720e224b84268d0d7452f0f1433150b97dd02288fac204fbd5e2fd6f227473bfe62205b350d5fe2e17addf45fb452eed6
|
||||
DIST elfutils-0.191.tar.bz2 9310088 BLAKE2B 2a7ad251369eca7ba609ab8644181fd479ad8596ee58dc068398ca22be25a978e96b81a10a92a5555d7574fd1b9227c8d54fb41dceb4025aedfc6ae32870bbca SHA512 e22d85f25317a79b36d370347e50284c9120c86f9830f08791b7b6a7b4ad89b9bf4c7c71129133b8d193a0edffb2a2c17987b7e48428b9670aff5ce918777e04
|
||||
DIST elfutils-0.191.tar.bz2.sig 310 BLAKE2B 5afee19515a115d4ca6d1e0c4a49eca84bb4b911687492934e939a80ac75b7fcea9b6bf5fc0f2248a4c64ef09bd5af9dfc60c72410cba33b78444c38443ad279 SHA512 ab030739d95d13abb84cf4dc6c5407e51d0bd0bca108e27654a1830371694181a1b6f115fdbb4ae0772390f54f1c4811e5ae26b38fdcfd3275177a3716adfd22
|
||||
DIST elfutils-0.192.tar.bz2 11913897 BLAKE2B cf9036a1fca416e0d47c76471093609230545aee63e31e30991dc3c88417d7c621c930bb74809374da3bf142501cee91a2b861a5a89efcb5e1ac184df5defce1 SHA512 543188f5f2cfe5bc7955a878416c5f252edff9926754e5de0c6c57b132f21d9285c9b29e41281e93baad11d4ae7efbbf93580c114579c182103565fe99bd3909
|
||||
|
@ -1,120 +0,0 @@
|
||||
# Copyright 2003-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/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)"
|
||||
HOMEPAGE="https://sourceware.org/elfutils/"
|
||||
SRC_URI="https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2"
|
||||
SRC_URI+=" verify-sig? ( https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2.sig )"
|
||||
|
||||
LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="bzip2 debuginfod lzma nls static-libs test +utils zstd"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
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}] )
|
||||
debuginfod? (
|
||||
app-arch/libarchive:=
|
||||
dev-db/sqlite:3=
|
||||
net-libs/libmicrohttpd:=
|
||||
|
||||
net-misc/curl[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
|
||||
)
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
"
|
||||
BDEPEND="
|
||||
app-alternatives/lex
|
||||
sys-devel/m4
|
||||
virtual/pkgconfig
|
||||
nls? ( sys-devel/gettext )
|
||||
verify-sig? ( sec-keys/openpgp-keys-elfutils )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-0.189-musl-aarch64-regs.patch
|
||||
"${FILESDIR}"/${PN}-0.189-musl-macros.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
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() {
|
||||
# bug #407135
|
||||
use test && append-flags -g
|
||||
|
||||
# bug 660738
|
||||
filter-flags -fno-asynchronous-unwind-tables
|
||||
|
||||
multilib-minimal_src_configure
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local myeconfargs=(
|
||||
$(use_enable nls)
|
||||
$(multilib_native_use_enable debuginfod)
|
||||
$(use_enable debuginfod libdebuginfod)
|
||||
|
||||
# explicitly disable thread safety, it's not recommended by upstream
|
||||
# doesn't build either on musl.
|
||||
--disable-thread-safety
|
||||
|
||||
# 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)
|
||||
)
|
||||
|
||||
# Needed because sets alignment macro
|
||||
is-flagq -fsanitize=address && myeconfargs+=( --enable-sanitize-address )
|
||||
is-flagq -fsanitize=undefined && myeconfargs+=( --enable-sanitize-undefined )
|
||||
|
||||
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
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
|
||||
}
|
@ -1,137 +0,0 @@
|
||||
# Copyright 2003-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/elfutils.gpg
|
||||
inherit autotools flag-o-matic multilib-minimal
|
||||
|
||||
DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)"
|
||||
HOMEPAGE="https://sourceware.org/elfutils/"
|
||||
if [[ ${PV} == 9999 ]] ; then
|
||||
EGIT_REPO_URI="https://sourceware.org/git/elfutils.git"
|
||||
inherit git-r3
|
||||
|
||||
BDEPEND="
|
||||
sys-devel/bison
|
||||
sys-devel/flex
|
||||
"
|
||||
else
|
||||
inherit verify-sig
|
||||
SRC_URI="https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2"
|
||||
SRC_URI+=" verify-sig? ( https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2.sig )"
|
||||
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
|
||||
|
||||
BDEPEND="verify-sig? ( >=sec-keys/openpgp-keys-elfutils-20240301 )"
|
||||
fi
|
||||
|
||||
LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )"
|
||||
SLOT="0"
|
||||
IUSE="bzip2 debuginfod lzma nls test +utils valgrind zstd"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
RDEPEND="
|
||||
!dev-libs/libelf
|
||||
>=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]
|
||||
bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] )
|
||||
debuginfod? (
|
||||
app-arch/libarchive:=
|
||||
dev-db/sqlite:3=
|
||||
net-libs/libmicrohttpd:=
|
||||
|
||||
net-misc/curl[${MULTILIB_USEDEP}]
|
||||
)
|
||||
lzma? ( >=app-arch/xz-utils-5.0.5-r1[${MULTILIB_USEDEP}] )
|
||||
zstd? ( app-arch/zstd:=[${MULTILIB_USEDEP}] )
|
||||
elibc_musl? (
|
||||
dev-libs/libbsd
|
||||
sys-libs/argp-standalone
|
||||
sys-libs/fts-standalone
|
||||
sys-libs/obstack-standalone
|
||||
)
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
valgrind? ( dev-debug/valgrind )
|
||||
"
|
||||
BDEPEND+="
|
||||
sys-devel/m4
|
||||
virtual/pkgconfig
|
||||
nls? ( sys-devel/gettext )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-0.189-musl-aarch64-regs.patch
|
||||
"${FILESDIR}"/${PN}-0.191-musl-macros.patch
|
||||
"${FILESDIR}"/${PN}-0.191-avoid-overriding-libcxx-system-header.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
eautoreconf
|
||||
|
||||
# https://sourceware.org/PR23914
|
||||
sed -i 's:-Werror::' */Makefile.in || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# bug #407135
|
||||
use test && append-flags -g
|
||||
|
||||
# bug 660738
|
||||
filter-flags -fno-asynchronous-unwind-tables
|
||||
|
||||
multilib-minimal_src_configure
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
unset LEX YACC
|
||||
|
||||
local myeconfargs=(
|
||||
$(use_enable nls)
|
||||
$(multilib_native_use_enable debuginfod)
|
||||
$(use_enable debuginfod libdebuginfod)
|
||||
$(use_enable valgrind valgrind-annotations)
|
||||
|
||||
# explicitly disable thread safety, it's not recommended by upstream
|
||||
# doesn't build either on musl.
|
||||
--disable-thread-safety
|
||||
|
||||
# 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)
|
||||
)
|
||||
|
||||
[[ ${PV} == 9999 ]] && myeconfargs+=( --enable-maintainer-mode )
|
||||
|
||||
# Needed because sets alignment macro
|
||||
is-flagq -fsanitize=address && myeconfargs+=( --enable-sanitize-address )
|
||||
is-flagq -fsanitize=undefined && myeconfargs+=( --enable-sanitize-undefined )
|
||||
|
||||
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
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 we don't
|
||||
# disable building them when the USE flag is disabled.
|
||||
if ! use utils; then
|
||||
rm -rf "${ED}"/usr/bin || die
|
||||
fi
|
||||
}
|
@ -1,120 +0,0 @@
|
||||
# Copyright 2003-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
VERIFY_SIG_OPENPGP_KEY_PATH=/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)"
|
||||
HOMEPAGE="https://sourceware.org/elfutils/"
|
||||
SRC_URI="https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2"
|
||||
SRC_URI+=" verify-sig? ( https://sourceware.org/elfutils/ftp/${PV}/${P}.tar.bz2.sig )"
|
||||
|
||||
LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="bzip2 debuginfod lzma nls static-libs test +utils zstd"
|
||||
RESTRICT="!test? ( test )"
|
||||
|
||||
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}] )
|
||||
debuginfod? (
|
||||
app-arch/libarchive:=
|
||||
dev-db/sqlite:3=
|
||||
net-libs/libmicrohttpd:=
|
||||
|
||||
net-misc/curl[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
|
||||
)
|
||||
"
|
||||
DEPEND="
|
||||
${RDEPEND}
|
||||
"
|
||||
BDEPEND="
|
||||
app-alternatives/lex
|
||||
sys-devel/m4
|
||||
virtual/pkgconfig
|
||||
nls? ( sys-devel/gettext )
|
||||
verify-sig? ( >=sec-keys/openpgp-keys-elfutils-20240301 )
|
||||
"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}"/${PN}-0.189-musl-aarch64-regs.patch
|
||||
"${FILESDIR}"/${PN}-0.191-musl-macros.patch
|
||||
)
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
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() {
|
||||
# bug #407135
|
||||
use test && append-flags -g
|
||||
|
||||
# bug 660738
|
||||
filter-flags -fno-asynchronous-unwind-tables
|
||||
|
||||
multilib-minimal_src_configure
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local myeconfargs=(
|
||||
$(use_enable nls)
|
||||
$(multilib_native_use_enable debuginfod)
|
||||
$(use_enable debuginfod libdebuginfod)
|
||||
|
||||
# explicitly disable thread safety, it's not recommended by upstream
|
||||
# doesn't build either on musl.
|
||||
--disable-thread-safety
|
||||
|
||||
# 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)
|
||||
)
|
||||
|
||||
# Needed because sets alignment macro
|
||||
is-flagq -fsanitize=address && myeconfargs+=( --enable-sanitize-address )
|
||||
is-flagq -fsanitize=undefined && myeconfargs+=( --enable-sanitize-undefined )
|
||||
|
||||
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
|
||||
}
|
||||
|
||||
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
|
||||
}
|
@ -1,86 +0,0 @@
|
||||
May not be required (or at least some hunks) with next release (0.186?)
|
||||
|
||||
https://git.alpinelinux.org/aports/plain/main/elfutils/musl-macros.patch
|
||||
--- a/lib/libeu.h
|
||||
+++ b/lib/libeu.h
|
||||
@@ -31,6 +31,27 @@
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
+#include <unistd.h>
|
||||
+#include <alloca.h>
|
||||
+#include <string.h>
|
||||
+
|
||||
+#ifndef TEMP_FAILURE_RETRY
|
||||
+#define TEMP_FAILURE_RETRY(expression) \
|
||||
+ (__extension__ \
|
||||
+ ({ long int __result; \
|
||||
+ do __result = (long int) (expression); \
|
||||
+ while (__result == -1L && errno == EINTR); \
|
||||
+ __result; }))
|
||||
+#endif
|
||||
+
|
||||
+#ifndef strndupa
|
||||
+#define strndupa(s, n) \
|
||||
+ (__extension__ ({const char *__in = (s); \
|
||||
+ size_t __len = strnlen (__in, (n)) + 1; \
|
||||
+ char *__out = (char *) alloca (__len); \
|
||||
+ __out[__len-1] = '\0'; \
|
||||
+ (char *) memcpy (__out, __in, __len-1);}))
|
||||
+#endif
|
||||
|
||||
extern void *xmalloc (size_t) __attribute__ ((__malloc__));
|
||||
extern void *xcalloc (size_t, size_t) __attribute__ ((__malloc__));
|
||||
--- a/src/arlib.h
|
||||
+++ b/src/arlib.h
|
||||
@@ -29,6 +29,16 @@
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
+#if !defined(ACCESSPERMS)
|
||||
+# define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */
|
||||
+#endif
|
||||
+#if !defined(ALLPERMS)
|
||||
+# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */
|
||||
+#endif
|
||||
+#if !defined(DEFFILEMODE)
|
||||
+# define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)/* 0666*/
|
||||
+#endif
|
||||
+
|
||||
|
||||
/* State of -D/-U flags. */
|
||||
extern bool arlib_deterministic_output;
|
||||
--- a/src/elfcompress.c
|
||||
+++ b/src/elfcompress.c
|
||||
@@ -37,6 +37,14 @@
|
||||
#include "libeu.h"
|
||||
#include "printversion.h"
|
||||
|
||||
+#if !defined(FNM_EXTMATCH)
|
||||
+# define FNM_EXTMATCH 0
|
||||
+#endif
|
||||
+
|
||||
+#if !defined(ALLPERMS)
|
||||
+# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) /* 07777 */
|
||||
+#endif
|
||||
+
|
||||
/* Name and version of program. */
|
||||
ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
|
||||
|
||||
--- a/src/strip.c
|
||||
+++ b/src/strip.c
|
||||
@@ -45,6 +45,14 @@
|
||||
#include <system.h>
|
||||
#include <printversion.h>
|
||||
|
||||
+#if !defined(FNM_EXTMATCH)
|
||||
+# define FNM_EXTMATCH 0
|
||||
+#endif
|
||||
+
|
||||
+#if !defined(ACCESSPERMS)
|
||||
+#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
|
||||
+#endif
|
||||
+
|
||||
typedef uint8_t GElf_Byte;
|
||||
|
||||
/* Name and version of program. */
|
Loading…
Reference in New Issue
Block a user