Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | SUMMARY = "SWIG - Simplified Wrapper and Interface Generator" |
Brad Bishop | f3f93bb | 2019-10-16 14:33:32 -0400 | [diff] [blame] | 2 | DESCRIPTION = "SWIG is a compiler that makes it easy to integrate C and C++ \ |
| 3 | code with other languages including Perl, Tcl, Ruby, Python, Java, Guile, \ |
| 4 | Mzscheme, Chicken, OCaml, Pike, and C#." |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 5 | HOMEPAGE = "http://swig.sourceforge.net/" |
| 6 | LICENSE = "BSD & GPLv3" |
| 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e7807a6282784a7dde4c846626b08fc6 \ |
| 8 | file://LICENSE-GPL;md5=d32239bcb673463ab874e80d47fae504 \ |
| 9 | file://LICENSE-UNIVERSITIES;md5=8ce9dcc8f7c994de4a408b205c72ba08" |
| 10 | |
| 11 | SECTION = "devel" |
| 12 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 13 | DEPENDS = "libpcre bison-native" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 14 | |
| 15 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz" |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 16 | UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/swig/files/swig/" |
| 17 | UPSTREAM_CHECK_REGEX = "swig-(?P<pver>\d+(\.\d+)+)" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 18 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 19 | inherit autotools python3native pkgconfig |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 20 | |
| 21 | EXTRA_OECONF = " \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 22 | --with-python3=${PYTHON} \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 41 | --without-r \ |
| 42 | --without-ruby \ |
| 43 | --without-tcl \ |
| 44 | " |
| 45 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 46 | EXTRA_AUTORECONF += "-I Tools/config" |
| 47 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 48 | BBCLASSEXTEND = "native nativesdk" |
| 49 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 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 |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 52 | do_configure:append() { |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 53 | mkdir -p ${B}/Source/CParse |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 54 | } |
| 55 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 56 | do_install:append:class-nativesdk() { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 57 | cd ${D}${bindir} |
| 58 | ln -s swig swig2.0 |
| 59 | } |
| 60 | |
| 61 | def swiglib_relpath(d): |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 62 | swiglib = d.getVar('datadir') + "/" + d.getVar('BPN') + "/" + d.getVar('PV') |
| 63 | return os.path.relpath(swiglib, d.getVar('bindir')) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 64 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 65 | do_install:append:class-native() { |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 66 | create_wrapper ${D}${bindir}/swig SWIG_LIB='`dirname $''realpath`'/${@swiglib_relpath(d)} |
| 67 | } |