[oe-commits] Kang Kai : swig: add native wrapper for SWIGLIB

git at git.openembedded.org git at git.openembedded.org
Fri Apr 18 09:48:10 UTC 2014


Module: meta-openembedded.git
Branch: master-next
Commit: b2b838591c4cf7e321d2f98995d6f58587403f3c
URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=b2b838591c4cf7e321d2f98995d6f58587403f3c

Author: Kang Kai <kai.kang at windriver.com>
Date:   Wed Apr  9 15:34:57 2014 +0800

swig: add native wrapper for SWIGLIB

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>
Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>

---

 meta-oe/recipes-devtools/swig/swig.inc | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/meta-oe/recipes-devtools/swig/swig.inc b/meta-oe/recipes-devtools/swig/swig.inc
index 52ef9a6..9821fa5 100644
--- a/meta-oe/recipes-devtools/swig/swig.inc
+++ b/meta-oe/recipes-devtools/swig/swig.inc
@@ -53,3 +53,11 @@ do_install_append_class-nativesdk() {
     cd ${D}${bindir}
     ln -s swig swig2.0
 }
+
+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)}
+}



More information about the Openembedded-commits mailing list