Accepting request 113033 from home:adra:branches:devel:tools:building

Added a patch to fix regression leading to uncompilable code when using typedef and function pointer references

OBS-URL: https://build.opensuse.org/request/show/113033
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/swig?expand=0&rev=33
This commit is contained in:
Ismail Dönmez
2012-04-10 08:43:19 +00:00
committed by Git OBS Bridge
parent e65876f8c1
commit bbab5343cc
3 changed files with 92 additions and 27 deletions

View File

@@ -16,8 +16,29 @@
#
Name: swig
Version: 2.0.4
Release: 0
Summary: Simplified Wrapper and Interface Generator
License: GPL-3.0+ and BSD-3-Clause
Group: Development/Languages/C and C++
Url: http://www.swig.org/
Source: %{name}-%{version}.tar.bz2
Source1: %{name}.rpmlintrc
# PATCH-FIX-UPSTREAM swig-2.0.4-support-python32.patch idoenmez@suse.de -- Support Python 3.2
Patch1: swig-2.0.4-support-python32.patch
# swig-2.0.4-ptrdiff_t.patch kkaempf@suse.com -- import_stl fails under Python
Patch2: swig-2.0.4-ptrdiff_t.patch
# PATCH-FIX-UPSTREAM swig-2.0.4-disable-broken-tests.patch idoenmez@suse.de -- Disable broken tests
Patch3: swig-2.0.4-disable-broken-tests.patch
# swig-2.0.4-disable-broken-tests_rhel4.patch kkaempf@suse.com -- disable tests failing on RHEL4
Patch4: swig-2.0.4-disable-broken-tests_rhel4.patch
# PATCH-FIX-UPSTREAM swig-2.0.4-guile2.patch pgajdos@suse.com -- generate guile 2 friendly code
Patch5: swig-2.0.4-guile2.patch
# PATCH-FIX-OPENSUSE swig-2.0.4-fix-overflow-error-64bitint.patch dvaleev@suse.com -- Fix overflow errors with 64-bit IVs
Patch6: swig-2.0.4-fix-overflow-error-64bitint.patch
# PATCH-FIX-UPSTREAM r12814.patch asterios.dramis@gmail.com -- Fix regression leading to uncompilable code when using typedef and function pointer references (taken from Debian)
Patch7: r12814.patch
BuildRequires: boost-devel
BuildRequires: gcc-c++
BuildRequires: pcre-devel
@@ -49,25 +70,6 @@ BuildRequires: pkg-config
BuildRequires: ruby-devel
%endif
%endif
Version: 2.0.4
Release: 0
Summary: Simplified Wrapper and Interface Generator
License: GPL-3.0+ and BSD-3-Clause
Group: Development/Languages/C and C++
Url: http://www.swig.org
Source: %{name}-%{version}.tar.bz2
Source1: %{name}.rpmlintrc
# PATCH-FIX-UPSTREAM swig-2.0.4-support-python32.patch idoenmez@suse.de -- Support Python 3.2
Patch1: swig-2.0.4-support-python32.patch
# swig-2.0.4-ptrdiff_t.patch kkaempf@suse.com -- import_stl fails under Python
Patch2: swig-2.0.4-ptrdiff_t.patch
# PATCH-FIX-UPSTREAM swig-2.0.4-disable-broken-tests.patch idoenmez@suse.de -- Disable broken tests
Patch3: swig-2.0.4-disable-broken-tests.patch
# swig-2.0.4-disable-broken-tests_rhel4.patch kkaempf@suse.com -- disable tests failing on RHEL4
Patch4: swig-2.0.4-disable-broken-tests_rhel4.patch
# PATCH-FIX-UPSTREAM swig-2.0.4-guile2.patch pgajdos@suse.com -- generate guile 2 friendly code
Patch5: swig-2.0.4-guile2.patch
Patch6: swig-2.0.4-fix-overflow-error-64bitint.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -129,10 +131,11 @@ understandig SWIG usage.
%patch4 -p1
%endif
# guile 2 from 12.1
%if 0%{?suse_version} >= 1210
%if 0%{?suse_version} >= 1210
%patch5 -p1
%endif
%patch6 -p1
%patch7 -p1
%build
%configure --disable-ccache
@@ -146,7 +149,7 @@ rm -f Examples/test-suite/python/li_boost_shared_ptr_runme.py
%if 0%{?suse_version} == 1010
%ifarch x86_64
# This test fails on SLES 10 SP3+SP4 on 64bit (bnc#750618)
rm -f Examples/test-suite/ruby/newobject1_runme.rb
rm -f Examples/test-suite/ruby/newobject1_runme.rb
%endif
%endif
make check
@@ -161,7 +164,7 @@ cp -a TODO ANNOUNCE CHANGES* LICENSE README Doc/{Devel,Manual} \
install -d %{buildroot}%{_libdir}/swig
cp -a Examples %{buildroot}%{_libdir}/swig/examples
# rm files that are not needed for runnig or rebuilding the examples
# rm files that are not needed for running or rebuilding the examples
find %{buildroot}%{_libdir}/swig \
-name '*.dsp' -o -name '*.vcproj' -o -name '*.sln' -o \
-name '*.o' -o -name '*_wrap.c' | xargs rm
@@ -173,12 +176,9 @@ find %{buildroot}%{_libdir}/swig -name '*.h' -perm +111 | \
ln -s %{_libdir}/swig/examples %{buildroot}%{docpath}/Examples
%if 0%{?suse_version} > 1010
%fdupes $RPM_BUILD_ROOT
%fdupes %{buildroot}
%endif
%clean
rm -rf %{buildroot}
%files
%defattr(644,root,root,755)
%dir %{docpath}