From 6ad2ca7ed237bc9deb60e284d61e61fc154d5119 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Sun, 19 Jan 2020 08:12:39 +0900 Subject: [PATCH] Backport upstream fixes for ruby 2.7 (as small as possible for now) --- swig-4.0.1-ruby27-minimum.patch | 11 +++++++++++ swig.spec | 10 +++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 swig-4.0.1-ruby27-minimum.patch diff --git a/swig-4.0.1-ruby27-minimum.patch b/swig-4.0.1-ruby27-minimum.patch new file mode 100644 index 0000000..4370b35 --- /dev/null +++ b/swig-4.0.1-ruby27-minimum.patch @@ -0,0 +1,11 @@ +--- swig-4.0.1/Lib/ruby/rubytracking.swg.orig 2019-08-21 06:34:03.000000000 +0900 ++++ swig-4.0.1/Lib/ruby/rubytracking.swg 2020-01-18 18:32:38.909450596 +0900 +@@ -69,7 +69,7 @@ SWIGRUNTIME void SWIG_RubyInitializeTrac + swig_ruby_trackings = (st_table*)NUM2SWIG(trackings_value); + } + +- rb_define_virtual_variable("SWIG_TRACKINGS_COUNT", swig_ruby_trackings_count, NULL); ++ rb_define_virtual_variable("SWIG_TRACKINGS_COUNT", (rb_gvar_getter_t *)swig_ruby_trackings_count, (rb_gvar_setter_t *)NULL); + } + + /* Add a Tracking from a C/C++ struct to a Ruby object */ diff --git a/swig.spec b/swig.spec index 24f9a3b..2ff9791 100644 --- a/swig.spec +++ b/swig.spec @@ -51,7 +51,7 @@ Summary: Connects C/C++/Objective C to some high-level programming languages Name: swig Version: 4.0.1 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv3+ and BSD URL: http://swig.sourceforge.net/ Source0: http://downloads.sourceforge.net/project/swig/swig/swig-%{version}/swig-%{version}.tar.gz @@ -64,6 +64,10 @@ Source4: ccache-swig.csh %endif Patch0: swig308-Do-not-use-isystem.patch +# https://github.com/swig/swig/issues/1689 +# https://github.com/swig/swig/pull/1692/commits/00e291b319bd6b58bf061feee3721a58c9c6be32 +# For now, modify as small as possible for ruby 2.7 build +Patch1: swig-4.0.1-ruby27-minimum.patch BuildRequires: perl-interpreter, pcre-devel %if %{python2lang} @@ -165,6 +169,7 @@ in gdb. %setup -q -n swig-%{version} %patch0 -p1 -b .isystem +%patch1 -p1 -b .ruby27 for all in CHANGES README; do iconv -f ISO88591 -t UTF8 < $all > $all.new @@ -337,6 +342,9 @@ install -pm 644 Tools/swig.gdb %{buildroot}%{_datadir}/%{name}/gdb %{_datadir}/%{name}/gdb %changelog +* Sat Jan 18 2020 Mamoru TASAKA - 4.0.1-4 +- Backport upstream fixes for ruby 2.7 (as small as possible for now) + * Tue Nov 19 2019 Jitka Plesnikova - 4.0.1-3 - Disable Ruby tests on all archs