Backport upstream fixes for ruby 2.7 (as small as possible for now)

This commit is contained in:
Mamoru TASAKA 2020-01-19 08:12:39 +09:00
parent 38e811319e
commit 6ad2ca7ed2
2 changed files with 20 additions and 1 deletions

View File

@ -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 */

View File

@ -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 <mtasaka@fedoraproject.org> - 4.0.1-4
- Backport upstream fixes for ruby 2.7 (as small as possible for now)
* Tue Nov 19 2019 Jitka Plesnikova <jplesnik@redhat.com> - 4.0.1-3
- Disable Ruby tests on all archs