commit: 4556525819bb04c39646a6b10efa752ab2614b9a
Author: Lucio Sauer <watermanpaint <AT> posteo <DOT> net>
AuthorDate: Thu Feb 26 22:58:51 2026 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Feb 28 00:03:08 2026 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45565258
net-mail/notmuch: use ${CHOST}-prefixed ar and readelf
Closes: https://bugs.gentoo.org/970642
Signed-off-by: Lucio Sauer <watermanpaint <AT> posteo.net>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/157
Merges: https://codeberg.org/gentoo/gentoo/pulls/157
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-mail/notmuch/files/notmuch-0.40-readelf.patch | 38 ++++++++++++++++++++++
...{notmuch-0.40.ebuild => notmuch-0.40-r1.ebuild} | 4 ++-
2 files changed, 41 insertions(+), 1 deletion(-)
diff --git a/net-mail/notmuch/files/notmuch-0.40-readelf.patch
b/net-mail/notmuch/files/notmuch-0.40-readelf.patch
new file mode 100644
index 000000000000..c5d8d134ee68
--- /dev/null
+++ b/net-mail/notmuch/files/notmuch-0.40-readelf.patch
@@ -0,0 +1,38 @@
+Add user-configurable TEST_READELF variable to allow testing with
+${CHOST}-prefixed readelf executable.
+
+Sent to the upstream mailing list.
+
+From: Lucio Sauer <[email protected]>
+--- a/test/T000-basic.sh
++++ b/test/T000-basic.sh
+@@ -72,7 +72,7 @@ test_expect_equal \
+ "$(echo $PATH|cut -f1 -d: | sed -e 's,/test/valgrind/bin$,,')"
+
+ test_begin_subtest 'notmuch is compiled with debugging symbols'
+-readelf --sections $(command -v notmuch) | grep \.debug
++${TEST_READELF} --sections $(command -v notmuch) | grep \.debug
+ test_expect_equal 0 $?
+
+ test_done
+--- a/test/T360-symbol-hiding.sh
++++ b/test/T360-symbol-hiding.sh
+@@ -30,7 +30,7 @@ test_begin_subtest 'checking output'
+ test_expect_equal "$result" "$output"
+
+ test_begin_subtest 'comparing existing to exported symbols'
+-readelf -Ws $NOTMUCH_BUILDDIR/lib/libnotmuch.so | sed -e 's/\[[^]]*\]//' |\
++${TEST_READELF} -Ws $NOTMUCH_BUILDDIR/lib/libnotmuch.so | sed -e
's/\[[^]]*\]//' |\
+ awk '$4 == "FUNC" && $5 == "GLOBAL" && $7 != "UND" {print $8}' | sort -u
> ACTUAL
+ sed -n 's/^\(notmuch_[a-zA-Z0-9_]*\)[[:blank:]]*(.*/\1/p'
$NOTMUCH_SRCDIR/lib/notmuch.h | sort -u > EXPORTED
+ test_expect_equal_file EXPORTED ACTUAL
+--- a/test/test-vars.sh
++++ b/test/test-vars.sh
+@@ -32,6 +32,7 @@ TEST_EMACSCLIENT=${TEST_EMACSCLIENT:-emacsclient}
+ TEST_GDB=${TEST_GDB:-gdb}
+ TEST_CC=${TEST_CC:-cc}
+ TEST_CFLAGS=${TEST_CFLAGS:-"-g -O0"}
++TEST_READELF=${TEST_READELF:-readelf}
+ TEST_SHIM_CFLAGS=${TEST_SHIM_CFLAGS:-"-fpic -shared"}
+ TEST_SHIM_LDFLAGS=${TEST_SHIM_LDFLAGS:-"-ldl"}
+
diff --git a/net-mail/notmuch/notmuch-0.40.ebuild
b/net-mail/notmuch/notmuch-0.40-r1.ebuild
similarity index 98%
rename from net-mail/notmuch/notmuch-0.40.ebuild
rename to net-mail/notmuch/notmuch-0.40-r1.ebuild
index f7a73e80f994..0217365c0593 100644
--- a/net-mail/notmuch/notmuch-0.40.ebuild
+++ b/net-mail/notmuch/notmuch-0.40-r1.ebuild
@@ -96,6 +96,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-0.40-fix_pointers.patch
# applied in master
"${FILESDIR}"/${P}-pkg_config.patch
+ "${FILESDIR}"/${P}-readelf.patch
)
python_check_deps() {
@@ -131,7 +132,7 @@ src_prepare() {
}
src_configure() {
- tc-export CC CXX PKG_CONFIG
+ tc-export AR CC CXX PKG_CONFIG
local myconf=(
--bashcompletiondir="$(get_bashcompdir)"
@@ -193,6 +194,7 @@ src_test() {
local mytestargs=(
TEST_CC="${CC}"
TEST_CFLAGS="${CFLAGS}"
+ TEST_READELF="$(tc-getREADELF)"
V=1
OPTIONS="--verbose --tee"
NOTMUCH_SKIP_TESTS="${skip_tests[*]}"