2007-01-16 00:38:28 +01:00
#
2011-05-18 10:30:35 +02:00
# spec file for package swig
2007-01-16 00:38:28 +01:00
#
2014-01-30 12:49:32 +01:00
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
2007-01-16 00:38:28 +01:00
#
2008-09-26 15:12:14 +02:00
# 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.
2007-01-16 00:38:28 +01:00
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
2012-03-05 14:21:52 +01:00
2007-01-16 00:38:28 +01:00
Name : swig
Accepting request 200683 from home:kwk:branches:devel:tools:building
- Update to SWIG 2.0.11
- Minor bug fixes and enhancements mostly in Python, but also
C#, Lua, Ocaml, Octave, Perl, PHP, Python, R, Ruby, Tcl.
OBS-URL: https://build.opensuse.org/request/show/200683
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/swig?expand=0&rev=54
2013-09-26 11:12:59 +02:00
Version : 2.0.11
2012-04-10 10:43:19 +02:00
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/
- Update to 2.0.6
* Various fixes with templates and typedef types.
* Some template lookup problems fixed.
* Templated type fixes to use correct typemaps.
* Autodoc documentation generation improvements.
* Python STL container wrappers improvements including addition of
stepped slicing.
* Approximately 70 fixes and minor enhancements for the following
target languages: AllegroCL, C#, D, Go, Java, Lua, Ocaml, Octave,
Perl, PHP, Python, R, Ruby, Tcl, Xml.
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/swig?expand=0&rev=35
2012-04-30 14:24:08 +02:00
Source : http://sourceforge.net/projects/swig/files/swig/%{name} -%{version} /%{name} -%{version} .tar.gz
2012-04-10 10:43:19 +02:00
Source1 : %{name} .rpmlintrc
2013-03-28 12:01:12 +01:00
# Fix the return type in declaration of caml_array_length
Patch9 : swig-fix_ocaml_type.patch
2013-05-29 13:54:28 +02:00
# Ruby 2.0 encodes to UTF-8, SWIG to US-ASCII-8BIT, kkaempf@suse.de
2013-05-28 15:04:53 +02:00
Patch10 : ruby-2.0-encoding-utf8.patch
2013-05-29 13:54:28 +02:00
# Fix SWIG object tracking to use C hash, not Ruby Hash, kkaempf@suse.de
Patch11 : 0001-Fix-Ruby-tracking-code-to-use-C-hash.patch
# Ruby 1.8.6 (SLE 10) differs in object tracking, kkaempf@suse.de
Patch12 : ruby-1.8.6-newobject.patch
2013-10-02 08:33:50 +02:00
# PATCH-FIX-UPSTREAM swig-lua-fix-void-return-for-int-functions.patch bnc#843310 badshah400@gmail.com -- Fix functions returning void when int is expected for lua bindings
Patch13 : swig-lua-fix-void-return-for-int-functions.patch
2014-01-30 12:49:32 +01:00
# PATCH-FIX-UPSTREAM swig-support-octave-3.8.0.patch badshah400@gmail.com -- Support octave 3.8.0 (this fixes octave 3.8.0 bindings of several packages failing to build in Factory such as mathgl, plplot, etc.), patch taken from upstream and rebased for current version.
Patch14 : swig-support-octave-3.8.0.patch
2012-05-26 23:53:07 +02:00
BuildRequires : autoconf
BuildRequires : automake
2011-05-18 10:30:22 +02:00
BuildRequires : boost-devel
BuildRequires : gcc-c++
2012-05-26 23:53:07 +02:00
BuildRequires : libtool
2011-05-18 10:30:22 +02:00
BuildRequires : pcre-devel
BuildRequires : perl
BuildRequires : python-devel
2010-02-11 19:01:01 +01:00
%if 0%{?rhel_version} > 0
BuildRequires : -vim
%endif
2011-09-21 09:57:50 +02:00
%if 0%{?fedora} + 0%{?rhel_version} + 0%{?centos_version} > 0
%define docpath %{_docdir}/%{name}-%{version}
2011-05-18 10:30:22 +02:00
BuildRequires : pkgconfig
Accepting request 145936 from systemsmanagement:wbem
- Update to SWIG 2.0.9
SWIG-2.0.9 summary:
- Improved typemap matching.
- Ruby 1.9 support is much improved.
- Various bug fixes and minor improvements in C#, CFFI, Go, Java,
Modula3, Octave, Perl, Python, R, Ruby, Tcl and in ccache-swig.
- Removed patches (included in 2.0.9 release)
- 0001-Ruby-replace-obsolete-STR2CSTR-macro-with-StringValu.patch
- 0002-Ruby-use-RbConfig-instead-of-deprecated-Config-modul.patch
- 0003-Ruby-Fix-include-pathes-for-Ruby-1.9.patch
- 0004-Ruby-Add-local-dir-to-loadpath-for-Ruby-1.9.patch
- 0007-Ruby-1.9-methods-returns-array-of-Symbols-now.patch
- Removed broken patch
- swig-2.0.4-guile2.patch
- Disable tests failing on (deprecated) Python 2.4
- new patch: python-2.4.patch
- fix build on SLE10: disable autogen.sh
Add patch: PyInt_FromSize_t unavailable under Python 2.4
OBS-URL: https://build.opensuse.org/request/show/145936
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/swig?expand=0&rev=43
2012-12-19 23:17:47 +01:00
BuildRequires : ruby
2012-12-20 10:47:28 +01:00
%if 0%{?rhel_version} < 600 && 0%{?centos_version} < 600
Accepting request 145936 from systemsmanagement:wbem
- Update to SWIG 2.0.9
SWIG-2.0.9 summary:
- Improved typemap matching.
- Ruby 1.9 support is much improved.
- Various bug fixes and minor improvements in C#, CFFI, Go, Java,
Modula3, Octave, Perl, Python, R, Ruby, Tcl and in ccache-swig.
- Removed patches (included in 2.0.9 release)
- 0001-Ruby-replace-obsolete-STR2CSTR-macro-with-StringValu.patch
- 0002-Ruby-use-RbConfig-instead-of-deprecated-Config-modul.patch
- 0003-Ruby-Fix-include-pathes-for-Ruby-1.9.patch
- 0004-Ruby-Add-local-dir-to-loadpath-for-Ruby-1.9.patch
- 0007-Ruby-1.9-methods-returns-array-of-Symbols-now.patch
- Removed broken patch
- swig-2.0.4-guile2.patch
- Disable tests failing on (deprecated) Python 2.4
- new patch: python-2.4.patch
- fix build on SLE10: disable autogen.sh
Add patch: PyInt_FromSize_t unavailable under Python 2.4
OBS-URL: https://build.opensuse.org/request/show/145936
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/swig?expand=0&rev=43
2012-12-19 23:17:47 +01:00
# not available on RHEL-6
2011-05-18 10:30:22 +02:00
BuildRequires : ruby-devel
Accepting request 145936 from systemsmanagement:wbem
- Update to SWIG 2.0.9
SWIG-2.0.9 summary:
- Improved typemap matching.
- Ruby 1.9 support is much improved.
- Various bug fixes and minor improvements in C#, CFFI, Go, Java,
Modula3, Octave, Perl, Python, R, Ruby, Tcl and in ccache-swig.
- Removed patches (included in 2.0.9 release)
- 0001-Ruby-replace-obsolete-STR2CSTR-macro-with-StringValu.patch
- 0002-Ruby-use-RbConfig-instead-of-deprecated-Config-modul.patch
- 0003-Ruby-Fix-include-pathes-for-Ruby-1.9.patch
- 0004-Ruby-Add-local-dir-to-loadpath-for-Ruby-1.9.patch
- 0007-Ruby-1.9-methods-returns-array-of-Symbols-now.patch
- Removed broken patch
- swig-2.0.4-guile2.patch
- Disable tests failing on (deprecated) Python 2.4
- new patch: python-2.4.patch
- fix build on SLE10: disable autogen.sh
Add patch: PyInt_FromSize_t unavailable under Python 2.4
OBS-URL: https://build.opensuse.org/request/show/145936
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/swig?expand=0&rev=43
2012-12-19 23:17:47 +01:00
%endif
2012-12-20 10:40:24 +01:00
%if 0%{?fedora} > 0 || 0%{?rhel_version} >= 600 ||0%{?centos_version} >= 600
2013-05-29 13:54:28 +02:00
BuildRequires : perl-Test-Simple
2010-02-11 19:01:01 +01:00
BuildRequires : perl-devel
%endif
%endif
%if 0%{?suse_version} > 0
2011-09-21 09:57:50 +02:00
%define docpath %{_docdir}/%{name}
%if 0%{?suse_version} > 1010
2010-02-11 19:01:01 +01:00
BuildRequires : fdupes
%endif
# SLE9
%if 0%{?suse_version} < 920
2011-05-18 10:30:22 +02:00
BuildRequires : pkgconfig
BuildRequires : ruby
2010-02-11 19:01:01 +01:00
%else
2011-05-18 10:30:22 +02:00
BuildRequires : pkg-config
2010-02-11 19:01:01 +01:00
# SLE10 and up
BuildRequires : ruby-devel
%endif
%endif
2007-01-16 00:38:28 +01:00
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
Summary : SWIG Manual
2011-12-09 10:06:26 +01:00
License : BSD-3-Clause
2012-03-05 14:21:52 +01:00
Group : Documentation/Man
2007-01-16 00:38:28 +01:00
Requires : swig
2010-02-11 19:01:01 +01:00
%if 0%{?suse_version} >= 1120
BuildArch : noarch
%endif
2007-01-16 00:38:28 +01:00
%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
Summary : SWIG example files
2011-12-09 10:06:26 +01:00
License : BSD-3-Clause
2012-03-05 14:21:52 +01:00
Group : Documentation/Howto
2007-01-16 00:38:28 +01:00
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.
2007-04-06 00:31:16 +02:00
This package contains SWIG examples, useful both for testing and
2007-01-16 00:38:28 +01:00
understandig SWIG usage.
%prep
%setup -q
Accepting request 145936 from systemsmanagement:wbem
- Update to SWIG 2.0.9
SWIG-2.0.9 summary:
- Improved typemap matching.
- Ruby 1.9 support is much improved.
- Various bug fixes and minor improvements in C#, CFFI, Go, Java,
Modula3, Octave, Perl, Python, R, Ruby, Tcl and in ccache-swig.
- Removed patches (included in 2.0.9 release)
- 0001-Ruby-replace-obsolete-STR2CSTR-macro-with-StringValu.patch
- 0002-Ruby-use-RbConfig-instead-of-deprecated-Config-modul.patch
- 0003-Ruby-Fix-include-pathes-for-Ruby-1.9.patch
- 0004-Ruby-Add-local-dir-to-loadpath-for-Ruby-1.9.patch
- 0007-Ruby-1.9-methods-returns-array-of-Symbols-now.patch
- Removed broken patch
- swig-2.0.4-guile2.patch
- Disable tests failing on (deprecated) Python 2.4
- new patch: python-2.4.patch
- fix build on SLE10: disable autogen.sh
Add patch: PyInt_FromSize_t unavailable under Python 2.4
OBS-URL: https://build.opensuse.org/request/show/145936
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/swig?expand=0&rev=43
2012-12-19 23:17:47 +01:00
%if 0%{?suse_version} == 1010
2013-05-29 13:54:28 +02:00
%patch12 -p1
%endif
# Ruby 1.9 for openSUSE 12.x
%if 0%{?suse_version} >= 1220
%patch11 -p1
# Ruby 2.0 for openSUSE 13.1
%if 0%{?suse_version} > 1230
%patch10 -p1
Accepting request 145936 from systemsmanagement:wbem
- Update to SWIG 2.0.9
SWIG-2.0.9 summary:
- Improved typemap matching.
- Ruby 1.9 support is much improved.
- Various bug fixes and minor improvements in C#, CFFI, Go, Java,
Modula3, Octave, Perl, Python, R, Ruby, Tcl and in ccache-swig.
- Removed patches (included in 2.0.9 release)
- 0001-Ruby-replace-obsolete-STR2CSTR-macro-with-StringValu.patch
- 0002-Ruby-use-RbConfig-instead-of-deprecated-Config-modul.patch
- 0003-Ruby-Fix-include-pathes-for-Ruby-1.9.patch
- 0004-Ruby-Add-local-dir-to-loadpath-for-Ruby-1.9.patch
- 0007-Ruby-1.9-methods-returns-array-of-Symbols-now.patch
- Removed broken patch
- swig-2.0.4-guile2.patch
- Disable tests failing on (deprecated) Python 2.4
- new patch: python-2.4.patch
- fix build on SLE10: disable autogen.sh
Add patch: PyInt_FromSize_t unavailable under Python 2.4
OBS-URL: https://build.opensuse.org/request/show/145936
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/swig?expand=0&rev=43
2012-12-19 23:17:47 +01:00
%endif
2011-12-05 16:48:36 +01:00
%endif
2013-03-28 12:01:12 +01:00
%patch9
2013-10-02 08:33:50 +02:00
%patch13 -p1
2014-01-30 12:49:32 +01:00
%patch14 -p1
2007-01-16 00:38:28 +01:00
%build
2011-05-18 10:30:22 +02:00
%configure --disable-ccache
make %{?_smp_mflags}
%check
2007-01-16 00:38:28 +01:00
make check
%install
2011-05-26 14:09:07 +02:00
make install DESTDIR=%{buildroot}
2011-05-18 10:30:22 +02:00
2011-09-21 09:57:50 +02:00
install -d %{buildroot} %{docpath}
2011-05-18 10:30:22 +02:00
cp -a TODO ANNOUNCE CHANGES* LICENSE README Doc/{Devel,Manual} \
2011-09-21 09:57:50 +02:00
%{buildroot} %{docpath}
2011-05-18 10:30:22 +02:00
install -d %{buildroot} %{_libdir} /swig
cp -a Examples %{buildroot} %{_libdir} /swig/examples
- Update to 2.0.6
* Various fixes with templates and typedef types.
* Some template lookup problems fixed.
* Templated type fixes to use correct typemaps.
* Autodoc documentation generation improvements.
* Python STL container wrappers improvements including addition of
stepped slicing.
* Approximately 70 fixes and minor enhancements for the following
target languages: AllegroCL, C#, D, Go, Java, Lua, Ocaml, Octave,
Perl, PHP, Python, R, Ruby, Tcl, Xml.
OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/swig?expand=0&rev=35
2012-04-30 14:24:08 +02:00
rm -rf %{buildroot} %{_libdir} /swig/examples/test-suite
2011-05-18 10:30:22 +02:00
2012-04-10 10:43:19 +02:00
# rm files that are not needed for running or rebuilding the examples
2011-05-18 10:30:22 +02:00
find %{buildroot} %{_libdir} /swig \
2007-05-24 13:58:23 +02:00
-name '*.dsp' -o -name '*.vcproj' -o -name '*.sln' -o \
-name '*.o' -o -name '*_wrap.c' | xargs rm
2011-05-18 10:30:22 +02:00
2007-05-24 13:58:23 +02:00
# fix perms
2011-09-21 09:57:50 +02:00
chmod -x %{buildroot} %{docpath} /Manual/*
2011-05-18 10:30:22 +02:00
find %{buildroot} %{_libdir} /swig -name '*.h' -perm +111 | \
2007-05-24 13:58:23 +02:00
xargs --no-run-if-empty chmod -x
2011-09-21 09:57:50 +02:00
ln -s %{_libdir} /swig/examples %{buildroot} %{docpath} /Examples
%if 0%{?suse_version} > 1010
2012-04-10 10:43:19 +02:00
%fdupes %{buildroot}
2011-09-21 09:57:50 +02:00
%endif
2007-01-16 00:38:28 +01:00
%files
%defattr (644,root,root,755)
2011-09-21 09:57:50 +02:00
%dir %{docpath}
%{docpath} /[A-Z][A-Z]*
2007-01-16 00:38:28 +01:00
%{_datadir} /swig
%attr (755,root,root) %{_bindir} /swig
%files doc
%defattr (-,root,root)
2011-09-21 09:57:50 +02:00
%{docpath} /Devel
%{docpath} /Manual
2007-01-16 00:38:28 +01:00
%files examples
%defattr (-,root,root)
2011-09-21 09:57:50 +02:00
%{docpath} /Examples
2007-04-06 00:31:16 +02:00
%{_libdir} /swig
2007-12-03 23:41:10 +01:00
2007-04-06 00:31:16 +02:00
%changelog