[oe] [meta-oe][PATCH] swig: add native wrapper for SWIGLIB
Kai Kang
kai.kang at windriver.com
Wed Apr 9 07:34:57 UTC 2014
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 at windriver.com>
Signed-off-by: Mark Hatle <mark.hatle at windriver.com>
Signed-off-by: Kai Kang <kai.kang at 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
More information about the Openembedded-devel
mailing list