diff options
Diffstat (limited to 'meta/recipes-devtools/swig/swig')
3 files changed, 26 insertions, 133 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 deleted file mode 100644 index 81df3e264f..0000000000 --- a/meta/recipes-devtools/swig/swig/0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch +++ /dev/null @@ -1,69 +0,0 @@ -From a4a0440a644c6c5e5da096efe3cf05ba309a284f Mon Sep 17 00:00:00 2001 -From: "NODA, Kai" <nodakai@gmail.com> -Date: Sun, 22 Apr 2012 17:01:02 +0900 -Subject: [PATCH] Use /proc/self/exe for "swig -swiglib" on non-Win32 - platforms. - -If it wasn't found, then fall back to a fixed string just as before. - -Upstream-Status: Submitted -http://sourceforge.net/mailarchive/message.php?msg_id=29179733 - ---- - Source/Modules/main.cxx | 24 ++++++++++++++++++++++-- - 1 file changed, 22 insertions(+), 2 deletions(-) - -diff --git a/Source/Modules/main.cxx b/Source/Modules/main.cxx -index d2f5d3b..cbb0a12 100644 ---- a/Source/Modules/main.cxx -+++ b/Source/Modules/main.cxx -@@ -26,6 +26,11 @@ char cvsroot_main_cxx[] = "$Id$"; - #include "cparse.h" - #include <ctype.h> - #include <limits.h> // for INT_MAX -+#ifndef _WIN32 -+#include <cstddef> -+#include <unistd.h> // for readlink -+#include <sys/stat.h> // for stat -+#endif - - // Global variables - -@@ -902,9 +907,9 @@ int SWIG_main(int argc, char *argv[], Language *l) { - - // Check for SWIG_LIB environment variable - if ((c = getenv("SWIG_LIB")) == (char *) 0) { -+ char *p; - #if defined(_WIN32) - char buf[MAX_PATH]; -- char *p; - if (!(GetModuleFileName(0, buf, MAX_PATH) == 0 || (p = strrchr(buf, '\\')) == 0)) { - *(p + 1) = '\0'; - SwigLib = NewStringf("%sLib", buf); // Native windows installation path -@@ -914,7 +919,22 @@ int SWIG_main(int argc, char *argv[], Language *l) { - if (Len(SWIG_LIB_WIN_UNIX) > 0) - SwigLibWinUnix = NewString(SWIG_LIB_WIN_UNIX); // Unix installation path using a drive letter (for msys/mingw) - #else -- SwigLib = NewString(SWIG_LIB); -+ char buf[PATH_MAX]; -+ if (0 < ::readlink("/proc/self/exe", buf, sizeof(buf)) && -+ (p = ::strstr(buf, "/bin/swig"))) { -+ int major, minor, patch; -+ const int ret = ::sscanf(VERSION, "%d.%d.%d", &major, &minor, &patch); -+ if (3 == ret) { -+ const ::ptrdiff_t dir_part_len = p - buf; -+ ::snprintf(p, PATH_MAX - dir_part_len, "/share/swig/%d.%d.%d", major, minor, patch); -+ struct ::stat stat_res; -+ if (0 == ::stat(buf, &stat_res) && S_ISDIR(stat_res.st_mode)) { -+ SwigLib = NewString(buf); -+ } -+ } -+ } -+ if (NULL == SwigLib) -+ SwigLib = NewString(SWIG_LIB); - #endif - } else { - SwigLib = NewString(c); --- -1.7.9.5 - 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 deleted file mode 100644 index 1b1128acab..0000000000 --- a/meta/recipes-devtools/swig/swig/0001-configure-use-pkg-config-for-pcre-detection.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 5c4d6d8538994d5fe9b3b46bfafaf0a605e3bda6 Mon Sep 17 00:00:00 2001 -From: Koen Kooi <koen.kooi@linaro.org> -Date: Tue, 17 Jun 2014 08:18:17 +0200 -Subject: [PATCH] configure: use pkg-config for pcre detection - -Signed-off-by: Koen Kooi <koen.kooi@linaro.org> -Upstream-Status: pending ---- - configure.ac | 38 +++++++------------------------------- - 1 file changed, 7 insertions(+), 31 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 0c984b7..6edcec1 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -70,38 +70,14 @@ AC_MSG_RESULT([$with_pcre]) - - dnl To make configuring easier, check for a locally built PCRE using the Tools/pcre-build.sh script - if test x"${with_pcre}" = xyes ; then -- AC_MSG_CHECKING([whether to use local PCRE]) -- local_pcre_config=no -- if test -z $PCRE_CONFIG; then -- if test -f `pwd`/pcre/pcre-swig-install/bin/pcre-config; then -- PCRE_CONFIG=`pwd`/pcre/pcre-swig-install/bin/pcre-config -- local_pcre_config=$PCRE_CONFIG -- fi -- fi -- AC_MSG_RESULT([$local_pcre_config]) --fi --AS_IF([test "x$with_pcre" != xno], -- [AX_PATH_GENERIC([pcre], -- [], dnl Minimal version of PCRE we need -- accept any -- [], dnl custom sed script for version parsing is not needed -- [AC_DEFINE([HAVE_PCRE], [1], [Define if you have PCRE library]) -- LIBS="$LIBS $PCRE_LIBS" -- CPPFLAGS="$CPPFLAGS $PCRE_CFLAGS" -- ], -- [AC_MSG_FAILURE([ -- Cannot find pcre-config script from PCRE (Perl Compatible Regular Expressions) -- library package. This dependency is needed for configure to complete, -- Either: -- - Install the PCRE developer package on your system (preferred approach). -- - Download the PCRE source tarball, build and install on your system -- as you would for any package built from source distribution. -- - Use the Tools/pcre-build.sh script to build PCRE just for SWIG to statically -- link against. Run 'Tools/pcre-build.sh --help' for instructions. -- (quite easy and does not require privileges to install PCRE on your system) -- - Use configure --without-pcre to disable regular expressions support in SWIG -- (not recommended).]) -- ]) -+ PKG_CHECK_MODULES([PCRE], [libpcre], [ -+ AC_DEFINE([HAVE_PCRE], [1], [Define if you have PCRE library]) -+ LIBS="$LIBS $PCRE_LIBS" -+ CPPFLAGS="$CPPFLAGS $PCRE_CFLAGS" -+ ], [ -+ AC_MSG_WARN([$PCRE_PKG_ERRORS]) - ]) -+fi - - - dnl CCache --- -1.9.3 - diff --git a/meta/recipes-devtools/swig/swig/determinism.patch b/meta/recipes-devtools/swig/swig/determinism.patch new file mode 100644 index 0000000000..9c49414ad7 --- /dev/null +++ b/meta/recipes-devtools/swig/swig/determinism.patch @@ -0,0 +1,26 @@ +From 28648b3873d83e26bd19b64ce2c0a41ced9292d3 Mon Sep 17 00:00:00 2001 +From: Richard Purdie <richard.purdie@linuxfoundation.org> +Date: Mon, 1 Mar 2021 00:11:10 +0000 +Subject: [PATCH] swig: Fix reproducibility issue + +Remove the compiler commandline/platform from the compiled binary as this +breaks reproducibilty. + +Upstream-Status: Inappropriate [OE reproducibiity fix upstream unlikely to take] +RP 2021/3/1 +--- + Source/Modules/main.cxx | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/Source/Modules/main.cxx b/Source/Modules/main.cxx +index de0a512..ac9e825 100644 +--- a/Source/Modules/main.cxx ++++ b/Source/Modules/main.cxx +@@ -638,7 +638,6 @@ static void getoptions(int argc, char *argv[]) { + } + } else if (strcmp(argv[i], "-version") == 0) { + fprintf(stdout, "\nSWIG Version %s\n", Swig_package_version()); +- fprintf(stdout, "\nCompiled with %s [%s]\n", SWIG_CXX, SWIG_PLATFORM); + fprintf(stdout, "\nConfigured options: %cpcre\n", + #ifdef HAVE_PCRE + '+' |