From b6398419fa00b53f8e437f6e125c34ecfc0fc34752c308dadaa1ac8ef9d565c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= Date: Sat, 23 May 2020 11:42:21 +0000 Subject: [PATCH 1/3] Accepting request 808351 from home:Andreas_Schwab:Factory - Revert last change - ruby-std-wstring-byte-order.patch: fix wstring encoding OBS-URL: https://build.opensuse.org/request/show/808351 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/swig?expand=0&rev=120 --- 0005-disable_li_std_wstring.patch | 25 ------------------------- ruby-std-wstring-byte-order.patch | 29 +++++++++++++++++++++++++++++ swig.changes | 6 ++++++ swig.spec | 13 +------------ 4 files changed, 36 insertions(+), 37 deletions(-) delete mode 100644 0005-disable_li_std_wstring.patch create mode 100644 ruby-std-wstring-byte-order.patch diff --git a/0005-disable_li_std_wstring.patch b/0005-disable_li_std_wstring.patch deleted file mode 100644 index 85e6e18..0000000 --- a/0005-disable_li_std_wstring.patch +++ /dev/null @@ -1,25 +0,0 @@ -From: Michel Normand -Subject: 0005 disable li_std_wstring -Date: Mon, 18 May 2020 17:05:27 +0200 - -disable li_std_wstring to avoid test failure -for BE (ppc64 & s390x) as per bug -https://bugzilla.opensuse.org/show_bug.cgi?id=1171368 - -Signed-off-by: Michel Normand ---- - Examples/test-suite/common.mk | 1 - - 1 file changed, 1 deletion(-) - -Index: swig-rel-4.0.1/Examples/test-suite/common.mk -=================================================================== ---- swig-rel-4.0.1.orig/Examples/test-suite/common.mk -+++ swig-rel-4.0.1/Examples/test-suite/common.mk -@@ -657,7 +657,6 @@ CPP_STD_TEST_CASES += \ - li_std_vector_enum \ - li_std_vector_member_var\ - li_std_vector_ptr \ -- li_std_wstring \ - smart_pointer_inherit \ - template_typedef_fnc \ - template_type_namespace \ diff --git a/ruby-std-wstring-byte-order.patch b/ruby-std-wstring-byte-order.patch new file mode 100644 index 0000000..8cbb036 --- /dev/null +++ b/ruby-std-wstring-byte-order.patch @@ -0,0 +1,29 @@ +Index: swig-rel-4.0.1/Lib/ruby/std_wstring.i +=================================================================== +--- swig-rel-4.0.1.orig/Lib/ruby/std_wstring.i ++++ swig-rel-4.0.1/Lib/ruby/std_wstring.i +@@ -1,4 +1,6 @@ + %{ ++#include ++ + #ifdef __cplusplus + extern "C" { + #endif +@@ -15,9 +17,17 @@ extern "C" { + #ifndef SWIG_RUBY_WSTRING_ENCODING + + #if WCHAR_MAX == 0x7fff || WCHAR_MAX == 0xffff ++#if BYTE_ORDER == LITTLE_ENDIAN + #define SWIG_RUBY_WSTRING_ENCODING "UTF-16LE" ++#elif BYTE_ORDER == BIG_ENDIAN ++#define SWIG_RUBY_WSTRING_ENCODING "UTF-16BE" ++#endif + #elif WCHAR_MAX == 0x7fffffff || WCHAR_MAX == 0xffffffff ++#if BYTE_ORDER == LITTLE_ENDIAN + #define SWIG_RUBY_WSTRING_ENCODING "UTF-32LE" ++#elif BYTE_ORDER == BIG_ENDIAN ++#define SWIG_RUBY_WSTRING_ENCODING "UTF-32BE" ++#endif + #else + #error unsupported wchar_t size. SWIG_RUBY_WSTRING_ENCODING must be given. + #endif diff --git a/swig.changes b/swig.changes index 20ed9f1..d02ce11 100644 --- a/swig.changes +++ b/swig.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat May 23 07:04:09 UTC 2020 - Andreas Schwab + +- Revert last change +- ruby-std-wstring-byte-order.patch: fix wstring encoding + ------------------------------------------------------------------- Mon May 18 15:46:46 UTC 2020 - Michel Normand diff --git a/swig.spec b/swig.spec index 51b191e..77114c9 100644 --- a/swig.spec +++ b/swig.spec @@ -42,8 +42,8 @@ Patch1: 0001-Fix-code-generated-for-Ruby-global-variables.patch Patch2: 0002-Add-support-for-Ruby-2.7.patch Patch3: 0003-Move-new-macros-for-Ruby-to-their-dedicated-namespac.patch Patch4: 0004-Improve-description-of-cast-macros-for-Ruby.patch -Patch5: 0005-disable_li_std_wstring.patch +Patch300: ruby-std-wstring-byte-order.patch Patch308: swig308-isfinite.diff BuildRequires: autoconf @@ -120,18 +120,7 @@ understandig SWIG usage. %prep %setup -q -n %{name}-rel-%{version} -# for BE (Big Endian) do all patch (with 0005-disable_li_std_wstring.patch) -# bypass https://bugzilla.opensuse.org/show_bug.cgi?id=1171368 -# for all other arches do all BUT that specific one -%ifarch ppc64 s390 s390x %autopatch -p1 -%else -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch308 -p1 -%endif %build %ifarch s390 s390x From beac2eb53654283ab8c1de49afdc18dd448ba855ce46c5ef31a1bf3eecbbcdee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= Date: Sat, 23 May 2020 11:43:44 +0000 Subject: [PATCH 2/3] - Revert last change, drop 0005-disable_li_std_wstring.patch OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/swig?expand=0&rev=121 --- swig.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swig.changes b/swig.changes index d02ce11..92af8f7 100644 --- a/swig.changes +++ b/swig.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Sat May 23 07:04:09 UTC 2020 - Andreas Schwab -- Revert last change +- Revert last change, drop 0005-disable_li_std_wstring.patch - ruby-std-wstring-byte-order.patch: fix wstring encoding ------------------------------------------------------------------- From ef6be899fe16d7a4d8e3e2ff52bab4c3c43c0d4d730e9e5801ffed6ab5a39e9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= Date: Sat, 23 May 2020 11:46:21 +0000 Subject: [PATCH 3/3] - ruby-std-wstring-byte-order.patch: fix wstring encoding boo#1171368 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/swig?expand=0&rev=122 --- swig.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swig.changes b/swig.changes index 92af8f7..0adf3b8 100644 --- a/swig.changes +++ b/swig.changes @@ -2,7 +2,7 @@ Sat May 23 07:04:09 UTC 2020 - Andreas Schwab - Revert last change, drop 0005-disable_li_std_wstring.patch -- ruby-std-wstring-byte-order.patch: fix wstring encoding +- ruby-std-wstring-byte-order.patch: fix wstring encoding boo#1171368 ------------------------------------------------------------------- Mon May 18 15:46:46 UTC 2020 - Michel Normand