Accepting request 69970 from devel:tools:building
Remove duplicate BuildRequires: python-devel (forwarded request 69911 from namtrac) OBS-URL: https://build.opensuse.org/request/show/69970 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/swig?expand=0&rev=21
This commit is contained in:
committed by
Git OBS Bridge
parent
f0c827cae5
commit
ccfb7e4f48
105
swig.spec
105
swig.spec
@@ -15,17 +15,20 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
# norootforbuild
|
||||
|
||||
|
||||
Name: swig
|
||||
BuildRequires: boost-devel gcc-c++ python-devel
|
||||
BuildRequires: perl python-devel
|
||||
BuildRequires: boost-devel
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: pcre-devel
|
||||
BuildRequires: perl
|
||||
BuildRequires: python-devel
|
||||
%if 0%{?rhel_version} > 0
|
||||
BuildRequires: -vim
|
||||
%endif
|
||||
%if 0%{?fedora} + 0%{?rhel_version} > 0
|
||||
BuildRequires: pkgconfig ruby-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: ruby-devel
|
||||
%if 0%{?rhel_version} == 0
|
||||
BuildRequires: perl-devel
|
||||
%endif
|
||||
@@ -36,24 +39,28 @@ BuildRequires: fdupes
|
||||
%endif
|
||||
# SLE9
|
||||
%if 0%{?suse_version} < 920
|
||||
BuildRequires: pkgconfig ruby
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: ruby
|
||||
%else
|
||||
BuildRequires: pkg-config
|
||||
# SLE10 and up
|
||||
BuildRequires: ruby-devel
|
||||
BuildRequires: pkg-config
|
||||
%endif
|
||||
%endif
|
||||
Url: http://www.swig.org
|
||||
License: BSD3c
|
||||
Group: Development/Languages/C and C++
|
||||
AutoReqProv: on
|
||||
Summary: Simplified Wrapper and Interface Generator
|
||||
Version: 1.3.40
|
||||
Version: 2.0.3
|
||||
Release: 3
|
||||
License: GPLv3+ and BSD
|
||||
Summary: Simplified Wrapper and Interface Generator
|
||||
Url: http://www.swig.org
|
||||
Group: Development/Languages/C and C++
|
||||
Source: swig-%{version}.tar.bz2
|
||||
Patch1: swig-1.3.36-perl-long-long.patch
|
||||
Patch2: swig-fixassert.diff
|
||||
Patch3: adapt-perl512.diff
|
||||
Patch1: adapt-perl512.diff
|
||||
# PATCH-FIX-UPSTREAM swig-2.0.3-disable-broken-tests.patch idoenmez@suse.de -- Disable broken tests
|
||||
Patch2: swig-2.0.3-disable-broken-tests.patch
|
||||
# PATCH-FIX-UPSTREAM swig-2.0.3-use-python-capsule-api.patch idoenmez@suse.de -- Use Python capsule api
|
||||
Patch3: swig-2.0.3-use-python-capsule-api.patch
|
||||
# PATCH-FIX-UPSTREAM swig-2.0.3-support-python32.patch idoenmez@suse.de -- Support Python 3.2
|
||||
Patch4: swig-2.0.3-support-python32.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
@@ -66,13 +73,6 @@ can do--some of its more advanced features include automatic
|
||||
documentation generation, module and library management, extensive
|
||||
customization options, and more.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Dave Beazley <beazley@cs.utah.edu>
|
||||
William S Fulton <wsf@fultondesigns.co.uk>
|
||||
|
||||
%package doc
|
||||
License: BSD3c
|
||||
Summary: SWIG Manual
|
||||
@@ -94,12 +94,6 @@ customization options, and more.
|
||||
|
||||
This package contains the SWIG manual.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Dave Beazley <beazley@cs.utah.edu>
|
||||
|
||||
%package examples
|
||||
License: BSD3c
|
||||
Summary: SWIG example files
|
||||
@@ -119,54 +113,45 @@ customization options, and more.
|
||||
This package contains SWIG examples, useful both for testing and
|
||||
understandig SWIG usage.
|
||||
|
||||
|
||||
|
||||
Authors:
|
||||
--------
|
||||
Dave Beazley <beazley@cs.utah.edu>
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1
|
||||
%patch1 -p1
|
||||
%patch2
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
%build
|
||||
v1=$(awk '/^# Generated by GNU Autoconf / { print $6; exit; }' configure)
|
||||
v2=$(autoconf -V | awk '/autoconf \(GNU Autoconf\)/ {print $4; exit}')
|
||||
old=$(perl -e "print ($v1 <= $v2);")
|
||||
if test "x$old" = "x1"; then
|
||||
./autogen.sh
|
||||
fi
|
||||
export CCSHARED="-fPIC -fno-strict-aliasing $RPM_OPT_FLAGS"
|
||||
export CFLAGS="$RPM_OPT_FLAGS"
|
||||
export CXXFLAGS="$RPM_OPT_FLAGS"
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--libdir=%{_libdir} \
|
||||
--disable-ccache
|
||||
make %{?jobs:-j%jobs}
|
||||
./autogen.sh
|
||||
%configure --disable-ccache
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%check
|
||||
# This test is buggy on x86-64
|
||||
rm -f Examples/test-suite/python/li_boost_shared_ptr_runme.py
|
||||
make check
|
||||
|
||||
%install
|
||||
make install DESTDIR=$RPM_BUILD_ROOT
|
||||
install -d $RPM_BUILD_ROOT%{_docdir}/%{name}
|
||||
cp -a FUTURE TODO NEW ANNOUNCE CHANGES* LICENSE README Doc/{Devel,Manual} \
|
||||
$RPM_BUILD_ROOT%{_docdir}/%{name}/
|
||||
install -d $RPM_BUILD_ROOT%{_libdir}/swig
|
||||
cp -a Examples $RPM_BUILD_ROOT%_libdir/swig/examples
|
||||
%make_install
|
||||
|
||||
install -d %{buildroot}%{_docdir}/%{name}
|
||||
cp -a TODO ANNOUNCE CHANGES* LICENSE README Doc/{Devel,Manual} \
|
||||
%{buildroot}%{_docdir}/%{name}/
|
||||
install -d %{buildroot}%{_libdir}/swig
|
||||
cp -a Examples %{buildroot}%{_libdir}/swig/examples
|
||||
|
||||
# rm files that are not needed for runnig or rebuilding the examples
|
||||
find $RPM_BUILD_ROOT%_libdir/swig \
|
||||
find %{buildroot}%{_libdir}/swig \
|
||||
-name '*.dsp' -o -name '*.vcproj' -o -name '*.sln' -o \
|
||||
-name '*.o' -o -name '*_wrap.c' | xargs rm
|
||||
|
||||
# fix perms
|
||||
chmod -x $RPM_BUILD_ROOT%_docdir/%name/Manual/*
|
||||
find $RPM_BUILD_ROOT%_libdir/swig -name '*.h' -perm +111 | \
|
||||
chmod -x %{buildroot}%_docdir/%{name}/Manual/*
|
||||
find %{buildroot}%{_libdir}/swig -name '*.h' -perm +111 | \
|
||||
xargs --no-run-if-empty chmod -x
|
||||
ln -s %_libdir/swig/examples $RPM_BUILD_ROOT%_docdir/%name/Examples
|
||||
ln -s %{_libdir}/swig/examples %{buildroot}%_docdir/%{name}/Examples
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%files
|
||||
%defattr(644,root,root,755)
|
||||
|
Reference in New Issue
Block a user