2007-01-15 23:38:28 +00:00
#
2011-05-18 08:30:35 +00:00
# spec file for package swig
2007-01-15 23:38:28 +00:00
#
2013-03-28 11:01:12 +00:00
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
2007-01-15 23:38:28 +00:00
#
2008-09-26 13:12:14 +00: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-15 23:38:28 +00:00
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
2012-03-05 13:21:52 +00:00
2007-01-15 23:38:28 +00: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 09:12:59 +00:00
Version : 2.0.11
2012-04-10 08:43:19 +00: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 12:24:08 +00:00
Source : http://sourceforge.net/projects/swig/files/swig/%{name} -%{version} /%{name} -%{version} .tar.gz
2012-04-10 08:43:19 +00:00
Source1 : %{name} .rpmlintrc
2013-03-28 11:01:12 +00:00
# Fix the return type in declaration of caml_array_length
Patch9 : swig-fix_ocaml_type.patch
2013-05-29 11:54:28 +00:00
# Ruby 2.0 encodes to UTF-8, SWIG to US-ASCII-8BIT, kkaempf@suse.de
2013-05-28 13:04:53 +00:00
Patch10 : ruby-2.0-encoding-utf8.patch
2013-05-29 11:54:28 +00: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 06:33:50 +00: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
2012-05-26 21:53:07 +00:00
BuildRequires : autoconf
BuildRequires : automake
2011-05-18 08:30:22 +00:00
BuildRequires : boost-devel
BuildRequires : gcc-c++
2012-05-26 21:53:07 +00:00
BuildRequires : libtool
2011-05-18 08:30:22 +00:00
BuildRequires : pcre-devel
BuildRequires : perl
BuildRequires : python-devel
2010-02-11 18:01:01 +00:00
%if 0%{?rhel_version} > 0
BuildRequires : -vim
%endif
2011-09-21 07:57:50 +00:00
%if 0%{?fedora} + 0%{?rhel_version} + 0%{?centos_version} > 0
%define docpath %{_docdir}/%{name}-%{version}
2011-05-18 08:30:22 +00: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 22:17:47 +00:00
BuildRequires : ruby
2012-12-20 09:47:28 +00: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 22:17:47 +00:00
# not available on RHEL-6
2011-05-18 08:30:22 +00: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 22:17:47 +00:00
%endif
2012-12-20 09:40:24 +00:00
%if 0%{?fedora} > 0 || 0%{?rhel_version} >= 600 ||0%{?centos_version} >= 600
2013-05-29 11:54:28 +00:00
BuildRequires : perl-Test-Simple
2010-02-11 18:01:01 +00:00
BuildRequires : perl-devel
%endif
%endif
%if 0%{?suse_version} > 0
2011-09-21 07:57:50 +00:00
%define docpath %{_docdir}/%{name}
%if 0%{?suse_version} > 1010
2010-02-11 18:01:01 +00:00
BuildRequires : fdupes
%endif
# SLE9
%if 0%{?suse_version} < 920
2011-05-18 08:30:22 +00:00
BuildRequires : pkgconfig
BuildRequires : ruby
2010-02-11 18:01:01 +00:00
%else
2011-05-18 08:30:22 +00:00
BuildRequires : pkg-config
2010-02-11 18:01:01 +00:00
# SLE10 and up
BuildRequires : ruby-devel
%endif
%endif
2007-01-15 23:38:28 +00: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 09:06:26 +00:00
License : BSD-3-Clause
2012-03-05 13:21:52 +00:00
Group : Documentation/Man
2007-01-15 23:38:28 +00:00
Requires : swig
2010-02-11 18:01:01 +00:00
%if 0%{?suse_version} >= 1120
BuildArch : noarch
%endif
2007-01-15 23:38:28 +00: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 09:06:26 +00:00
License : BSD-3-Clause
2012-03-05 13:21:52 +00:00
Group : Documentation/Howto
2007-01-15 23:38:28 +00: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-05 22:31:16 +00:00
This package contains SWIG examples, useful both for testing and
2007-01-15 23:38:28 +00: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 22:17:47 +00:00
%if 0%{?suse_version} == 1010
2013-05-29 11:54:28 +00: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 22:17:47 +00:00
%endif
2011-12-05 15:48:36 +00:00
%endif
2013-03-28 11:01:12 +00:00
%patch9
2013-10-02 06:33:50 +00:00
%patch13 -p1
2007-01-15 23:38:28 +00:00
%build
2011-05-18 08:30:22 +00:00
%configure --disable-ccache
make %{?_smp_mflags}
%check
2007-01-15 23:38:28 +00:00
make check
%install
2011-05-26 12:09:07 +00:00
make install DESTDIR=%{buildroot}
2011-05-18 08:30:22 +00:00
2011-09-21 07:57:50 +00:00
install -d %{buildroot} %{docpath}
2011-05-18 08:30:22 +00:00
cp -a TODO ANNOUNCE CHANGES* LICENSE README Doc/{Devel,Manual} \
2011-09-21 07:57:50 +00:00
%{buildroot} %{docpath}
2011-05-18 08:30:22 +00: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 12:24:08 +00:00
rm -rf %{buildroot} %{_libdir} /swig/examples/test-suite
2011-05-18 08:30:22 +00:00
2012-04-10 08:43:19 +00:00
# rm files that are not needed for running or rebuilding the examples
2011-05-18 08:30:22 +00:00
find %{buildroot} %{_libdir} /swig \
2007-05-24 11:58:23 +00:00
-name '*.dsp' -o -name '*.vcproj' -o -name '*.sln' -o \
-name '*.o' -o -name '*_wrap.c' | xargs rm
2011-05-18 08:30:22 +00:00
2007-05-24 11:58:23 +00:00
# fix perms
2011-09-21 07:57:50 +00:00
chmod -x %{buildroot} %{docpath} /Manual/*
2011-05-18 08:30:22 +00:00
find %{buildroot} %{_libdir} /swig -name '*.h' -perm +111 | \
2007-05-24 11:58:23 +00:00
xargs --no-run-if-empty chmod -x
2011-09-21 07:57:50 +00:00
ln -s %{_libdir} /swig/examples %{buildroot} %{docpath} /Examples
%if 0%{?suse_version} > 1010
2012-04-10 08:43:19 +00:00
%fdupes %{buildroot}
2011-09-21 07:57:50 +00:00
%endif
2007-01-15 23:38:28 +00:00
%files
%defattr (644,root,root,755)
2011-09-21 07:57:50 +00:00
%dir %{docpath}
%{docpath} /[A-Z][A-Z]*
2007-01-15 23:38:28 +00:00
%{_datadir} /swig
%attr (755,root,root) %{_bindir} /swig
%files doc
%defattr (-,root,root)
2011-09-21 07:57:50 +00:00
%{docpath} /Devel
%{docpath} /Manual
2007-01-15 23:38:28 +00:00
%files examples
%defattr (-,root,root)
2011-09-21 07:57:50 +00:00
%{docpath} /Examples
2007-04-05 22:31:16 +00:00
%{_libdir} /swig
2007-12-03 22:41:10 +00:00
2007-04-05 22:31:16 +00:00
%changelog