swig: upgrade 4.2.0 -> 4.2.1

0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch
determinism.patch
refreshed for 4.2.1

Changelog:
============
-Correctly ignore duplicate template instantiation (when the
 duplicate contains typedef'd template parameters).
-Fix segfault shrinking STL containers.
-Fix -Wundef warning about testing the value of __cplusplus when compiling
 SWIG-generated C code.  Warning introduced by a change in SWIG 4.2.0.
-Fix memory leak when getting or setting a PHP attribute which wraps a C++
 member variable.
-Fix for wrapping STL containers that are static member variables or global
 variables (most scripting languages).

(From OE-Core rev: 2f4fb72a3318edcc463f9e9491c7ecc14347c655)

Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Wang Mingyu
2024-02-28 15:32:52 +08:00
committed by Richard Purdie
parent c394463bc7
commit 31aa9a3bff
3 changed files with 8 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
From ab0ab5e685bd9077c44fdca5c1a27b0f477444d7 Mon Sep 17 00:00:00 2001 From b88a98348b3841f0b702e314631883d46f9f362d Mon Sep 17 00:00:00 2001
From: "NODA, Kai" <nodakai@gmail.com> From: "NODA, Kai" <nodakai@gmail.com>
Date: Sun, 22 Apr 2012 17:01:02 +0900 Date: Sun, 22 Apr 2012 17:01:02 +0900
Subject: [PATCH] Use /proc/self/exe for "swig -swiglib" on non-Win32 Subject: [PATCH] Use /proc/self/exe for "swig -swiglib" on non-Win32
@@ -8,13 +8,12 @@ If it wasn't found, then fall back to a fixed string just as before.
Upstream-Status: Submitted Upstream-Status: Submitted
http://sourceforge.net/mailarchive/message.php?msg_id=29179733 http://sourceforge.net/mailarchive/message.php?msg_id=29179733
--- ---
Source/Modules/main.cxx | 24 ++++++++++++++++++++++-- Source/Modules/main.cxx | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-) 1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/Source/Modules/main.cxx b/Source/Modules/main.cxx diff --git a/Source/Modules/main.cxx b/Source/Modules/main.cxx
index 8a44921..8250dee 100644 index 76b4f9d..de0a512 100644
--- a/Source/Modules/main.cxx --- a/Source/Modules/main.cxx
+++ b/Source/Modules/main.cxx +++ b/Source/Modules/main.cxx
@@ -25,6 +25,11 @@ @@ -25,6 +25,11 @@
@@ -29,7 +28,7 @@ index 8a44921..8250dee 100644
// Global variables // Global variables
@@ -886,9 +891,9 @@ int SWIG_main(int argc, char *argv[], const TargetLanguageModule *tlm) { @@ -895,9 +900,9 @@ int SWIG_main(int argc, char *argv[], const TargetLanguageModule *tlm) {
// Check for SWIG_LIB environment variable // Check for SWIG_LIB environment variable
if ((c = getenv("SWIG_LIB")) == (char *) 0) { if ((c = getenv("SWIG_LIB")) == (char *) 0) {
@@ -40,7 +39,7 @@ index 8a44921..8250dee 100644
if (!(GetModuleFileName(0, buf, MAX_PATH) == 0 || (p = strrchr(buf, '\\')) == 0)) { if (!(GetModuleFileName(0, buf, MAX_PATH) == 0 || (p = strrchr(buf, '\\')) == 0)) {
*(p + 1) = '\0'; *(p + 1) = '\0';
SwigLib = NewStringf("%sLib", buf); // Native windows installation path SwigLib = NewStringf("%sLib", buf); // Native windows installation path
@@ -898,7 +903,22 @@ int SWIG_main(int argc, char *argv[], const TargetLanguageModule *tlm) { @@ -907,7 +912,22 @@ int SWIG_main(int argc, char *argv[], const TargetLanguageModule *tlm) {
if (Len(SWIG_LIB_WIN_UNIX) > 0) if (Len(SWIG_LIB_WIN_UNIX) > 0)
SwigLibWinUnix = NewString(SWIG_LIB_WIN_UNIX); // Unix installation path using a drive letter (for msys/mingw) SwigLibWinUnix = NewString(SWIG_LIB_WIN_UNIX); // Unix installation path using a drive letter (for msys/mingw)
#else #else

View File

@@ -1,4 +1,4 @@
From 25bf9893ec1f557781eb241508ea1bec959061fe Mon Sep 17 00:00:00 2001 From 28648b3873d83e26bd19b64ce2c0a41ced9292d3 Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org> From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Mon, 1 Mar 2021 00:11:10 +0000 Date: Mon, 1 Mar 2021 00:11:10 +0000
Subject: [PATCH] swig: Fix reproducibility issue Subject: [PATCH] swig: Fix reproducibility issue
@@ -8,16 +8,15 @@ breaks reproducibilty.
Upstream-Status: Inappropriate [OE reproducibiity fix upstream unlikely to take] Upstream-Status: Inappropriate [OE reproducibiity fix upstream unlikely to take]
RP 2021/3/1 RP 2021/3/1
--- ---
Source/Modules/main.cxx | 1 - Source/Modules/main.cxx | 1 -
1 file changed, 1 deletion(-) 1 file changed, 1 deletion(-)
diff --git a/Source/Modules/main.cxx b/Source/Modules/main.cxx diff --git a/Source/Modules/main.cxx b/Source/Modules/main.cxx
index 8250dee..415761d 100644 index de0a512..ac9e825 100644
--- a/Source/Modules/main.cxx --- a/Source/Modules/main.cxx
+++ b/Source/Modules/main.cxx +++ b/Source/Modules/main.cxx
@@ -629,7 +629,6 @@ static void getoptions(int argc, char *argv[]) { @@ -638,7 +638,6 @@ static void getoptions(int argc, char *argv[]) {
} }
} else if (strcmp(argv[i], "-version") == 0) { } else if (strcmp(argv[i], "-version") == 0) {
fprintf(stdout, "\nSWIG Version %s\n", Swig_package_version()); fprintf(stdout, "\nSWIG Version %s\n", Swig_package_version());

View File

@@ -4,4 +4,4 @@ SRC_URI += "file://0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.pat
file://0001-configure-use-pkg-config-for-pcre-detection.patch \ file://0001-configure-use-pkg-config-for-pcre-detection.patch \
file://determinism.patch \ file://determinism.patch \
" "
SRC_URI[sha256sum] = "261ca2d7589e260762817b912c075831572b72ff2717942f75b3e51244829c97" SRC_URI[sha256sum] = "fa045354e2d048b2cddc69579e4256245d4676894858fcf0bab2290ecf59b7d8"