logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git
commit: 32327479385e8eddfde97e35315916e89c64a0f1
parent ad37eda6dd59741fd682b91768935085e5ba6d2b
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Tue, 10 Jan 2023 09:26:45 +0100

dev-libs/elfutils: treeclean

Diffstat:

Ddev-libs/elfutils/elfutils-0.186_pre9999.ebuild85-------------------------------------------------------------------------------
Ddev-libs/elfutils/files/elfutils-0.186-gnu99-cleanup.patch61-------------------------------------------------------------
Ddev-libs/elfutils/metadata.xml13-------------
3 files changed, 0 insertions(+), 159 deletions(-)

diff --git a/dev-libs/elfutils/elfutils-0.186_pre9999.ebuild b/dev-libs/elfutils/elfutils-0.186_pre9999.ebuild @@ -1,85 +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 autotools git-r3 - -DESCRIPTION="Libraries/utilities to handle ELF objects (drop in replacement for libelf)" -HOMEPAGE="http://elfutils.org/" -EGIT_REPO_URI="git://sourceware.org/git/elfutils.git" - -LICENSE="|| ( GPL-2+ LGPL-3+ ) utils? ( GPL-3+ )" -SLOT="0" -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}] ) - !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=( - "${FILESDIR}"/${PN}-0.186-gnu99-cleanup.patch -) - -src_prepare() { - default - eautoreconf - - 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 \ - --enable-maintainer-mode \ - $(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 -} diff --git a/dev-libs/elfutils/files/elfutils-0.186-gnu99-cleanup.patch b/dev-libs/elfutils/files/elfutils-0.186-gnu99-cleanup.patch @@ -1,61 +0,0 @@ -From 14294f0502851c125cf4e0e7d8b2889836e986e5 Mon Sep 17 00:00:00 2001 -From: Adrian Ratiu <adrian.ratiu@collabora.com> -Date: Tue, 10 Aug 2021 12:48:41 +0300 -Subject: [PATCH] configure.ac: drop unnecessary gnu99 extension checks - -It is true that Clang does not support all gnu99 extensions [1], -but not all of them are used in the codebase and over time there -have been code cleanup efforts to improve Clang support. - -For example after commit 779c57ea ("readelf: Pull advance_pc() -in file scope") there are no more nested function declarations -and elfutils now builds fine with Clang. - -So in the interest of enabling Clang builds we remove the only -remaining blocker: the configure checks for nested functions and -variable length arrays which are also unused. - -[1] https://sourceware.org/bugzilla/show_bug.cgi?id=24964 -Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com> ---- - ChangeLog | 4 ++++ - configure.ac | 11 ----------- - 2 files changed, 4 insertions(+), 11 deletions(-) - -diff --git a/ChangeLog b/ChangeLog -index 12b8f403..32f5b68d 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,3 +1,7 @@ -+2021-08-10 Adrian Ratiu <adrian.ratiu@collabora.com> -+ -+ * configure.ac (AC_CACHE_CHECK): Drop unnecessary std=gnu99 checks -+ - 2021-07-28 Mark Wielaard <mark@klomp.org> - - * configure.ac (AC_CHECK_DECLS): Add reallocarray check. -diff --git a/configure.ac b/configure.ac -index 7caff2c5..c14eb9f6 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -112,17 +112,6 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([dnl - int foo (int a) - { - for (int i = 0; i < a; ++i) if (i % 4) break; int s = a; return s; --} -- --double bar (double a, double b) --{ -- double square (double z) { return z * z; } -- return square (a) + square (b); --} -- --void baz (int n) --{ -- struct S { int x[[n]]; }; - }])], - ac_cv_c99=yes, ac_cv_c99=no) - CFLAGS="$old_CFLAGS"]) --- -2.32.0 - diff --git a/dev-libs/elfutils/metadata.xml b/dev-libs/elfutils/metadata.xml @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <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> - <flag name="valgrind">Add support for memory debugging using <pkg>dev-util/valgrind</pkg></flag> - </use> - <upstream> - <remote-id type="cpe">cpe:/a:elfutils_project:elfutils</remote-id> - </upstream> -</pkgmetadata>