• [gentoo-dev] [PATCH] 1/1] autotools.eclass: add slibtool dir for acloca

    From orbea@riseup.net@21:1/5 to All on Thu Mar 13 17:30:01 2025
    From: orbea <orbea@riseup.net>

    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
    appended 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>
    ---
    eclass/autotools.eclass | 6 ++++++
    1 file changed, 6 insertions(+)

    diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass
    index 1545b88bc4..023bedc8eb 100644
    --- a/eclass/autotools.eclass
    +++ b/eclass/autotools.eclass
    @@ -382,6 +382,12 @@ eaclocal() {
    ${BROOT}/usr/share/aclocal
    ${ESYSROOT}/usr/share/aclocal
    EOF
    + if [ "${LIBTOOLIZE:-}" = 'slibtoolize' ]; then
    + printf '%s\n' \
    + "${BROOT}/usr/share/slibtool" \
    + "${ESYSROOT}/usr/share/slibtool" \
    + >> "${T}"/aclocal/dirlist
    + fi
    fi

    [[ ! -f aclocal.m4 || -n $(grep -e 'generated.*by aclocal' aclocal.m4) ]] && \
    --
    2.48.1

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)