From 5adfd733728a4f14df5665f4c2a604a7356e5f19 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 11 Jun 2023 14:17:10 +0100 Subject: gentoo auto-resync : 11:06:2023 - 14:17:09 --- dev-util/libtree/Manifest | 3 +- .../libtree/files/libtree-3.1.1-modern-c.patch | 75 ++++++++++++++++++++++ dev-util/libtree/libtree-3.1.1.ebuild | 6 +- 3 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 dev-util/libtree/files/libtree-3.1.1-modern-c.patch (limited to 'dev-util/libtree') diff --git a/dev-util/libtree/Manifest b/dev-util/libtree/Manifest index f8dd916f7b51..0e71f5fdb0ca 100644 --- a/dev-util/libtree/Manifest +++ b/dev-util/libtree/Manifest @@ -1,3 +1,4 @@ +AUX libtree-3.1.1-modern-c.patch 4584 BLAKE2B 7a35eb096abc47561506e9a625fcd9c13944e2ba3f781ea81c84b2e44a9bdff33764d76d2da3bea0e2481f168864df4ce594f3270fe4f77bf86627397b6a9b1e SHA512 4fc8910fea3a547eb763c9a24746184b96a11977f9fbc744a15f65ff7a9ef76316f000ed4c3bbcb742df251b37765a394ef103fdbde010f64c6a31d90343fee5 DIST libtree-3.1.1.tar.gz 79931 BLAKE2B 70359c36a83ad1fb7937e57757f872e067ae167b65ee0bf065a357ac0c4dad2106370fe8a9cca11a477e37bed7266073ceb79947ab9d4b5e7cd0d2a6bacca8e9 SHA512 6b4b41b16edfcaa83c16b566a3afff1de0ecffdd5f91af2c82db95fca678b993e021ca8fac5fd1d37ad60ea2215100a0889ee457ce08019f3888e32c755ba1ce -EBUILD libtree-3.1.1.ebuild 501 BLAKE2B fd9ba768e98f268e1eca77bd82195c18b35a78f6f1cca9fd10616e01d77475011d7b3654a22067f0b7d03359d9c3caa4baef3db6aa4c18104ee8fa180c52ce21 SHA512 ae9929c5d762bbd15b145cd28c8d7422751d38221cee3ebd9d71191b1da541172dfeac6e9af1f69c60f9f0b99c93bdebb9af9494b18104485a7812646e4341ee +EBUILD libtree-3.1.1.ebuild 549 BLAKE2B 785a61d60aa93e9fbcf72deb871d4bac784846c45a57cc49e6547897375ea0a5024de00d9886c9e0afaa000bb8b1b2c336cc4a51f4e899c7522410ddcfe048e8 SHA512 7d6ad05b7ac663453c0b77c763a195900687cc7dcfb606d1620e1ccb52b1e3b28446183c6d6d155e58698eb3b53b897c3ae1a53f2438bb7d5d3adf9d8b4348f0 MISC metadata.xml 320 BLAKE2B 7c5fe56a3cb0f496d86aeec399e20af48e5b951f63f9fca6553488e7d124f5b1c1d7eb73bbc508aecfc246d67667307ac1dd3acc763eb8549d8a904a38e05833 SHA512 d6a205bddcbbbb0099f146861e2285bf6262f2195c484195f5cceed112396a1130451016e133c41dc6cac315eb5e8fbd9b57a4463ac03a5af198d5d8c7a33b39 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 +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/libtree-3.1.1.ebuild b/dev-util/libtree/libtree-3.1.1.ebuild index 6ed6a5aae88a..78f8742c0517 100644 --- a/dev-util/libtree/libtree-3.1.1.ebuild +++ b/dev-util/libtree/libtree-3.1.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -13,6 +13,10 @@ LICENSE="MIT" SLOT="0" KEYWORDS="~amd64" +PATCHES=( + "${FILESDIR}"/${P}-modern-c.patch +) + src_configure() { tc-export CC } -- cgit v1.2.3