7b55c5eb2e
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/swig?expand=0&rev=20
180 lines
5.6 KiB
RPMSpec
180 lines
5.6 KiB
RPMSpec
#
|
|
# spec file for package swig
|
|
#
|
|
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
|
|
Name: swig
|
|
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
|
|
BuildRequires: ruby-devel
|
|
%if 0%{?rhel_version} == 0
|
|
BuildRequires: perl-devel
|
|
%endif
|
|
%endif
|
|
%if 0%{?suse_version} > 0
|
|
%if 0%{?suse_version} > 1020
|
|
BuildRequires: fdupes
|
|
%endif
|
|
# SLE9
|
|
%if 0%{?suse_version} < 920
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: ruby
|
|
%else
|
|
BuildRequires: pkg-config
|
|
# SLE10 and up
|
|
BuildRequires: ruby-devel
|
|
%endif
|
|
%endif
|
|
Version: 2.0.3
|
|
Release: 5
|
|
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
|
|
# PATCH-FIX-UPSTREAM swig-2.0.3-perl512.patch idoenmez@suse.de -- Upstream bug #3260265
|
|
Patch1: swig-2.0.3-perl512.patch
|
|
# 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
|
|
# PATCH-FIX-UPSTREAM swig-2.0.3-perl514.patch idoenmez@suse.de -- Fix Perl 5.14 test failure
|
|
Patch5: swig-2.0.3-perl514.patch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
%description
|
|
SWIG is a compiler that attempts to make it easy to integrate C, C++,
|
|
or Objective-C code with scripting languages including Perl, Tcl, and
|
|
Python. In a nutshell, you give it a bunch of ANSI C/C++ declarations
|
|
and it generates an interface between C and your favorite scripting
|
|
language. However, this is only scratching the surface of what SWIG
|
|
can do--some of its more advanced features include automatic
|
|
documentation generation, module and library management, extensive
|
|
customization options, and more.
|
|
|
|
%package doc
|
|
License: BSD3c
|
|
Summary: SWIG Manual
|
|
Group: Development/Languages/C and C++
|
|
Requires: swig
|
|
%if 0%{?suse_version} >= 1120
|
|
BuildArch: noarch
|
|
%endif
|
|
|
|
%description doc
|
|
SWIG is a compiler that attempts to make it easy to integrate C, C++,
|
|
or Objective-C code with scripting languages including Perl, Tcl, and
|
|
Python. In a nutshell, you give it a bunch of ANSI C/C++ declarations
|
|
and it generates an interface between C and your favorite scripting
|
|
language. However, this is only scratching the surface of what SWIG
|
|
can do--some of its more advanced features include automatic
|
|
documentation generation, module and library management, extensive
|
|
customization options, and more.
|
|
|
|
This package contains the SWIG manual.
|
|
|
|
%package examples
|
|
License: BSD3c
|
|
Summary: SWIG example files
|
|
Group: Development/Languages/C and C++
|
|
Requires: swig
|
|
|
|
%description examples
|
|
SWIG is a compiler that attempts to make it easy to integrate C, C++,
|
|
or Objective-C code with scripting languages including Perl, Tcl, and
|
|
Python. In a nutshell, you give it a bunch of ANSI C/C++ declarations
|
|
and it generates an interface between C and your favorite scripting
|
|
language. However, this is only scratching the surface of what SWIG
|
|
can do--some of its more advanced features include automatic
|
|
documentation generation, module and library management, extensive
|
|
customization options, and more.
|
|
|
|
This package contains SWIG examples, useful both for testing and
|
|
understandig SWIG usage.
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch1 -p1
|
|
%patch2
|
|
%patch3 -p1
|
|
%patch4 -p1
|
|
%patch5 -p1
|
|
|
|
%build
|
|
%configure --disable-ccache
|
|
make %{?_smp_mflags}
|
|
|
|
%check
|
|
# check fails on SLES9
|
|
%if !0%{?sles_version} == 9
|
|
# This test is buggy on x86-64
|
|
rm -f Examples/test-suite/python/li_boost_shared_ptr_runme.py
|
|
make check
|
|
%fi
|
|
|
|
%install
|
|
make install DESTDIR=%{buildroot}
|
|
|
|
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 %{buildroot}%{_libdir}/swig \
|
|
-name '*.dsp' -o -name '*.vcproj' -o -name '*.sln' -o \
|
|
-name '*.o' -o -name '*_wrap.c' | xargs rm
|
|
|
|
# fix perms
|
|
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 %{buildroot}%_docdir/%{name}/Examples
|
|
|
|
%clean
|
|
rm -rf %{buildroot}
|
|
|
|
%files
|
|
%defattr(644,root,root,755)
|
|
%dir %{_docdir}/%{name}
|
|
%{_docdir}/%{name}/[A-Z][A-Z]*
|
|
%{_datadir}/swig
|
|
%attr(755,root,root) %{_bindir}/swig
|
|
|
|
%files doc
|
|
%defattr(-,root,root)
|
|
%{_docdir}/%{name}/Devel
|
|
%{_docdir}/%{name}/Manual
|
|
|
|
%files examples
|
|
%defattr(-,root,root)
|
|
%{_docdir}/%{name}/Examples
|
|
%{_libdir}/swig
|
|
|
|
%changelog
|