From 63f8947e8f7dcdbef199aca7794000da12dd17ba Mon Sep 17 00:00:00 2001 From: orbea Date: Thu, 13 Mar 2025 08:12:06 -0700 Subject: [PATCH] autotools.eclass: add slibtool dir for aclocal When using slibtoolize it needs the /usr/share/slibtool/slibtool.m4 file to properly create the configure script. The current method of using it is to set AT_SYS_M4DIR in make.conf, while this works for most cases it does not work for app-crypt/tpm2-tss which uses ACLOCAL_AMFLAGS with the '--install' argument in Makefile.am which results in it trying to install .m4 files to /usr/share/slibtool. This thankfully fails due to sandbox. To solve this problem the /usr/share/slibtool path can be directly added to "${T}"/aclocal/dirlist if the LIBTOOLIZE variable is set to 'slibtoolize'. Closes: https://bugs.gentoo.org/950648 Signed-off-by: orbea Part-of: https://github.com/gentoo/gentoo/pull/41062 Closes: https://github.com/gentoo/gentoo/pull/41062 Signed-off-by: Sam James --- eclass/autotools.eclass | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass index f179d5f950e7e..1866bb5fa629f 100644 --- a/eclass/autotools.eclass +++ b/eclass/autotools.eclass @@ -378,7 +378,14 @@ eaclocal() { # See bug #677002 if [[ ! -f "${T}"/aclocal/dirlist ]] ; then mkdir "${T}"/aclocal || die - cat <<- EOF > "${T}"/aclocal/dirlist || die + if [[ "${LIBTOOLIZE:-}" == 'slibtoolize' ]]; then + cat <<- EOF > "${T}"/aclocal/dirlist || die + ${BROOT}/usr/share/slibtool + ${ESYSROOT}/usr/share/slibtool + EOF + fi + + cat <<- EOF >> "${T}"/aclocal/dirlist || die ${BROOT}/usr/share/aclocal ${ESYSROOT}/usr/share/aclocal EOF