blob: e62718c508cadf58ccab634e49d5525a1e55ae6a [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001SUMMARY = "SWIG - Simplified Wrapper and Interface Generator"
Brad Bishopf3f93bb2019-10-16 14:33:32 -04002DESCRIPTION = "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#."
Patrick Williamsc124f4f2015-09-15 14:41:29 -05005HOMEPAGE = "http://swig.sourceforge.net/"
6LICENSE = "BSD & GPLv3"
7LIC_FILES_CHKSUM = "file://LICENSE;md5=e7807a6282784a7dde4c846626b08fc6 \
8 file://LICENSE-GPL;md5=d32239bcb673463ab874e80d47fae504 \
9 file://LICENSE-UNIVERSITIES;md5=8ce9dcc8f7c994de4a408b205c72ba08"
10
11SECTION = "devel"
12
Brad Bishop19323692019-04-05 15:28:33 -040013DEPENDS = "libpcre bison-native"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050014
15SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
16
Brad Bishop316dfdd2018-06-25 12:45:53 -040017inherit autotools python3native pkgconfig
Patrick Williamsc124f4f2015-09-15 14:41:29 -050018
19EXTRA_OECONF = " \
Patrick Williamsc0f7c042017-02-23 20:41:17 -060020 --with-python3=${PYTHON} \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050021 --without-allegrocl \
22 --without-android \
23 --without-boost \
24 --without-chicken \
25 --without-clisp \
26 --without-csharp \
27 --without-d \
28 --without-gcj \
29 --without-go \
30 --without-guile \
31 --without-java \
32 --without-lua \
33 --without-mzscheme \
34 --without-ocaml \
35 --without-octave \
36 --without-perl5 \
37 --without-pike \
38 --without-php \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050039 --without-r \
40 --without-ruby \
41 --without-tcl \
42"
43
Brad Bishop19323692019-04-05 15:28:33 -040044EXTRA_AUTORECONF += "-I Tools/config"
45
Patrick Williamsc124f4f2015-09-15 14:41:29 -050046BBCLASSEXTEND = "native nativesdk"
47
Brad Bishop19323692019-04-05 15:28:33 -040048# necessary together with bison dependency until a new upstream version after
49# 3.0.12 includes 0001-Fix-generated-code-for-constant-expressions-containi.patch
50do_configure_append() {
51 mkdir -p ${B}/Source/CParse
Patrick Williamsc124f4f2015-09-15 14:41:29 -050052}
53
54do_install_append_class-nativesdk() {
55 cd ${D}${bindir}
56 ln -s swig swig2.0
57}
58
59def swiglib_relpath(d):
Brad Bishop6e60e8b2018-02-01 10:27:11 -050060 swiglib = d.getVar('datadir') + "/" + d.getVar('BPN') + "/" + d.getVar('PV')
61 return os.path.relpath(swiglib, d.getVar('bindir'))
Patrick Williamsc124f4f2015-09-15 14:41:29 -050062
63do_install_append_class-native() {
64 create_wrapper ${D}${bindir}/swig SWIG_LIB='`dirname $''realpath`'/${@swiglib_relpath(d)}
65}