diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-04 05:48:38 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-04 05:48:38 -0500 |
| commit | bfd9c39e4712ebdb442d4ca0673061faed1e70e1 (patch) | |
| tree | 0d7a74b4463ee387f9cf9368ceb1b757f694f72a /dev-util/libtree | |
| parent | f716a9fe6455d39eef01e718aae68dae61c19704 (diff) | |
| download | baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.tar.gz baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.tar.xz baldeagleos-repo-bfd9c39e4712ebdb442d4ca0673061faed1e70e1.zip | |
Revert "Adding metadata"
This reverts commit f716a9fe6455d39eef01e718aae68dae61c19704.
Diffstat (limited to 'dev-util/libtree')
| -rw-r--r-- | dev-util/libtree/Manifest | 1 | ||||
| -rw-r--r-- | dev-util/libtree/files/libtree-3.1.1-modern-c.patch | 75 | ||||
| -rw-r--r-- | dev-util/libtree/files/libtree-3.1.1-test-flags.patch | 49 | ||||
| -rw-r--r-- | dev-util/libtree/libtree-3.1.1.ebuild | 27 | ||||
| -rw-r--r-- | dev-util/libtree/metadata.xml | 11 |
5 files changed, 163 insertions, 0 deletions
diff --git a/dev-util/libtree/Manifest b/dev-util/libtree/Manifest new file mode 100644 index 000000000000..03d05d359013 --- /dev/null +++ b/dev-util/libtree/Manifest @@ -0,0 +1 @@ +DIST libtree-3.1.1.tar.gz 79931 BLAKE2B 70359c36a83ad1fb7937e57757f872e067ae167b65ee0bf065a357ac0c4dad2106370fe8a9cca11a477e37bed7266073ceb79947ab9d4b5e7cd0d2a6bacca8e9 SHA512 6b4b41b16edfcaa83c16b566a3afff1de0ecffdd5f91af2c82db95fca678b993e021ca8fac5fd1d37ad60ea2215100a0889ee457ce08019f3888e32c755ba1ce diff --git a/dev-util/libtree/files/libtree-3.1.1-modern-c.patch b/dev-util/libtree/files/libtree-3.1.1-modern-c.patch new file mode 100644 index 000000000000..371f0a8bcb63 --- /dev/null +++ b/dev-util/libtree/files/libtree-3.1.1-modern-c.patch @@ -0,0 +1,75 @@ +https://github.com/haampie/libtree/commit/eb56287c1b4eb3b267524ab1e6e31f042b713395 + +From eb56287c1b4eb3b267524ab1e6e31f042b713395 Mon Sep 17 00:00:00 2001 +From: Florian Weimer <fweimer@redhat.com> +Date: Sun, 15 Jan 2023 22:49:37 +0100 +Subject: [PATCH] Avoid implicit function declarations in tests (#84) + +Future compilers are likely to reject implicit function declarations +by default, causing these tests to fail. Also replace () with (void) +where appropriate in the changed tests. +--- a/tests/01_origin/Makefile ++++ b/tests/01_origin/Makefile +@@ -7,13 +7,13 @@ LD_LIBRARY_PATH= + all: check + + liba.so: +- echo 'int f(){return 1;}' | $(CC) -shared -Wl,-soname,$@ -o $@ -nostdlib -x c - ++ echo 'int f(void){return 1;}' | $(CC) -shared -Wl,-soname,$@ -o $@ -nostdlib -x c - + + exe_rpath: liba.so +- echo 'int _start(){return f();}' | $(CC) -o $@ -Wl,--no-as-needed -Wl,--disable-new-dtags '-Wl,-rpath,$$ORIGIN' -Wno-implicit-function-declaration -nostdlib liba.so -x c - ++ echo 'int f(void); int _start(void){return f();}' | $(CC) -o $@ -Wl,--no-as-needed -Wl,--disable-new-dtags '-Wl,-rpath,$$ORIGIN' -Wno-implicit-function-declaration -nostdlib liba.so -x c - + + exe_runpath: liba.so +- echo 'int _start(){return f();}' | $(CC) -o $@ -Wl,--no-as-needed -Wl,--enable-new-dtags '-Wl,-rpath,$$ORIGIN' -Wno-implicit-function-declaration -nostdlib liba.so -x c - ++ echo 'int f(void); int _start(void){return f();}' | $(CC) -o $@ -Wl,--no-as-needed -Wl,--enable-new-dtags '-Wl,-rpath,$$ORIGIN' -Wno-implicit-function-declaration -nostdlib liba.so -x c - + + check: exe_rpath exe_runpath + ../../libtree exe_rpath +--- a/tests/02_rpath_of_parents_parent/Makefile ++++ b/tests/02_rpath_of_parents_parent/Makefile +@@ -8,13 +8,13 @@ LD_LIBRARY_PATH= + all: check + + libb.so: +- echo 'int g(){return 1;}' | $(CC) -shared -Wl,-soname,$@ -o $@ -nostdlib -x c - ++ echo 'int g(void){return 1;}' | $(CC) -shared -Wl,-soname,$@ -o $@ -nostdlib -x c - + + liba.so: libb.so +- echo 'int f(){return g();}' | $(CC) -shared -Wl,--no-as-needed -Wl,-soname,$@ -o $@ -Wno-implicit-function-declaration libb.so -nostdlib -x c - ++ echo 'int g(void); int f(void){return g();}' | $(CC) -shared -Wl,--no-as-needed -Wl,-soname,$@ -o $@ -Wno-implicit-function-declaration libb.so -nostdlib -x c - + + exe: liba.so +- echo 'int _start(){return f();}' | $(CC) -o $@ -Wl,--no-as-needed -Wl,--disable-new-dtags '-Wl,-rpath,$$ORIGIN' '-Wl,-rpath-link,$(CURDIR)' -Wno-implicit-function-declaration -nostdlib -L. -la -x c - ++ echo 'int f(void); int _start(){return f();}' | $(CC) -o $@ -Wl,--no-as-needed -Wl,--disable-new-dtags '-Wl,-rpath,$$ORIGIN' '-Wl,-rpath-link,$(CURDIR)' -Wno-implicit-function-declaration -nostdlib -L. -la -x c - + + check: exe liba.so + ! ../../libtree liba.so # should not find libb.so +--- a/tests/04_rpath_over_env_over_runpath/Makefile ++++ b/tests/04_rpath_over_env_over_runpath/Makefile +@@ -13,19 +13,19 @@ dir: + mkdir $@ + + dir/liba.so: dir +- echo 'int a(){return 42;}' | $(CC) -shared -Wl,-soname,$(@F) -Wl,--no-as-needed -o $@ -nostdlib -x c - ++ echo 'int a(void){return 42;}' | $(CC) -shared -Wl,-soname,$(@F) -Wl,--no-as-needed -o $@ -nostdlib -x c - + + dir/libb.so: dir/liba.so +- echo 'int b(){return a();}' | $(CC) -shared -Wl,-soname,$(@F) -Wl,--no-as-needed -Wl,--disable-new-dtags '-Wl,-rpath,$$ORIGIN' -Wno-implicit-function-declaration -o $@ -nostdlib dir/liba.so -x c - ++ echo 'int a(void); int b(void){return a();}' | $(CC) -shared -Wl,-soname,$(@F) -Wl,--no-as-needed -Wl,--disable-new-dtags '-Wl,-rpath,$$ORIGIN' -Wno-implicit-function-declaration -o $@ -nostdlib dir/liba.so -x c - + + libb.so: + echo 'int b(){return 10;}' | $(CC) -shared -Wl,-soname,$(@F) -Wl,--no-as-needed -o $@ -Wno-implicit-function-declaration -nostdlib -x c - + + exe_rpath: libb.so +- echo 'int _start(){return b();}' | $(CC) -Wl,--no-as-needed -Wl,--disable-new-dtags "-Wl,-rpath,$(CURDIR)" libb.so -o $@ -Wno-implicit-function-declaration -nostdlib -x c - ++ echo 'int b(void); int _start(void){return b();}' | $(CC) -Wl,--no-as-needed -Wl,--disable-new-dtags "-Wl,-rpath,$(CURDIR)" libb.so -o $@ -Wno-implicit-function-declaration -nostdlib -x c - + + exe_runpath: libb.so +- echo 'int _start(){return b();}' | $(CC) -Wl,--no-as-needed -Wl,--enable-new-dtags "-Wl,-rpath,$(CURDIR)" libb.so -o $@ -Wno-implicit-function-declaration -nostdlib -x c - ++ echo 'int b(void); int _start(void){return b();}' | $(CC) -Wl,--no-as-needed -Wl,--enable-new-dtags "-Wl,-rpath,$(CURDIR)" libb.so -o $@ -Wno-implicit-function-declaration -nostdlib -x c - + + check: exe_rpath exe_runpath dir/libb.so + ../../libtree exe_rpath + diff --git a/dev-util/libtree/files/libtree-3.1.1-test-flags.patch b/dev-util/libtree/files/libtree-3.1.1-test-flags.patch new file mode 100644 index 000000000000..f1a53d2f0966 --- /dev/null +++ b/dev-util/libtree/files/libtree-3.1.1-test-flags.patch @@ -0,0 +1,49 @@ +https://bugs.gentoo.org/905774 +https://github.com/haampie/libtree/issues/78 +https://github.com/haampie/libtree/pull/83 + +From 061d3ec62707a526a83482e57d202a66f9d776cd Mon Sep 17 00:00:00 2001 +From: Ismael Luceno <ismael@iodev.co.uk> +Date: Tue, 23 Aug 2022 19:34:39 +0200 +Subject: [PATCH] Test the -m32 and -m64 compiler flags before use + +Fixes: https://github.com/haampie/libtree/issues/78 +Signed-off-by: Ismael Luceno <ismael@iodev.co.uk> +--- a/tests/05_32_bits/Makefile ++++ b/tests/05_32_bits/Makefile +@@ -3,7 +3,7 @@ + + LD_LIBRARY_PATH= + +-.PHONY: clean ++.PHONY: clean check + + all: check + +@@ -21,11 +21,21 @@ exe64: lib64/libx.so + exe32: lib32/libx.so + echo 'extern int a(); int _start(){return a();}' | $(CC) -m32 "-Wl,-rpath,$(CURDIR)/lib64" "-Wl,-rpath,$(CURDIR)/lib32" -o $@ -nostdlib -x c - -Llib32 -lx + +-check: exe32 exe64 +- ../../libtree exe32 +- ../../libtree exe64 +- + clean: + rm -rf lib32 lib64 exe* + + CURDIR ?= $(.CURDIR) ++ ++test-flag = 2>/dev/null ${CC} -E /dev/null ++test-end = && echo y || echo n ++support-m32 != ${test-flag} -m32 ${test-end} ++support-m64 != ${test-flag} -m64 ${test-end} ++ ++check${support-m32:y=}:: exe32 ++ ../../libtree exe32 ++ ++check${support-m64:y=}:: exe64 ++ ../../libtree exe64 ++ ++check${support-m32:n=} check${support-m64:n=}:: ++ @echo WARNING: test skipped at ${CURDIR} + diff --git a/dev-util/libtree/libtree-3.1.1.ebuild b/dev-util/libtree/libtree-3.1.1.ebuild new file mode 100644 index 000000000000..fe59c542ed4d --- /dev/null +++ b/dev-util/libtree/libtree-3.1.1.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs + +DESCRIPTION="ldd as a tree with an option to bundle dependencies into a single folder" +HOMEPAGE="https://github.com/haampie/libtree" +SRC_URI="https://github.com/haampie/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm64" + +PATCHES=( + "${FILESDIR}"/${P}-modern-c.patch + "${FILESDIR}"/${PN}-3.1.1-test-flags.patch +) + +src_configure() { + tc-export CC +} + +src_install() { + emake DESTDIR="${D}" PREFIX="${EPREFIX}/usr" install +} diff --git a/dev-util/libtree/metadata.xml b/dev-util/libtree/metadata.xml new file mode 100644 index 000000000000..7899f431d5e6 --- /dev/null +++ b/dev-util/libtree/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>sam@gentoo.org</email> + <name>Sam James</name> + </maintainer> + <upstream> + <remote-id type="github">haampie/libtree</remote-id> + </upstream> +</pkgmetadata> |
