Gentoo Archives: gentoo-dev

From: William Hubbs <williamh@g.o>
To: gentoo-dev@l.g.o
Cc: William Hubbs <williamh@g.o>
Subject: [gentoo-dev] [PATCH] eclass/lua-utils.eclass: remove EPREFIX from exported module paths
Date: Mon, 11 Jan 2021 17:01:49
Message-Id: 20210111170133.15275-1-williamh@gentoo.org
1 Bug: https://bugs.gentoo.org/762769
2 Signed-off-by: William Hubbs <williamh@g.o>
3 ---
4 eclass/lua-utils.eclass | 23 ++++++++++++++++++-----
5 1 file changed, 18 insertions(+), 5 deletions(-)
6
7 diff --git a/eclass/lua-utils.eclass b/eclass/lua-utils.eclass
8 index 100be14cb08..9fe4d22e93f 100644
9 --- a/eclass/lua-utils.eclass
10 +++ b/eclass/lua-utils.eclass
11 @@ -212,8 +212,9 @@ _lua_get_library_file() {
12 die "Invalid implementation: ${impl}"
13 ;;
14 esac
15 - libdir=$($(tc-getPKG_CONFIG) --variable libdir ${impl}) || die
16
17 + libdir=$($(tc-getPKG_CONFIG) --variable libdir ${impl}) || die
18 +
19 debug-print "${FUNCNAME}: libdir = ${libdir}, libname = ${libname}"
20 echo "${libdir}/${libname}"
21 }
22 @@ -274,6 +275,7 @@ _lua_export() {
23 local val
24
25 val=$($(tc-getPKG_CONFIG) --variable INSTALL_CMOD ${impl}) || die
26 + val="${val#${ESYSROOT#${SYSROOT}}}"
27
28 export LUA_CMOD_DIR=${val}
29 debug-print "${FUNCNAME}: LUA_CMOD_DIR = ${LUA_CMOD_DIR}"
30 @@ -282,6 +284,7 @@ _lua_export() {
31 local val
32
33 val=$($(tc-getPKG_CONFIG) --variable includedir ${impl}) || die
34 + val="${val#${ESYSROOT#${SYSROOT}}}"
35
36 export LUA_INCLUDE_DIR=${val}
37 debug-print "${FUNCNAME}: LUA_INCLUDE_DIR = ${LUA_INCLUDE_DIR}"
38 @@ -298,6 +301,7 @@ _lua_export() {
39 local val
40
41 val=$($(tc-getPKG_CONFIG) --variable INSTALL_LMOD ${impl}) || die
42 + val="${val#${ESYSROOT#${SYSROOT}}}"
43
44 export LUA_LMOD_DIR=${val}
45 debug-print "${FUNCNAME}: LUA_LMOD_DIR = ${LUA_LMOD_DIR}"
46 @@ -364,11 +368,14 @@ lua_get_CFLAGS() {
47 # @USAGE: [<impl>]
48 # @DESCRIPTION:
49 # Obtain and print the name of the directory into which compiled Lua
50 -# modules are installed, for the given implementation. If no implementation
51 +# modules are installed for the given implementation. If no implementation
52 # is provided, ${ELUA} will be used.
53 #
54 -# Please note that this function requires Lua and pkg-config installed,
55 -# and therefore proper build-time dependencies need be added to the ebuild.
56 +# Please note that this function requires Lua and pkg-config to be installed,
57 +# and therefore proper build-time dependencies need to be added to the ebuild.
58 +#
59 +# For prefix installations, this function does not include the offset in
60 +# the path.
61 lua_get_cmod_dir() {
62 debug-print-function ${FUNCNAME} "${@}"
63
64 @@ -385,6 +392,9 @@ lua_get_cmod_dir() {
65 #
66 # Please note that this function requires Lua and pkg-config installed,
67 # and therefore proper build-time dependencies need be added to the ebuild.
68 +#
69 +# For prefix installations, this function does not include the offset in
70 +# the path.
71 lua_get_include_dir() {
72 debug-print-function ${FUNCNAME} "${@}"
73
74 @@ -412,11 +422,14 @@ lua_get_LIBS() {
75 # @USAGE: [<impl>]
76 # @DESCRIPTION:
77 # Obtain and print the name of the directory into which native-Lua
78 -# modules are installed, for the given implementation. If no implementation
79 +# modules are installed for the given implementation. If no implementation
80 # is provided, ${ELUA} will be used.
81 #
82 # Please note that this function requires Lua and pkg-config installed,
83 # and therefore proper build-time dependencies need be added to the ebuild.
84 +#
85 +# For prefix installations, this function does not include the offset in
86 +# the path.
87 lua_get_lmod_dir() {
88 debug-print-function ${FUNCNAME} "${@}"
89
90 --
91 2.26.2

Replies