diff options
Diffstat (limited to 'meta/recipes-devtools/swig/swig_4.2.1.bb')
-rw-r--r-- | meta/recipes-devtools/swig/swig_4.2.1.bb | 44 |
1 files changed, 41 insertions, 3 deletions
diff --git a/meta/recipes-devtools/swig/swig_4.2.1.bb b/meta/recipes-devtools/swig/swig_4.2.1.bb index 4b438a7298..b564be9b36 100644 --- a/meta/recipes-devtools/swig/swig_4.2.1.bb +++ b/meta/recipes-devtools/swig/swig_4.2.1.bb | |||
@@ -1,7 +1,45 @@ | |||
1 | require ${BPN}.inc | 1 | SUMMARY = "SWIG - Simplified Wrapper and Interface Generator" |
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#." | ||
5 | HOMEPAGE = "http://swig.sourceforge.net/" | ||
6 | LICENSE = "BSD-3-Clause & GPL-3.0-only" | ||
7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e7807a6282784a7dde4c846626b08fc6 \ | ||
8 | file://LICENSE-GPL;md5=d32239bcb673463ab874e80d47fae504 \ | ||
9 | file://LICENSE-UNIVERSITIES;md5=8ce9dcc8f7c994de4a408b205c72ba08" | ||
2 | 10 | ||
3 | SRC_URI += "file://0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch \ | 11 | SECTION = "devel" |
4 | file://0001-configure-use-pkg-config-for-pcre-detection.patch \ | 12 | |
13 | DEPENDS = "libpcre2 bison-native" | ||
14 | |||
15 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \ | ||
5 | file://determinism.patch \ | 16 | file://determinism.patch \ |
6 | " | 17 | " |
7 | SRC_URI[sha256sum] = "fa045354e2d048b2cddc69579e4256245d4676894858fcf0bab2290ecf59b7d8" | 18 | SRC_URI[sha256sum] = "fa045354e2d048b2cddc69579e4256245d4676894858fcf0bab2290ecf59b7d8" |
19 | UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/swig/files/swig/" | ||
20 | UPSTREAM_CHECK_REGEX = "swig-(?P<pver>\d+(\.\d+)+)" | ||
21 | |||
22 | inherit cmake pkgconfig | ||
23 | |||
24 | BBCLASSEXTEND = "native nativesdk" | ||
25 | |||
26 | do_install:append:class-nativesdk() { | ||
27 | cd ${D}${bindir} | ||
28 | ln -s swig swig2.0 | ||
29 | } | ||
30 | |||
31 | def swiglib_relpath(d): | ||
32 | swiglib = d.getVar('datadir') + "/" + d.getVar('BPN') + "/" + d.getVar('PV') | ||
33 | return os.path.relpath(swiglib, d.getVar('bindir')) | ||
34 | |||
35 | do_install:append:class-native() { | ||
36 | create_wrapper ${D}${bindir}/swig SWIG_LIB='`dirname $''realpath`'/${@swiglib_relpath(d)} | ||
37 | } | ||
38 | |||
39 | PACKAGE_PREPROCESS_FUNCS += "src_package_preprocess" | ||
40 | src_package_preprocess () { | ||
41 | # Trim build paths from comments and defines in generated sources to ensure reproducibility | ||
42 | sed -i -e "s,${WORKDIR},,g" \ | ||
43 | -e "s,YY_YY_.*_CPARSE_PARSER_H_INCLUDED,YY_YY_CPARSE_PARSER_H_INCLUDED,g" \ | ||
44 | ${B}/Source/CParse/parser.* | ||
45 | } | ||