Openembedded Devel Discussions
 help / color / mirror / Atom feed
* [meta-oe][PATCH] swig: add native wrapper for SWIGLIB
@ 2014-04-09  7:34 Kai Kang
  2014-04-10  8:39 ` Martin Jansa
  2014-04-20  9:26 ` Martin Jansa
  0 siblings, 2 replies; 4+ messages in thread
From: Kai Kang @ 2014-04-09  7:34 UTC (permalink / raw)
  To: openembedded-devel

Native swig will read data from hard-coded SWIGLIB or the same
environment variable.

While using sstate, the hard-coded SWIGLIB will point to the project
that create original sstates. This would cause build issues, so add
a wrapper to set the environment variable SWIGLIB to a relative path
on current sysroot.

Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta-oe/recipes-devtools/swig/swig.inc | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/meta-oe/recipes-devtools/swig/swig.inc b/meta-oe/recipes-devtools/swig/swig.inc
index 8e83526..96cd02a 100644
--- a/meta-oe/recipes-devtools/swig/swig.inc
+++ b/meta-oe/recipes-devtools/swig/swig.inc
@@ -50,3 +50,10 @@ do_configure() {
     oe_runconf
 }
 
+def swiglib_relpath(d):
+    swiglib = d.getVar('datadir', True) + "/" + d.getVar('BPN', True) + "/" + d.getVar('PV', True)
+    return os.path.relpath(swiglib, d.getVar('bindir', True))
+
+do_install_append_class-native() {
+       create_wrapper ${D}${bindir}/swig SWIG_LIB='`dirname $''realpath`'/${@swiglib_relpath(d)}
+}
-- 
1.8.4



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

* Re: [meta-oe][PATCH] swig: add native wrapper for SWIGLIB
  2014-04-09  7:34 [meta-oe][PATCH] swig: add native wrapper for SWIGLIB Kai Kang
@ 2014-04-10  8:39 ` Martin Jansa
  2014-04-10  9:37   ` Kang Kai
  2014-04-20  9:26 ` Martin Jansa
  1 sibling, 1 reply; 4+ messages in thread
From: Martin Jansa @ 2014-04-10  8:39 UTC (permalink / raw)
  To: openembedded-devel

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

On Wed, Apr 09, 2014 at 03:34:57PM +0800, Kai Kang wrote:
> Native swig will read data from hard-coded SWIGLIB or the same
> environment variable.
> 
> While using sstate, the hard-coded SWIGLIB will point to the project
> that create original sstates. This would cause build issues, so add
> a wrapper to set the environment variable SWIGLIB to a relative path
> on current sysroot.
> 
> Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
>  meta-oe/recipes-devtools/swig/swig.inc | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/meta-oe/recipes-devtools/swig/swig.inc b/meta-oe/recipes-devtools/swig/swig.inc
> index 8e83526..96cd02a 100644
> --- a/meta-oe/recipes-devtools/swig/swig.inc
> +++ b/meta-oe/recipes-devtools/swig/swig.inc
> @@ -50,3 +50,10 @@ do_configure() {
>      oe_runconf
>  }
>  
> +def swiglib_relpath(d):
> +    swiglib = d.getVar('datadir', True) + "/" + d.getVar('BPN', True) + "/" + d.getVar('PV', True)
> +    return os.path.relpath(swiglib, d.getVar('bindir', True))
> +
> +do_install_append_class-native() {
> +       create_wrapper ${D}${bindir}/swig SWIG_LIB='`dirname $''realpath`'/${@swiglib_relpath(d)}

This should use 4 spaces for indentation, but I'll fix it while
cherry-picking => no need to resend.

> +}
> -- 
> 1.8.4
> 
> -- 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

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

* Re: [meta-oe][PATCH] swig: add native wrapper for SWIGLIB
  2014-04-10  8:39 ` Martin Jansa
@ 2014-04-10  9:37   ` Kang Kai
  0 siblings, 0 replies; 4+ messages in thread
From: Kang Kai @ 2014-04-10  9:37 UTC (permalink / raw)
  To: openembedded-devel

On 2014?04?10? 16:39, Martin Jansa wrote:
> On Wed, Apr 09, 2014 at 03:34:57PM +0800, Kai Kang wrote:
>> Native swig will read data from hard-coded SWIGLIB or the same
>> environment variable.
>>
>> While using sstate, the hard-coded SWIGLIB will point to the project
>> that create original sstates. This would cause build issues, so add
>> a wrapper to set the environment variable SWIGLIB to a relative path
>> on current sysroot.
>>
>> Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
>> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
>> Signed-off-by: Kai Kang <kai.kang@windriver.com>
>> ---
>>   meta-oe/recipes-devtools/swig/swig.inc | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/meta-oe/recipes-devtools/swig/swig.inc b/meta-oe/recipes-devtools/swig/swig.inc
>> index 8e83526..96cd02a 100644
>> --- a/meta-oe/recipes-devtools/swig/swig.inc
>> +++ b/meta-oe/recipes-devtools/swig/swig.inc
>> @@ -50,3 +50,10 @@ do_configure() {
>>       oe_runconf
>>   }
>>   
>> +def swiglib_relpath(d):
>> +    swiglib = d.getVar('datadir', True) + "/" + d.getVar('BPN', True) + "/" + d.getVar('PV', True)
>> +    return os.path.relpath(swiglib, d.getVar('bindir', True))
>> +
>> +do_install_append_class-native() {
>> +       create_wrapper ${D}${bindir}/swig SWIG_LIB='`dirname $''realpath`'/${@swiglib_relpath(d)}
> This should use 4 spaces for indentation, but I'll fix it while
> cherry-picking => no need to resend.

Thanks.

--Kai

>
>> +}
>> -- 
>> 1.8.4
>>
>> -- 
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>
>


-- 
Regards,
Neil | Kai Kang



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

* Re: [meta-oe][PATCH] swig: add native wrapper for SWIGLIB
  2014-04-09  7:34 [meta-oe][PATCH] swig: add native wrapper for SWIGLIB Kai Kang
  2014-04-10  8:39 ` Martin Jansa
@ 2014-04-20  9:26 ` Martin Jansa
  1 sibling, 0 replies; 4+ messages in thread
From: Martin Jansa @ 2014-04-20  9:26 UTC (permalink / raw)
  To: openembedded-devel

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

On Wed, Apr 09, 2014 at 03:34:57PM +0800, Kai Kang wrote:
> Native swig will read data from hard-coded SWIGLIB or the same
> environment variable.
> 
> While using sstate, the hard-coded SWIGLIB will point to the project
> that create original sstates. This would cause build issues, so add
> a wrapper to set the environment variable SWIGLIB to a relative path
> on current sysroot.

Merged, thanks!

> 
> Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
>  meta-oe/recipes-devtools/swig/swig.inc | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/meta-oe/recipes-devtools/swig/swig.inc b/meta-oe/recipes-devtools/swig/swig.inc
> index 8e83526..96cd02a 100644
> --- a/meta-oe/recipes-devtools/swig/swig.inc
> +++ b/meta-oe/recipes-devtools/swig/swig.inc
> @@ -50,3 +50,10 @@ do_configure() {
>      oe_runconf
>  }
>  
> +def swiglib_relpath(d):
> +    swiglib = d.getVar('datadir', True) + "/" + d.getVar('BPN', True) + "/" + d.getVar('PV', True)
> +    return os.path.relpath(swiglib, d.getVar('bindir', True))
> +
> +do_install_append_class-native() {
> +       create_wrapper ${D}${bindir}/swig SWIG_LIB='`dirname $''realpath`'/${@swiglib_relpath(d)}
> +}
> -- 
> 1.8.4
> 
> -- 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

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

end of thread, other threads:[~2014-04-20  9:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-09  7:34 [meta-oe][PATCH] swig: add native wrapper for SWIGLIB Kai Kang
2014-04-10  8:39 ` Martin Jansa
2014-04-10  9:37   ` Kang Kai
2014-04-20  9:26 ` Martin Jansa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox