From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 36BB3158087 for ; Mon, 17 Jan 2022 11:15:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E57982BC041; Mon, 17 Jan 2022 11:15:13 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5A12B2BC00E for ; Mon, 17 Jan 2022 11:15:13 +0000 (UTC) Content-Type: multipart/signed; boundary="Apple-Mail=_3D12C6BB-CC43-4B3A-9CA1-9DC516CDDC1F"; protocol="application/pgp-signature"; micalg=pgp-sha512 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.40.0.1.81\)) Subject: Re: [gentoo-dev] [PATCH 2/4] autotools.eclass: use --system-acdir for aclocal From: Sam James In-Reply-To: <20220117110950.139015-2-sam@gentoo.org> Date: Mon, 17 Jan 2022 11:15:05 +0000 Cc: cross@gentoo.org, base-system@gentoo.org, chewi@gentoo.org Message-Id: <302C1EE6-AE17-413D-B919-B9238C318872@gentoo.org> References: <20220117110950.139015-1-sam@gentoo.org> <20220117110950.139015-2-sam@gentoo.org> To: gentoo-dev@lists.gentoo.org X-Mailer: Apple Mail (2.3693.40.0.1.81) X-Archives-Salt: a5e81e7f-9bfb-4dfa-a00d-37943d07382c X-Archives-Hash: f596f5ebc1901471f9162be620b21d27 --Apple-Mail=_3D12C6BB-CC43-4B3A-9CA1-9DC516CDDC1F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 17 Jan 2022, at 11:09, Sam James wrote: >=20 > We need to instruct aclocal that it might find macros in both > ${BROOT} _and_ ${SYSROOT}. >=20 > - A classic example within BROOT is autoconf-archive. >=20 > - A classic example within SYSROOT is, say, libogg. A fair amount of > codec software installs its own macro to help locating it (but this > is in no ways limited to that genre/area). >=20 > The correct position for a dependency like libogg is DEPEND, and yet > the status quo doesn't mean that aclocal is obligated to check in = ${ESYSROOT} > which is where DEPEND-class dependencies are guaranteed to be = installed. >=20 > We can't rely on these being in BDEPEND -- in fact, most of the time, > they won't be. If we wanted to rely on macros always being provided = by > BDEPEND, we'd have to duplicate a considerable number of dependencies > in both BDEPEND + DEPEND, with the unnecessary cross-compilation that = would > entail too: it makes far more sense to just tell aclocal to look in = the > right place (an extra location). >=20 > Bug: https://bugs.gentoo.org/710792 > Closes: https://bugs.gentoo.org/677002 > Closes: https://bugs.gentoo.org/738918 > Thanks-to: David Michael (for the suggestion) > Thanks-to: James Le Cuirot (rubberducking & = sounding board) > Signed-off-by: Sam James > --- > eclass/autotools.eclass | 16 +++++++++++++++- > 1 file changed, 15 insertions(+), 1 deletion(-) >=20 > diff --git a/eclass/autotools.eclass b/eclass/autotools.eclass > index e2572290f0cbe..2cf7c076d01ed 100644 > --- a/eclass/autotools.eclass > +++ b/eclass/autotools.eclass > @@ -332,8 +332,22 @@ eaclocal_amflags() { > # They also force installing the support files for safety. > # Respects AT_M4DIR for additional directories to search for macros. > eaclocal() { > + # Feed in a list of paths: > + # - ${BROOT}/usr/share/aclocal > + # - ${ESYSROOT}/usr/share/aclocal > + # See bug #677002 > + if [[ ! -f "${T}"/aclocal/dirlist ]] ; then > + mkdir "${T}"/aclocal || die > + cat <<- EOF > "${T}"/aclocal/dirlist || die > + ${BROOT}/usr/share/aclocal > + ${ESYSROOT}/usr/share/aclocal > + EOF > + fi > + > + local system_acdir=3D" --system-acdir=3D${T}/aclocal" > + > [[ ! -f aclocal.m4 || -n $(grep -e 'generated.*by aclocal' = aclocal.m4) ]] && \ > - autotools_run_tool --at-m4flags aclocal "$@" = $(eaclocal_amflags) > + autotools_run_tool --at-m4flags aclocal "$@" = $(eaclocal_amflags) ${system_acdir} > } I've changed this locally to just skip the add-system-acdir-logic for = older EAPIs. Forgot to amend the commit, Chewi had already pointed this out privately. best, sam --Apple-Mail=_3D12C6BB-CC43-4B3A-9CA1-9DC516CDDC1F Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEEYOpPv/uDUzOcqtTy9JIoEO6gSDsFAmHlT7lfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDYw RUE0RkJGRkI4MzUzMzM5Q0FBRDRGMkY0OTIyODEwRUVBMDQ4M0IACgkQ9JIoEO6g SDuD/ggAg467DmYHb3nA4raiJL7Q/HNtnDdfJE3TG3OOutb9rWC2OclGck0GqJWK aSAwwheDgaSA7cBHnW7zXFLdqodo+Xfr7/ua53yzWrBN8CmSxtR84H1Ikw+9I9Vv aQVJUay8120EXlfpUTnncfVeZz8Ll0B01epSbNsOsW1EeRn5qaGJtGCw9ZAzMvn9 8RDSgskM+YAHx82od1z7EBrTvaFgjqEcseYhACtkLkbUnmQU1G0eNdgntyahAA4E OeXRKtB8GXQxa3e9Y6GGH2jbiaN021wc+nrQOHPbJrNP9T3KdckRcts2CNqBc9x5 ilPyng20MGazFbC43toKBWUUWJWsZQ== =0ptG -----END PGP SIGNATURE----- --Apple-Mail=_3D12C6BB-CC43-4B3A-9CA1-9DC516CDDC1F--