1 |
On Thu, 7 Jan 2021 17:13:09 -0600 |
2 |
William Hubbs <williamh@g.o> wrote: |
3 |
|
4 |
> Bug: https://bugs.gentoo.org/762769 |
5 |
> Signed-off-by: William Hubbs <williamh@g.o> |
6 |
> --- |
7 |
> eclass/lua-utils.eclass | 7 ++++++- |
8 |
> 1 file changed, 6 insertions(+), 1 deletion(-) |
9 |
> |
10 |
> diff --git a/eclass/lua-utils.eclass b/eclass/lua-utils.eclass |
11 |
> index 100be14cb08..1e552da0848 100644 |
12 |
> --- a/eclass/lua-utils.eclass |
13 |
> +++ b/eclass/lua-utils.eclass |
14 |
> @@ -212,8 +212,10 @@ _lua_get_library_file() { |
15 |
> die "Invalid implementation: ${impl}" |
16 |
> ;; |
17 |
> esac |
18 |
> - libdir=$($(tc-getPKG_CONFIG) --variable libdir ${impl}) || die |
19 |
> |
20 |
> + libdir=$($(tc-getPKG_CONFIG) --variable libdir ${impl}) || die |
21 |
> + libdir="${libdir#${ESYSROOT#${SYSROOT}}}" |
22 |
> + |
23 |
> debug-print "${FUNCNAME}: libdir = ${libdir}, libname = ${libname}" |
24 |
> echo "${libdir}/${libname}" |
25 |
> } |
26 |
> @@ -274,6 +276,7 @@ _lua_export() { |
27 |
> local val |
28 |
> |
29 |
> val=$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD ${impl}) || die |
30 |
> + val="${val#${ESYSROOT#${SYSROOT}}}" |
31 |
> |
32 |
> export LUA_CMOD_DIR=${val} |
33 |
> debug-print "${FUNCNAME}: LUA_CMOD_DIR = ${LUA_CMOD_DIR}" |
34 |
> @@ -282,6 +285,7 @@ _lua_export() { |
35 |
> local val |
36 |
> |
37 |
> val=$($(tc-getPKG_CONFIG) --variable includedir ${impl}) || die |
38 |
> + val="${val#${ESYSROOT#${SYSROOT}}}" |
39 |
> |
40 |
> export LUA_INCLUDE_DIR=${val} |
41 |
> debug-print "${FUNCNAME}: LUA_INCLUDE_DIR = ${LUA_INCLUDE_DIR}" |
42 |
> @@ -298,6 +302,7 @@ _lua_export() { |
43 |
> local val |
44 |
> |
45 |
> val=$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD ${impl}) || die |
46 |
> + val="${val#${ESYSROOT#${SYSROOT}}}" |
47 |
> |
48 |
> export LUA_LMOD_DIR=${val} |
49 |
> debug-print "${FUNCNAME}: LUA_LMOD_DIR = ${LUA_LMOD_DIR}" |
50 |
|
51 |
NACK. |
52 |
|
53 |
The _lua_get_library_file() result is used for lua_get_shared_lib() and |
54 |
this appears to be always used when building, not when installing. In |
55 |
that case, you want it to return the prefixed (and sysrooted) path or |
56 |
callers should always prepend ${ESYSROOT}. |
57 |
|
58 |
Similarly, lua_get_include_dir() is often used for building but is |
59 |
sometimes used for installing too. luaexpat uses it for both! If this |
60 |
is returned unprefixed then luaexpat and similar should prepend |
61 |
${ESYSROOT} when building and ${ED} when installing. |
62 |
|
63 |
I did suggest that you explicitly whether the paths are prefixed or not |
64 |
in the function descriptions so please do that. |
65 |
|
66 |
As discussed, I'll get back to you on the other sysroot issue. |
67 |
|
68 |
-- |
69 |
James Le Cuirot (chewi) |
70 |
Gentoo Linux Developer |