public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] eclass/lua-utils.eclass: remove EPREFIX from exported module paths
@ 2021-01-11 17:01 William Hubbs
  2021-01-13 22:51 ` James Le Cuirot
  0 siblings, 1 reply; 2+ messages in thread
From: William Hubbs @ 2021-01-11 17:01 UTC (permalink / raw
  To: gentoo-dev; +Cc: William Hubbs

Bug: https://bugs.gentoo.org/762769
Signed-off-by: William Hubbs <williamh@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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-13 22:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-11 17:01 [gentoo-dev] [PATCH] eclass/lua-utils.eclass: remove EPREFIX from exported module paths William Hubbs
2021-01-13 22:51 ` 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