public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] eclass/lua.eclass: remove EPREFIX from exported paths
@ 2021-01-07 23:13 William Hubbs
  2021-01-07 23:27 ` William Hubbs
  2021-01-07 23:36 ` James Le Cuirot
  0 siblings, 2 replies; 3+ messages in thread
From: William Hubbs @ 2021-01-07 23:13 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 | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/eclass/lua-utils.eclass b/eclass/lua-utils.eclass
index 100be14cb08..1e552da0848 100644
--- a/eclass/lua-utils.eclass
+++ b/eclass/lua-utils.eclass
@@ -212,8 +212,10 @@ _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
+	libdir="${libdir#${ESYSROOT#${SYSROOT}}}"
+	
 	debug-print "${FUNCNAME}: libdir = ${libdir}, libname = ${libname}"
 	echo "${libdir}/${libname}"
 }
@@ -274,6 +276,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 +285,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 +302,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}"
-- 
2.26.2



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

* Re: [gentoo-dev] [PATCH] eclass/lua.eclass: remove EPREFIX from exported paths
  2021-01-07 23:13 [gentoo-dev] [PATCH] eclass/lua.eclass: remove EPREFIX from exported paths William Hubbs
@ 2021-01-07 23:27 ` William Hubbs
  2021-01-07 23:36 ` James Le Cuirot
  1 sibling, 0 replies; 3+ messages in thread
From: William Hubbs @ 2021-01-07 23:27 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1795 bytes --]

I'll fix the subject before I commit.

William

On Thu, Jan 07, 2021 at 05:13:09PM -0600, William Hubbs wrote:
> Bug: https://bugs.gentoo.org/762769
> Signed-off-by: William Hubbs <williamh@gentoo.org>
> ---
>  eclass/lua-utils.eclass | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/eclass/lua-utils.eclass b/eclass/lua-utils.eclass
> index 100be14cb08..1e552da0848 100644
> --- a/eclass/lua-utils.eclass
> +++ b/eclass/lua-utils.eclass
> @@ -212,8 +212,10 @@ _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
> +	libdir="${libdir#${ESYSROOT#${SYSROOT}}}"
> +	
>  	debug-print "${FUNCNAME}: libdir = ${libdir}, libname = ${libname}"
>  	echo "${libdir}/${libname}"
>  }
> @@ -274,6 +276,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 +285,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 +302,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}"
> -- 
> 2.26.2
> 
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

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

* Re: [gentoo-dev] [PATCH] eclass/lua.eclass: remove EPREFIX from exported paths
  2021-01-07 23:13 [gentoo-dev] [PATCH] eclass/lua.eclass: remove EPREFIX from exported paths William Hubbs
  2021-01-07 23:27 ` William Hubbs
@ 2021-01-07 23:36 ` James Le Cuirot
  1 sibling, 0 replies; 3+ messages in thread
From: James Le Cuirot @ 2021-01-07 23:36 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 2513 bytes --]

On Thu,  7 Jan 2021 17:13:09 -0600
William Hubbs <williamh@gentoo.org> wrote:

> Bug: https://bugs.gentoo.org/762769
> Signed-off-by: William Hubbs <williamh@gentoo.org>
> ---
>  eclass/lua-utils.eclass | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/eclass/lua-utils.eclass b/eclass/lua-utils.eclass
> index 100be14cb08..1e552da0848 100644
> --- a/eclass/lua-utils.eclass
> +++ b/eclass/lua-utils.eclass
> @@ -212,8 +212,10 @@ _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
> +	libdir="${libdir#${ESYSROOT#${SYSROOT}}}"
> +	
>  	debug-print "${FUNCNAME}: libdir = ${libdir}, libname = ${libname}"
>  	echo "${libdir}/${libname}"
>  }
> @@ -274,6 +276,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 +285,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 +302,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}"

NACK.

The _lua_get_library_file() result is used for lua_get_shared_lib() and
this appears to be always used when building, not when installing. In
that case, you want it to return the prefixed (and sysrooted) path or
callers should always prepend ${ESYSROOT}.

Similarly, lua_get_include_dir() is often used for building but is
sometimes used for installing too. luaexpat uses it for both! If this
is returned unprefixed then luaexpat and similar should prepend
${ESYSROOT} when building and ${ED} when installing. 

I did suggest that you explicitly whether the paths are prefixed or not
in the function descriptions so please do that.

As discussed, I'll get back to you on the other sysroot issue.

-- 
James Le Cuirot (chewi)
Gentoo Linux Developer

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2021-01-07 23:36 UTC | newest]

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