1SUMMARY = "SWIG - Simplified Wrapper and Interface Generator" 2DESCRIPTION = "SWIG is a compiler that makes it easy to integrate C and C++ \ 3code with other languages including Perl, Tcl, Ruby, Python, Java, Guile, \ 4Mzscheme, Chicken, OCaml, Pike, and C#." 5HOMEPAGE = "http://swig.sourceforge.net/" 6LICENSE = "BSD-3-Clause & GPL-3.0-only" 7LIC_FILES_CHKSUM = "file://LICENSE;md5=e7807a6282784a7dde4c846626b08fc6 \ 8 file://LICENSE-GPL;md5=d32239bcb673463ab874e80d47fae504 \ 9 file://LICENSE-UNIVERSITIES;md5=8ce9dcc8f7c994de4a408b205c72ba08" 10 11SECTION = "devel" 12 13DEPENDS = "libpcre bison-native" 14 15SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz" 16UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/swig/files/swig/" 17UPSTREAM_CHECK_REGEX = "swig-(?P<pver>\d+(\.\d+)+)" 18 19inherit autotools python3native pkgconfig 20 21EXTRA_OECONF = " \ 22 --with-python3=${PYTHON} \ 23 --without-allegrocl \ 24 --without-android \ 25 --without-boost \ 26 --without-chicken \ 27 --without-clisp \ 28 --without-csharp \ 29 --without-d \ 30 --without-gcj \ 31 --without-go \ 32 --without-guile \ 33 --without-java \ 34 --without-lua \ 35 --without-mzscheme \ 36 --without-ocaml \ 37 --without-octave \ 38 --without-perl5 \ 39 --without-pike \ 40 --without-php \ 41 --without-r \ 42 --without-ruby \ 43 --without-tcl \ 44" 45 46EXTRA_AUTORECONF += "-I Tools/config" 47 48BBCLASSEXTEND = "native nativesdk" 49 50# necessary together with bison dependency until a new upstream version after 51# 3.0.12 includes 0001-Fix-generated-code-for-constant-expressions-containi.patch 52do_configure:append() { 53 mkdir -p ${B}/Source/CParse 54} 55 56do_install:append:class-nativesdk() { 57 cd ${D}${bindir} 58 ln -s swig swig2.0 59} 60 61def swiglib_relpath(d): 62 swiglib = d.getVar('datadir') + "/" + d.getVar('BPN') + "/" + d.getVar('PV') 63 return os.path.relpath(swiglib, d.getVar('bindir')) 64 65do_install:append:class-native() { 66 create_wrapper ${D}${bindir}/swig SWIG_LIB='`dirname $''realpath`'/${@swiglib_relpath(d)} 67} 68