Bug: https://bugs.gentoo.org/762769 Signed-off-by: William Hubbs <willi...@gentoo.org> --- eclass/lua-utils.eclass | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-)
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=$($(tc-getPKG_CONFIG) --variable libdir ${impl}) || die + libdir=$($(tc-getPKG_CONFIG) --variable libdir ${impl}) || die + debug-print "${FUNCNAME}: libdir = ${libdir}, libname = ${libname}" echo "${libdir}/${libname}" } @@ -274,6 +275,7 @@ _lua_export() { local val val=$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD ${impl}) || die + val="${val#${ESYSROOT#${SYSROOT}}}" export LUA_CMOD_DIR=${val} debug-print "${FUNCNAME}: LUA_CMOD_DIR = ${LUA_CMOD_DIR}" @@ -282,6 +284,7 @@ _lua_export() { local val val=$($(tc-getPKG_CONFIG) --variable includedir ${impl}) || die + val="${val#${ESYSROOT#${SYSROOT}}}" export LUA_INCLUDE_DIR=${val} debug-print "${FUNCNAME}: LUA_INCLUDE_DIR = ${LUA_INCLUDE_DIR}" @@ -298,6 +301,7 @@ _lua_export() { local val val=$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD ${impl}) || die + val="${val#${ESYSROOT#${SYSROOT}}}" export LUA_LMOD_DIR=${val} debug-print "${FUNCNAME}: LUA_LMOD_DIR = ${LUA_LMOD_DIR}" @@ -364,11 +368,14 @@ lua_get_CFLAGS() { # @USAGE: [<impl>] # @DESCRIPTION: # Obtain and print the name of the directory into which compiled Lua -# modules are installed, for the given implementation. If no implementation +# modules are installed for the given implementation. If no implementation # 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 ebuild. +# Please note that this function requires Lua and pkg-config to be installed, +# and therefore proper build-time dependencies need to be added to the ebuild. +# +# For prefix installations, this function does not include the offset in +# the path. lua_get_cmod_dir() { debug-print-function ${FUNCNAME} "${@}" @@ -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 ebuild. +# +# For prefix installations, this function does not include the offset in +# the path. lua_get_include_dir() { debug-print-function ${FUNCNAME} "${@}" @@ -412,11 +422,14 @@ lua_get_LIBS() { # @USAGE: [<impl>] # @DESCRIPTION: # Obtain and print the name of the directory into which native-Lua -# modules are installed, for the given implementation. If no implementation +# modules are installed for the given implementation. If no implementation # 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 ebuild. +# +# For prefix installations, this function does not include the offset in +# the path. lua_get_lmod_dir() { debug-print-function ${FUNCNAME} "${@}" -- 2.26.2