3 %bcond_without guile # disable guile support
4 %bcond_without perl # disable perl support
5 %bcond_without php # disable php support
6 %bcond_without ruby # disable ruby support
7 %bcond_without tcl # disable tcl support
9 %if "%{?php_suffix}" == ""
12 %define php_name php%{?php_suffix}
13 Summary: Interface generator for Perl, Tcl, Guile and Python
14 Summary(pl.UTF-8): Generator interfejsów do Perla, Tcl-a, Guile'a i Pythona
15 Summary(pt_BR.UTF-8): Gerador de Interfaces e "Wrappers" Simplificado (SWIG)
19 License: GPL v3+ (utility), free (library)
20 Group: Development/Languages
21 Source0: http://downloads.sourceforge.net/swig/%{name}-%{version}.tar.gz
22 # Source0-md5: c96a1d5ecb13d38604d7e92148c73c97
23 Patch0: %{name}-php-freearg.patch
24 URL: http://www.swig.org/
25 BuildRequires: autoconf >= 2.58
26 BuildRequires: automake >= 1:1.7.2
27 %{?with_guile:BuildRequires: guile-devel >= 5:1.8}
28 BuildRequires: libstdc++-devel
29 # used only in examples, doesn't affect actual swig build
31 # used only in examples, doesn't affect actual swig build
32 #BuildRequires: octave-devel
33 BuildRequires: pcre-devel
34 %{?with_perl:BuildRequires: perl-devel >= 1:5.6.1}
35 %{?with_php:BuildRequires: %{php_name}-cli}
36 %{?with_php:BuildRequires: %{php_name}-devel >= 4.1.0}
37 BuildRequires: python-devel >= 1:2.3.2
38 BuildRequires: python-modules
39 BuildRequires: python3-devel
40 BuildRequires: python3-modules
41 BuildRequires: rpm-pythonprov
43 BuildRequires: rpmbuild(macros) >= 1.277
44 BuildRequires: ruby-devel >= 1:1.6.3
46 %{?with_tcl:BuildRequires: tcl-devel >= 8.3.3}
48 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51 SWIG is a compiler that attempts to make it easy to integrate C, C++,
52 or Objective-C code with scripting languages including Perl, Tcl, and
53 Python. In a nutshell, you give it a bunch of ANSI C/C++ declarations
54 and it generates an interface between C and your favorite scripting
55 language. However, this is only scratching the surface of what SWIG
56 can do--some of its more advanced features include automatic
57 documentation generation, module and library management, extensive
58 customization options, and more.
60 SWIG is entirely the product of users who have used the system and
61 suggested new idea. There are far too many people to thank
62 individually, but without this support, SWIG would be not be nearly as
63 powerful or fun to use as it is now. Many thanks!
65 %description -l pl.UTF-8
66 SWIG jesk kompilatorem, który próbuje ułatwić integrowanie kodu
67 napisanego w C, C++ lub Objective-C z językami skryptowymi, takimi jak
68 Perl, Tcl i Python. Mówiąc najprościej, jeśli dostarczysz mu zestaw
69 zadeklarowanych w ANSI C/C++ funkcji, SWIG wygeneruje Ci interfejs
70 pomiędzy C a Twoim ulubionym językiem skryptowym. To tylko drobna
71 część tego co SWIG potrafi robić, bardziej zaawansowane zastosowania
72 to automatyczne generowanie dokumentacji, zarządzanie bibliotekami i
73 modułami i wiele innych.
75 SWIG jest w całości dziełem ludzi, którzy go używali i wprowadzali
76 nowe pomysły. Zbyt wielu ich jest, aby dziękować każdemu z nich
77 osobno, ale bez ich wsparcia SWIG nie byłby ani tak potężnym
78 narzędziem, ani tak fajnym w użyciu jak jest teraz. Wiekie dzięki!
80 %description -l pt_BR.UTF-8
81 O SWIG gera interfaces para perl, python e Tcl a partir de uma arquivo
82 com uma interface de descrição que consiste de uma combinação de C/C++
83 e diretivas especiais. Permite que linguagens tipo script usem C/C++
84 com um mínimo de esforço.
87 Summary: SWIG library: guile
88 Summary(pl.UTF-8): Biblioteka SWIG: guile
91 Requires: %{name} = %{version}-%{release}
96 %description guile -l pl.UTF-8
97 Biblioteka SWIG: guile.
100 Summary: SWIG library: Perl
101 Summary(pl.UTF-8): Biblioteka SWIG: Perl
104 Requires: %{name} = %{version}-%{release}
109 %description perl -l pl.UTF-8
110 Biblioteka SWIG: perl.
113 Summary: SWIG library: php
114 Summary(pl.UTF-8): Biblioteka SWIG: php
117 Requires: %{name} = %{version}-%{release}
122 %description php -l pl.UTF-8
123 Biblioteka SWIG: php.
126 Summary: SWIG library: python
127 Summary(pl.UTF-8): Biblioteka SWIG: python
130 Requires: %{name} = %{version}-%{release}
133 SWIG library: python.
135 %description python -l pl.UTF-8
136 Biblioteka SWIG: python.
139 Summary: SWIG library: ruby
140 Summary(pl.UTF-8): Biblioteka SWIG: ruby
143 Requires: %{name} = %{version}-%{release}
144 %{?ruby_mod_ver_requires_eq}
149 %description ruby -l pl.UTF-8
150 Biblioteka SWIG: ruby.
153 Summary: SWIG library: tcl
154 Summary(pl.UTF-8): Biblioteka SWIG: tcl
157 Requires: %{name} = %{version}-%{release}
162 %description tcl -l pl.UTF-8
163 Biblioteka SWIG: tcl.
170 %{__aclocal} -I Tools/config
179 rm -rf $RPM_BUILD_ROOT
180 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_examplesdir}/%{name}-%{version}}
183 DESTDIR=$RPM_BUILD_ROOT \
184 M4_INSTALL_DIR=$RPM_BUILD_ROOT%{_aclocaldir}
186 cp -a Examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
189 rm -rf $RPM_BUILD_ROOT
192 %defattr(644,root,root,755)
193 %doc ANNOUNCE CHANGES CHANGES.current COPYRIGHT LICENSE LICENSE-UNIVERSITIES README RELEASENOTES TODO Doc
194 %attr(755,root,root) %{_bindir}/ccache-swig
195 %attr(755,root,root) %{_bindir}/swig
196 %dir %{_datadir}/%{name}
197 %dir %{_datadir}/%{name}/%{version}
198 %{_datadir}/%{name}/%{version}/*.i
199 %{_datadir}/%{name}/%{version}/allkw.swg
200 %{_datadir}/%{name}/%{version}/director_common.swg
201 %{_datadir}/%{name}/%{version}/runtime.swg
202 %{_datadir}/%{name}/%{version}/swig*.swg
203 %{_datadir}/%{name}/%{version}/allegrocl
204 %{_datadir}/%{name}/%{version}/cffi
205 %{_datadir}/%{name}/%{version}/chicken
206 %{_datadir}/%{name}/%{version}/clisp
207 %{_datadir}/%{name}/%{version}/csharp
208 %{_datadir}/%{name}/%{version}/d
209 %{_datadir}/%{name}/%{version}/gcj
210 %{_datadir}/%{name}/%{version}/go
211 %{_datadir}/%{name}/%{version}/java
212 %dir %{_datadir}/%{name}/%{version}/javascript
213 %{_datadir}/%{name}/%{version}/javascript/jsc
214 %{_datadir}/%{name}/%{version}/javascript/v8
215 %{_datadir}/%{name}/%{version}/lua
216 %{_datadir}/%{name}/%{version}/modula3
217 %{_datadir}/%{name}/%{version}/mzscheme
218 %{_datadir}/%{name}/%{version}/ocaml
219 %{_datadir}/%{name}/%{version}/octave
220 %{_datadir}/%{name}/%{version}/pike
221 %{_datadir}/%{name}/%{version}/r
222 %{_datadir}/%{name}/%{version}/scilab
223 %{_datadir}/%{name}/%{version}/std
224 %{_datadir}/%{name}/%{version}/typemaps
225 %{_datadir}/%{name}/%{version}/uffi
226 %{_examplesdir}/%{name}-%{version}
230 %defattr(644,root,root,755)
231 %{_datadir}/%{name}/%{version}/guile
236 %defattr(644,root,root,755)
237 %{_datadir}/%{name}/%{version}/perl5
242 %defattr(644,root,root,755)
243 %{_datadir}/%{name}/%{version}/php
247 %defattr(644,root,root,755)
248 %{_datadir}/%{name}/%{version}/python
252 %defattr(644,root,root,755)
253 %{_datadir}/%{name}/%{version}/ruby
258 %defattr(644,root,root,755)
259 %{_datadir}/%{name}/%{version}/tcl