diff options
author | Kang Kai <kai.kang@windriver.com> | 2014-04-09 15:34:57 +0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-04-20 11:24:30 +0200 |
commit | 9a91c137a53db160637cf7278c36b5750a4fd965 (patch) | |
tree | 11f15ca299c5c40b396fda55c7a311c7aaa9fed2 /meta-oe/recipes-devtools/swig | |
parent | 4aa1d4c173f36a7b4c46d11e66c40728a6f276e5 (diff) | |
download | meta-openembedded-9a91c137a53db160637cf7278c36b5750a4fd965.tar.gz |
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@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/swig')
-rw-r--r-- | meta-oe/recipes-devtools/swig/swig.inc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/swig/swig.inc b/meta-oe/recipes-devtools/swig/swig.inc index 52ef9a620..9821fa560 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() { | |||
53 | cd ${D}${bindir} | 53 | cd ${D}${bindir} |
54 | ln -s swig swig2.0 | 54 | ln -s swig swig2.0 |
55 | } | 55 | } |
56 | |||
57 | def swiglib_relpath(d): | ||
58 | swiglib = d.getVar('datadir', True) + "/" + d.getVar('BPN', True) + "/" + d.getVar('PV', True) | ||
59 | return os.path.relpath(swiglib, d.getVar('bindir', True)) | ||
60 | |||
61 | do_install_append_class-native() { | ||
62 | create_wrapper ${D}${bindir}/swig SWIG_LIB='`dirname $''realpath`'/${@swiglib_relpath(d)} | ||
63 | } | ||