diff options
author | Wenzong Fan <wenzong.fan@windriver.com> | 2015-08-21 01:38:58 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-24 23:47:05 +0100 |
commit | 20c6c72ad37df8c2bac118c93705874870dff6b3 (patch) | |
tree | afbe5a2f35b8e7f3e03f4dde6d603b5ae05ba3c1 /meta/recipes-devtools/swig/swig | |
parent | 6b0768e4384967bad1f58e4c9c5c161abc22dba7 (diff) | |
download | poky-20c6c72ad37df8c2bac118c93705874870dff6b3.tar.gz |
swig: add package 3.0.6
Ackage from meta-oe to oe-core:
meta-oe commit: 9cc54e10efa5ca70d9980f833a8e5a310e5ad21d
It's required for libcap-ng to build python bindings.
With adding it to oe-core, the copies from following layers could
be removed:
* meta-oe, meta-selinux, meta-intel-iot-middleware ...
(From OE-Core rev: 66923c6776da13bd4513a73c3f7c5e60d74eb0f3)
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/swig/swig')
2 files changed, 133 insertions, 0 deletions
diff --git a/meta/recipes-devtools/swig/swig/0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch b/meta/recipes-devtools/swig/swig/0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch new file mode 100644 index 0000000000..81df3e264f --- /dev/null +++ b/meta/recipes-devtools/swig/swig/0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch | |||
@@ -0,0 +1,69 @@ | |||
1 | From a4a0440a644c6c5e5da096efe3cf05ba309a284f Mon Sep 17 00:00:00 2001 | ||
2 | From: "NODA, Kai" <nodakai@gmail.com> | ||
3 | Date: Sun, 22 Apr 2012 17:01:02 +0900 | ||
4 | Subject: [PATCH] Use /proc/self/exe for "swig -swiglib" on non-Win32 | ||
5 | platforms. | ||
6 | |||
7 | If it wasn't found, then fall back to a fixed string just as before. | ||
8 | |||
9 | Upstream-Status: Submitted | ||
10 | http://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 | |||
16 | diff --git a/Source/Modules/main.cxx b/Source/Modules/main.cxx | ||
17 | index 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 | -- | ||
68 | 1.7.9.5 | ||
69 | |||
diff --git a/meta/recipes-devtools/swig/swig/0001-configure-use-pkg-config-for-pcre-detection.patch b/meta/recipes-devtools/swig/swig/0001-configure-use-pkg-config-for-pcre-detection.patch new file mode 100644 index 0000000000..1b1128acab --- /dev/null +++ b/meta/recipes-devtools/swig/swig/0001-configure-use-pkg-config-for-pcre-detection.patch | |||
@@ -0,0 +1,64 @@ | |||
1 | From 5c4d6d8538994d5fe9b3b46bfafaf0a605e3bda6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen.kooi@linaro.org> | ||
3 | Date: Tue, 17 Jun 2014 08:18:17 +0200 | ||
4 | Subject: [PATCH] configure: use pkg-config for pcre detection | ||
5 | |||
6 | Signed-off-by: Koen Kooi <koen.kooi@linaro.org> | ||
7 | Upstream-Status: pending | ||
8 | --- | ||
9 | configure.ac | 38 +++++++------------------------------- | ||
10 | 1 file changed, 7 insertions(+), 31 deletions(-) | ||
11 | |||
12 | diff --git a/configure.ac b/configure.ac | ||
13 | index 0c984b7..6edcec1 100644 | ||
14 | --- a/configure.ac | ||
15 | +++ b/configure.ac | ||
16 | @@ -70,38 +70,14 @@ AC_MSG_RESULT([$with_pcre]) | ||
17 | |||
18 | dnl To make configuring easier, check for a locally built PCRE using the Tools/pcre-build.sh script | ||
19 | if test x"${with_pcre}" = xyes ; then | ||
20 | - AC_MSG_CHECKING([whether to use local PCRE]) | ||
21 | - local_pcre_config=no | ||
22 | - if test -z $PCRE_CONFIG; then | ||
23 | - if test -f `pwd`/pcre/pcre-swig-install/bin/pcre-config; then | ||
24 | - PCRE_CONFIG=`pwd`/pcre/pcre-swig-install/bin/pcre-config | ||
25 | - local_pcre_config=$PCRE_CONFIG | ||
26 | - fi | ||
27 | - fi | ||
28 | - AC_MSG_RESULT([$local_pcre_config]) | ||
29 | -fi | ||
30 | -AS_IF([test "x$with_pcre" != xno], | ||
31 | - [AX_PATH_GENERIC([pcre], | ||
32 | - [], dnl Minimal version of PCRE we need -- accept any | ||
33 | - [], dnl custom sed script for version parsing is not needed | ||
34 | - [AC_DEFINE([HAVE_PCRE], [1], [Define if you have PCRE library]) | ||
35 | - LIBS="$LIBS $PCRE_LIBS" | ||
36 | - CPPFLAGS="$CPPFLAGS $PCRE_CFLAGS" | ||
37 | - ], | ||
38 | - [AC_MSG_FAILURE([ | ||
39 | - Cannot find pcre-config script from PCRE (Perl Compatible Regular Expressions) | ||
40 | - library package. This dependency is needed for configure to complete, | ||
41 | - Either: | ||
42 | - - Install the PCRE developer package on your system (preferred approach). | ||
43 | - - Download the PCRE source tarball, build and install on your system | ||
44 | - as you would for any package built from source distribution. | ||
45 | - - Use the Tools/pcre-build.sh script to build PCRE just for SWIG to statically | ||
46 | - link against. Run 'Tools/pcre-build.sh --help' for instructions. | ||
47 | - (quite easy and does not require privileges to install PCRE on your system) | ||
48 | - - Use configure --without-pcre to disable regular expressions support in SWIG | ||
49 | - (not recommended).]) | ||
50 | - ]) | ||
51 | + PKG_CHECK_MODULES([PCRE], [libpcre], [ | ||
52 | + AC_DEFINE([HAVE_PCRE], [1], [Define if you have PCRE library]) | ||
53 | + LIBS="$LIBS $PCRE_LIBS" | ||
54 | + CPPFLAGS="$CPPFLAGS $PCRE_CFLAGS" | ||
55 | + ], [ | ||
56 | + AC_MSG_WARN([$PCRE_PKG_ERRORS]) | ||
57 | ]) | ||
58 | +fi | ||
59 | |||
60 | |||
61 | dnl CCache | ||
62 | -- | ||
63 | 1.9.3 | ||
64 | |||