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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id ABBE41382C5 for ; Wed, 13 Jan 2021 22:51:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AF57CE0965; Wed, 13 Jan 2021 22:51:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BD1CBE0959 for ; Wed, 13 Jan 2021 22:51:35 +0000 (UTC) Date: Wed, 13 Jan 2021 22:51:19 +0000 From: James Le Cuirot To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [PATCH] eclass/lua-utils.eclass: remove EPREFIX from exported module paths Message-ID: <20210113225119.420da02c@symphony.aura-online.co.uk> In-Reply-To: <20210111170133.15275-1-williamh@gentoo.org> References: <20210111170133.15275-1-williamh@gentoo.org> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) 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 Content-Type: multipart/signed; boundary="Sig_/FTBrDFjjIVCujO8gFhvaVQJ"; protocol="application/pgp-signature"; micalg=pgp-sha256 X-Archives-Salt: 6caff479-98de-4d22-880b-ed7691897b36 X-Archives-Hash: fb462231658b781dfdc1f86796322b4d --Sig_/FTBrDFjjIVCujO8gFhvaVQJ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Mon, 11 Jan 2021 11:01:33 -0600 William Hubbs wrote: > Bug: https://bugs.gentoo.org/762769 > Signed-off-by: William Hubbs > --- > eclass/lua-utils.eclass | 23 ++++++++++++++++++----- > 1 file changed, 18 insertions(+), 5 deletions(-) >=20 > diff --git a/eclass/lua-utils.eclass b/eclass/lua-utils.eclass > index 100be14cb08..9fe4d22e93f 100644 > --- a/eclass/lua-utils.eclass > +++ b/eclass/lua-utils.eclass > @@ -212,8 +212,9 @@ _lua_get_library_file() { > die "Invalid implementation: ${impl}" > ;; > esac > - libdir=3D$($(tc-getPKG_CONFIG) --variable libdir ${impl}) || die > =20 > + libdir=3D$($(tc-getPKG_CONFIG) --variable libdir ${impl}) || die > +=09 > debug-print "${FUNCNAME}: libdir =3D ${libdir}, libname =3D ${libname}" > echo "${libdir}/${libname}" > } > @@ -274,6 +275,7 @@ _lua_export() { > local val > =20 > val=3D$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD ${impl}) || die > + val=3D"${val#${ESYSROOT#${SYSROOT}}}" > =20 > export LUA_CMOD_DIR=3D${val} > debug-print "${FUNCNAME}: LUA_CMOD_DIR =3D ${LUA_CMOD_DIR}" > @@ -282,6 +284,7 @@ _lua_export() { > local val > =20 > val=3D$($(tc-getPKG_CONFIG) --variable includedir ${impl}) || die > + val=3D"${val#${ESYSROOT#${SYSROOT}}}" > =20 > export LUA_INCLUDE_DIR=3D${val} > debug-print "${FUNCNAME}: LUA_INCLUDE_DIR =3D ${LUA_INCLUDE_DIR}" > @@ -298,6 +301,7 @@ _lua_export() { > local val > =20 > val=3D$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD ${impl}) || die > + val=3D"${val#${ESYSROOT#${SYSROOT}}}" > =20 > export LUA_LMOD_DIR=3D${val} > debug-print "${FUNCNAME}: LUA_LMOD_DIR =3D ${LUA_LMOD_DIR}" > @@ -364,11 +368,14 @@ lua_get_CFLAGS() { > # @USAGE: [] > # @DESCRIPTION: > # Obtain and print the name of the directory into which compiled Lua > -# modules are installed, for the given implementation. If no implementat= ion > +# modules are installed for the given implementation. If no implementati= on > # is provided, ${ELUA} will be used. > # > -# Please note that this function requires Lua and pkg-config installed, > -# and therefore proper build-time dependencies need be added to the ebui= ld. > +# Please note that this function requires Lua and pkg-config to be insta= lled, > +# and therefore proper build-time dependencies need to be added to the e= build. > +# > +# For prefix installations, this function does not include the offset in > +# the path. > lua_get_cmod_dir() { > debug-print-function ${FUNCNAME} "${@}" > =20 > @@ -385,6 +392,9 @@ lua_get_cmod_dir() { > # > # Please note that this function requires Lua and pkg-config installed, > # and therefore proper build-time dependencies need be added to the ebui= ld. > +# > +# For prefix installations, this function does not include the offset in > +# the path. > lua_get_include_dir() { > debug-print-function ${FUNCNAME} "${@}" > =20 > @@ -412,11 +422,14 @@ lua_get_LIBS() { > # @USAGE: [] > # @DESCRIPTION: > # Obtain and print the name of the directory into which native-Lua > -# modules are installed, for the given implementation. If no implementat= ion > +# modules are installed for the given implementation. If no implementati= on > # is provided, ${ELUA} will be used. > # > # Please note that this function requires Lua and pkg-config installed, > # and therefore proper build-time dependencies need be added to the ebui= ld. > +# > +# For prefix installations, this function does not include the offset in > +# the path. > lua_get_lmod_dir() { > debug-print-function ${FUNCNAME} "${@}" > =20 That's better, thanks. I would go a step further though and add a note to lua_get_shared_lib() to say that this *does* include the SYSROOT and prefix. It is slightly odd that this differs from lua_get_include_dir() but I cannot find any examples where lua_get_shared_lib() is used in an install phase. Can you confirm that following this, you will go around and correct all the ebuilds that use lua_get_include_dir() ? I count around 21 of them. As I said, ${ESYSROOT} should be prepended when it is used in a build phase. luaexpat is a good example of it being used in both a build and an install phase. Note that all of this is still slightly broken by the difference between dev-util/pkgconfig and dev-util/pkgconf but I'll resolve that as soon as I can. Most users, including most prefix users, won't notice. --=20 James Le Cuirot (chewi) Gentoo Linux Developer --Sig_/FTBrDFjjIVCujO8gFhvaVQJ Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEPxcZ3tkwcedKm2a8EiZBXQDdMTcFAl//eWcACgkQEiZBXQDd MTe7AA//dQCQfaApj1TzBtX+D06KGykxtDR6vAS/OUUovHrCeGwGASTUrgmxSNK0 TeH/lhAPfua/WR4qBa0wK2iQbGwqI5AkPYoKYfSqFCrWEfhTn7d4bqSORpmeMjLJ VEabWVe207aQc8H6vJiWi/YaP1CIhz7E0GYK6ciRoqMIN0Ok5wLyIWkJH/5qAhXp +mrF0ugxBYreDfBdhQ1EcWElR1BTSs+kD5jRpKHgkPm3qwHj3cba7G4tGfjGuLGP bIodJjeV6zDwXghQE7cZa+ZAPn3viMWiShM1oyt/qcYGIVdiKAiFzBL/P58Jdqr0 NTmLQGcHaqXYijtWtqrAwzDxiTesRkeO1KrcCQnsOwEcUAbAovxs5Ylt0bFkKUya kPAjKc+JEqEAiAooVg1h0NGtb+UFMuSgHAbOBpz9RG1QiU5qIEzhrp+XjbyQSABl Dlk230iyhINq7JVIe6y7JI37mGOMwMhws2kqfcWwuXXGB2roLVUfuKqyhXK0uGYi oQe01Rry+SyTtoP6fGzKmm+Xv76pqIXZ2pwQYjxsbbW4fW9+U1RSKHashEL1vX97 Ywjy1c6kyDUZgb8RJIAEDSiHn2B/yfZN80vWCo6jGnTcbrJVBiUA+nrQATWUNpI/ tFNQkdd3d6rs2n8CTlpl2S5iMMNGJHmqKf4UxDROA6KwKgvf7yw= =yTQJ -----END PGP SIGNATURE----- --Sig_/FTBrDFjjIVCujO8gFhvaVQJ--