* [gentoo-dev] [PATCH] lua-utils.eclass: use BROOT or ESYSROOT where appropriate
@ 2024-08-18 18:31 Mike Gilbert
2024-08-19 21:21 ` James Le Cuirot
0 siblings, 1 reply; 2+ messages in thread
From: Mike Gilbert @ 2024-08-18 18:31 UTC (permalink / raw
To: gentoo-dev; +Cc: williamh, Mike Gilbert
The LUA variable points to a lua binary that is likely to be executed by
the build system. Use BROOT for this.
Use ESYSROOT for the pkg-config symlink, since this is likely used for
linking a library.
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
---
eclass/lua-utils.eclass | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/eclass/lua-utils.eclass b/eclass/lua-utils.eclass
index 0ff36734dc8f..c63ec369c1c2 100644
--- a/eclass/lua-utils.eclass
+++ b/eclass/lua-utils.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: lua-utils.eclass
@@ -144,18 +144,18 @@ _lua_wrapper_setup() {
_lua_export "${impl}" ELUA LUA
# Lua interpreter
- ln -s "${EPREFIX}"/usr/bin/${ELUA} "${workdir}"/bin/lua || die
+ ln -s "${LUA}" "${workdir}"/bin/lua || die
# Lua compiler, or a stub for it in case of luajit
if [[ ${ELUA} == luajit ]]; then
# Just in case
- ln -s "${EPREFIX}"/bin/true "${workdir}"/bin/luac || die
+ ln -s "${BROOT}"/bin/true "${workdir}"/bin/luac || die
else
- ln -s "${EPREFIX}"/usr/bin/${ELUA/a/ac} "${workdir}"/bin/luac || die
+ ln -s "${BROOT}"/usr/bin/${ELUA/a/ac} "${workdir}"/bin/luac || die
fi
# pkg-config
- ln -s "${EPREFIX}"/usr/$(get_libdir)/pkgconfig/${ELUA}.pc \
+ ln -s "${ESYSROOT}"/usr/$(get_libdir)/pkgconfig/${ELUA}.pc \
"${workdir}"/pkgconfig/lua.pc || die
fi
@@ -264,7 +264,7 @@ _lua_export() {
debug-print "${FUNCNAME}: ELUA = ${ELUA}"
;;
LUA)
- export LUA="${EPREFIX}"/usr/bin/${impl}
+ export LUA="${BROOT}"/usr/bin/${impl}
debug-print "${FUNCNAME}: LUA = ${LUA}"
;;
LUA_CFLAGS)
--
2.46.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [gentoo-dev] [PATCH] lua-utils.eclass: use BROOT or ESYSROOT where appropriate
2024-08-18 18:31 [gentoo-dev] [PATCH] lua-utils.eclass: use BROOT or ESYSROOT where appropriate Mike Gilbert
@ 2024-08-19 21:21 ` James Le Cuirot
0 siblings, 0 replies; 2+ messages in thread
From: James Le Cuirot @ 2024-08-19 21:21 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1986 bytes --]
On Sun, 2024-08-18 at 14:31 -0400, Mike Gilbert wrote:
> The LUA variable points to a lua binary that is likely to be executed by
> the build system. Use BROOT for this.
>
> Use ESYSROOT for the pkg-config symlink, since this is likely used for
> linking a library.
>
> Signed-off-by: Mike Gilbert <floppym@gentoo.org>
> ---
> eclass/lua-utils.eclass | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/eclass/lua-utils.eclass b/eclass/lua-utils.eclass
> index 0ff36734dc8f..c63ec369c1c2 100644
> --- a/eclass/lua-utils.eclass
> +++ b/eclass/lua-utils.eclass
> @@ -1,4 +1,4 @@
> -# Copyright 1999-2023 Gentoo Authors
> +# Copyright 1999-2024 Gentoo Authors
> # Distributed under the terms of the GNU General Public License v2
>
> # @ECLASS: lua-utils.eclass
> @@ -144,18 +144,18 @@ _lua_wrapper_setup() {
> _lua_export "${impl}" ELUA LUA
>
> # Lua interpreter
> - ln -s "${EPREFIX}"/usr/bin/${ELUA} "${workdir}"/bin/lua || die
> + ln -s "${LUA}" "${workdir}"/bin/lua || die
>
> # Lua compiler, or a stub for it in case of luajit
> if [[ ${ELUA} == luajit ]]; then
> # Just in case
> - ln -s "${EPREFIX}"/bin/true "${workdir}"/bin/luac || die
> + ln -s "${BROOT}"/bin/true "${workdir}"/bin/luac || die
> else
> - ln -s "${EPREFIX}"/usr/bin/${ELUA/a/ac} "${workdir}"/bin/luac || die
> + ln -s "${BROOT}"/usr/bin/${ELUA/a/ac} "${workdir}"/bin/luac || die
> fi
>
> # pkg-config
> - ln -s "${EPREFIX}"/usr/$(get_libdir)/pkgconfig/${ELUA}.pc \
> + ln -s "${ESYSROOT}"/usr/$(get_libdir)/pkgconfig/${ELUA}.pc \
> "${workdir}"/pkgconfig/lua.pc || die
> fi
>
> @@ -264,7 +264,7 @@ _lua_export() {
> debug-print "${FUNCNAME}: ELUA = ${ELUA}"
> ;;
> LUA)
> - export LUA="${EPREFIX}"/usr/bin/${impl}
> + export LUA="${BROOT}"/usr/bin/${impl}
> debug-print "${FUNCNAME}: LUA = ${LUA}"
> ;;
> LUA_CFLAGS)
Looks good!
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 858 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-19 21:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-18 18:31 [gentoo-dev] [PATCH] lua-utils.eclass: use BROOT or ESYSROOT where appropriate Mike Gilbert
2024-08-19 21:21 ` James Le Cuirot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox