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 <orbea@riseup.net>
Part-of: https://github.com/gentoo/gentoo/pull/41062
Closes: https://github.com/gentoo/gentoo/pull/41062
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
orbea
2025-03-13 08:12:06 -07:00
committed by Sam James
parent cd0ec12886
commit 63f8947e8f

View File

@@ -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