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