diff --git a/swig.spec b/swig.spec index df1cb6c..fc1248e 100644 --- a/swig.spec +++ b/swig.spec @@ -18,7 +18,7 @@ %else %{!?golang:%global golang 1} # R tests failed (since 3.0.4) -%{!?Rlang:%global Rlang 0} +%{!?Rlang:%global Rlang 1} %endif %{!?javalang:%global javalang 1} %endif @@ -29,11 +29,14 @@ %{!?octave:%global octave 1} %endif +# Disable Go tests because they failed against new Go 1.6 +# The tests passed against Go 1.5.3 +%global golang 0 Summary: Connects C/C++/Objective C to some high-level programming languages Name: swig Version: 3.0.8 -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 @@ -47,6 +50,8 @@ Source4: ccache-swig.csh # The failure was caused because "char" is not equivalent to "signed char" # on these arches Patch0: swig308-Fix-li_boost_array-test.patch +Patch1: swig308-Do-not-use-isystem.patch +Patch2: swig308-Update-test-for-macro-isfinite.patch BuildRequires: perl, python2-devel, pcre-devel BuildRequires: autoconf, automake, gawk, dos2unix @@ -75,6 +80,7 @@ BuildRequires: octave-devel %endif %if %{golang} BuildRequires: golang +BuildRequires: golang-src %endif %if %{lualang} BuildRequires: lua-devel @@ -124,6 +130,8 @@ This package contains documentation for SWIG and useful examples %setup -q -n swig-%{version} %patch0 -p1 -b .signed +%patch1 -p1 -b .isystem +%patch2 -p1 -b .isfinite for all in CHANGES README; do iconv -f ISO88591 -t UTF8 < $all > $all.new @@ -259,6 +267,10 @@ install -pm 644 %{SOURCE3} %{SOURCE4} %{buildroot}%{_sysconfdir}/profile.d %doc Doc Examples COPYRIGHT %changelog +* Mon Feb 22 2016 Jitka Plesnikova - 3.0.8-4 +- Patched to build against GCC 6 +- Disable Go tests, because they failed against new Go 1.6 + * Fri Feb 05 2016 Fedora Release Engineering - 3.0.8-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/swig308-Do-not-use-isystem.patch b/swig308-Do-not-use-isystem.patch new file mode 100644 index 0000000..48f0105 --- /dev/null +++ b/swig308-Do-not-use-isystem.patch @@ -0,0 +1,13 @@ +diff -up swig-3.0.8/configure.ac.orig swig-3.0.8/configure.ac +--- swig-3.0.8/configure.ac.orig 2016-02-02 16:01:09.094852303 +0100 ++++ swig-3.0.8/configure.ac 2016-02-02 16:01:42.096702679 +0100 +@@ -131,7 +131,8 @@ AC_SUBST(BOOST_CPPFLAGS) + dnl How to specify include directories that may be system directories. + # -I should not be used on system directories (GCC) + if test "$GCC" = yes; then +- ISYSTEM="-isystem " ++# ISYSTEM="-isystem " ++ ISYSTEM="-I" + else + ISYSTEM="-I" + fi diff --git a/swig308-Update-test-for-macro-isfinite.patch b/swig308-Update-test-for-macro-isfinite.patch new file mode 100644 index 0000000..b603d05 --- /dev/null +++ b/swig308-Update-test-for-macro-isfinite.patch @@ -0,0 +1,12 @@ +diff -up swig-3.0.8/Lib/typemaps/fragments.swg.orig swig-3.0.8/Lib/typemaps/fragments.swg +--- swig-3.0.8/Lib/typemaps/fragments.swg.orig 2016-02-18 08:30:57.625989817 +0100 ++++ swig-3.0.8/Lib/typemaps/fragments.swg 2016-02-18 08:31:13.260900411 +0100 +@@ -168,7 +168,7 @@ + %fragment("SWIG_isfinite","header",fragment=",") %{ + /* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */ + #ifndef SWIG_isfinite +-# if defined(isfinite) ++# if defined(isfinite) || (defined __cplusplus && __cplusplus >= 201103L) + # define SWIG_isfinite(X) (isfinite(X)) + # elif defined(_MSC_VER) + # define SWIG_isfinite(X) (_finite(X))