mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-05-08 05:29:22 +00:00
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>
This commit is contained in:
@@ -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)}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user