summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2013-09-17 14:43:41 -0500
committerJoe MacDonald <joe@deserted.net>2013-10-02 13:24:45 -0400
commit2ed614a15330b40a8440f91193a78535f857c7f9 (patch)
tree8aa6367998a653d224ee2b1406fa287525f91e15
parent407e6a7fe09ab4e433a4c28f6a940978ea517a2e (diff)
downloadmeta-selinux-2ed614a15330b40a8440f91193a78535f857c7f9.tar.gz
swig: Update to latest swig from meta-openembedded
Updated from: git://git.openembedded.org/meta-openembedded/meta-oe/recipes-devtools/swig As of commit 1d536390dcafe4d539335dec2173aa9ddc3d8b51 Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Joe MacDonald <joe@deserted.net>
-rw-r--r--recipes-devtools/swig/swig.inc46
-rw-r--r--recipes-devtools/swig/swig/0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch69
-rw-r--r--recipes-devtools/swig/swig_2.0.0.bb7
-rw-r--r--recipes-devtools/swig/swig_2.0.10.bb9
4 files changed, 115 insertions, 16 deletions
diff --git a/recipes-devtools/swig/swig.inc b/recipes-devtools/swig/swig.inc
index 833c767..74ce506 100644
--- a/recipes-devtools/swig/swig.inc
+++ b/recipes-devtools/swig/swig.inc
@@ -3,23 +3,51 @@ HOMEPAGE = "http://swig.sourceforge.net/"
3LICENSE = "BSD & GPLv3" 3LICENSE = "BSD & GPLv3"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=e7807a6282784a7dde4c846626b08fc6 \ 4LIC_FILES_CHKSUM = "file://LICENSE;md5=e7807a6282784a7dde4c846626b08fc6 \
5 file://LICENSE-GPL;md5=d32239bcb673463ab874e80d47fae504 \ 5 file://LICENSE-GPL;md5=d32239bcb673463ab874e80d47fae504 \
6 file://LICENSE-UNIVERSITIES;md5=e0eaeeef7b2662c0c2d0d3c0b2509f75" 6 file://LICENSE-UNIVERSITIES;md5=8ce9dcc8f7c994de4a408b205c72ba08"
7 7
8SECTION = "devel" 8SECTION = "devel"
9INC_PR = "r2" 9INC_PR = "r3"
10 10
11DEPENDS = "python" 11DEPENDS = "libpcre python"
12 12
13SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz" 13SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
14 14
15inherit autotools 15inherit autotools pythonnative
16 16
17EXTRA_OECONF = " --without-guile " 17EXTRA_OECONF = " \
18 18 --with-python=${PYTHON} \
19BBCLASSEXTEND = "native" 19 --without-allegrocl \
20 --without-android \
21 --without-boost \
22 --without-chicken \
23 --without-clisp \
24 --without-csharp \
25 --without-d \
26 --without-gcj \
27 --without-go \
28 --without-guile \
29 --without-java \
30 --without-lua \
31 --without-mzscheme \
32 --without-ocaml \
33 --without-octave \
34 --without-perl5 \
35 --without-pike \
36 --without-php \
37 --without-python3 \
38 --without-r \
39 --without-ruby \
40 --without-tcl \
41"
42
43BBCLASSEXTEND = "native nativesdk"
20 44
21do_configure() { 45do_configure() {
22 oe_runconf 46 install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}/Tools/config
47 install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}/Tools/config
48 install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S}
49 install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S}
50 oe_runconf
23} 51}
24 52
25def swiglib_relpath(d): 53def swiglib_relpath(d):
diff --git a/recipes-devtools/swig/swig/0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch b/recipes-devtools/swig/swig/0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch
new file mode 100644
index 0000000..81df3e2
--- /dev/null
+++ b/recipes-devtools/swig/swig/0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch
@@ -0,0 +1,69 @@
1From a4a0440a644c6c5e5da096efe3cf05ba309a284f Mon Sep 17 00:00:00 2001
2From: "NODA, Kai" <nodakai@gmail.com>
3Date: Sun, 22 Apr 2012 17:01:02 +0900
4Subject: [PATCH] Use /proc/self/exe for "swig -swiglib" on non-Win32
5 platforms.
6
7If it wasn't found, then fall back to a fixed string just as before.
8
9Upstream-Status: Submitted
10http://sourceforge.net/mailarchive/message.php?msg_id=29179733
11
12---
13 Source/Modules/main.cxx | 24 ++++++++++++++++++++++--
14 1 file changed, 22 insertions(+), 2 deletions(-)
15
16diff --git a/Source/Modules/main.cxx b/Source/Modules/main.cxx
17index d2f5d3b..cbb0a12 100644
18--- a/Source/Modules/main.cxx
19+++ b/Source/Modules/main.cxx
20@@ -26,6 +26,11 @@ char cvsroot_main_cxx[] = "$Id$";
21 #include "cparse.h"
22 #include <ctype.h>
23 #include <limits.h> // for INT_MAX
24+#ifndef _WIN32
25+#include <cstddef>
26+#include <unistd.h> // for readlink
27+#include <sys/stat.h> // for stat
28+#endif
29
30 // Global variables
31
32@@ -902,9 +907,9 @@ int SWIG_main(int argc, char *argv[], Language *l) {
33
34 // Check for SWIG_LIB environment variable
35 if ((c = getenv("SWIG_LIB")) == (char *) 0) {
36+ char *p;
37 #if defined(_WIN32)
38 char buf[MAX_PATH];
39- char *p;
40 if (!(GetModuleFileName(0, buf, MAX_PATH) == 0 || (p = strrchr(buf, '\\')) == 0)) {
41 *(p + 1) = '\0';
42 SwigLib = NewStringf("%sLib", buf); // Native windows installation path
43@@ -914,7 +919,22 @@ int SWIG_main(int argc, char *argv[], Language *l) {
44 if (Len(SWIG_LIB_WIN_UNIX) > 0)
45 SwigLibWinUnix = NewString(SWIG_LIB_WIN_UNIX); // Unix installation path using a drive letter (for msys/mingw)
46 #else
47- SwigLib = NewString(SWIG_LIB);
48+ char buf[PATH_MAX];
49+ if (0 < ::readlink("/proc/self/exe", buf, sizeof(buf)) &&
50+ (p = ::strstr(buf, "/bin/swig"))) {
51+ int major, minor, patch;
52+ const int ret = ::sscanf(VERSION, "%d.%d.%d", &major, &minor, &patch);
53+ if (3 == ret) {
54+ const ::ptrdiff_t dir_part_len = p - buf;
55+ ::snprintf(p, PATH_MAX - dir_part_len, "/share/swig/%d.%d.%d", major, minor, patch);
56+ struct ::stat stat_res;
57+ if (0 == ::stat(buf, &stat_res) && S_ISDIR(stat_res.st_mode)) {
58+ SwigLib = NewString(buf);
59+ }
60+ }
61+ }
62+ if (NULL == SwigLib)
63+ SwigLib = NewString(SWIG_LIB);
64 #endif
65 } else {
66 SwigLib = NewString(c);
67--
681.7.9.5
69
diff --git a/recipes-devtools/swig/swig_2.0.0.bb b/recipes-devtools/swig/swig_2.0.0.bb
deleted file mode 100644
index b443def..0000000
--- a/recipes-devtools/swig/swig_2.0.0.bb
+++ /dev/null
@@ -1,7 +0,0 @@
1require swig.inc
2
3PR = "${INC_PR}.0"
4
5SRC_URI[md5sum] = "36ee2d9974be46a9f0a36460af928eb9"
6SRC_URI[sha256sum] = "2568d042d3c7cfbcb17e2471b0434bd3aa78d7a1829f9ef6f1b9fc522e4754ea"
7
diff --git a/recipes-devtools/swig/swig_2.0.10.bb b/recipes-devtools/swig/swig_2.0.10.bb
new file mode 100644
index 0000000..312ce11
--- /dev/null
+++ b/recipes-devtools/swig/swig_2.0.10.bb
@@ -0,0 +1,9 @@
1require ${BPN}.inc
2
3PR = "${INC_PR}.0"
4
5SRC_URI += "file://0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch"
6
7SRC_URI[md5sum] = "6d5e7ad05b4a404e5e85db9befb70c9a"
8SRC_URI[sha256sum] = "d1eef329e867124ce60838b5ad07c763146b6c8f250dd22a861ead7406f78e63"
9