3 %bcond_without guile # disable guile support
4 %bcond_without ocaml # disable ocaml support
5 %bcond_without perl # disable perl support
6 %bcond_without php # disable php support
7 %bcond_without ruby # disable ruby support
8 %bcond_without tcl # disable tcl support
10 Summary: Interface generator for Perl, Tcl, Guile and Python
11 Summary(pl): Generator interfejsów do Perla, Tcl-a, Guile'a i Pythona
12 Summary(pt_BR): Gerador de Interfaces e "Wrappers" Simplificado (SWIG)
16 License: distributable
17 Group: Development/Languages
18 Source0: http://dl.sourceforge.net/swig/%{name}-%{version}.tar.gz
19 # Source0-md5: c5fc655dbbb6fe0cfab2211747dadbe0
20 Patch0: %{name}-format.patch
21 Patch1: %{name}-php.patch
22 Patch2: %{name}-php-tsrm.patch
23 Patch3: %{name}-php-freearg.patch
24 Patch4: %{name}-php-vdecl.patch
25 Patch5: %{name}-python-lib64.patch
26 URL: http://www.swig.org/
28 BuildRequires: autoconf
29 BuildRequires: automake
30 %{?with_guile:BuildRequires: guile-devel}
31 BuildRequires: libstdc++-devel
32 BuildRequires: libtool
33 %{?with_ocaml:BuildRequires: ocaml}
34 %{?with_perl:BuildRequires: perl-devel >= 1:5.6.1}
35 %{?with_php:BuildRequires: php-devel >= 4.1.0}
36 %{?with_php:BuildRequires: php-cli}
37 BuildRequires: python-devel >= 1:2.3.2
38 %{?with_ruby:BuildRequires: ruby-devel >= 1:1.6.3}
39 %{?with_tcl:BuildRequires: tcl-devel >= 8.3.3}
44 Obsoletes: swig-python
47 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50 SWIG is a compiler that attempts to make it easy to integrate C, C++,
51 or Objective-C code with scripting languages including Perl, Tcl, and
52 Python. In a nutshell, you give it a bunch of ANSI C/C++ declarations
53 and it generates an interface between C and your favorite scripting
54 language. However, this is only scratching the surface of what SWIG
55 can do--some of its more advanced features include automatic
56 documentation generation, module and library management, extensive
57 customization options, and more.
59 SWIG is entirely the product of users who have used the system and
60 suggested new idea. There are far too many people to thank
61 individually, but without this support, SWIG would be not be nearly as
62 powerful or fun to use as it is now. Many thanks!
65 SWIG jesk kompilatorem, który próbuje u³atwiæ integrowanie kodu
66 napisanego w C, C++ lub Objective-C z jêzykami skryptowymi, takimi jak
67 Perl, Tcl i Python. Mówi±c najpro¶ciej, je¶li dostarczysz mu zestaw
68 zadeklarowanych w ANSI C/C++ funkcji, SWIG wygeneruje Ci interfejs
69 pomiêdzy C a Twoim ulubionym jêzykiem skryptowym. To tylko drobna
70 czê¶æ tego co SWIG potrafi robiæ, bardziej zaawansowane zastosowania
71 to automatyczne generowanie dokumentacji, zarz±dzanie bibliotekami i
72 modu³ami i wiele innych.
74 SWIG jest w ca³o¶ci dzie³em ludzi, którzy go u¿ywali i wprowadzali
75 nowe pomys³y. Zbyt wielu ich jest, aby dziêkowaæ ka¿demu z nich
76 osobno, ale bez ich wsparcia SWIG nie by³by ani tak potê¿nym
77 narzêdziem, ani tak fajnym w u¿yciu jak jest teraz. Wiekie dziêki!
80 O SWIG gera interfaces para perl, python e Tcl a partir de uma arquivo
81 com uma interface de descrição que consiste de uma combinação de C/C++
82 e diretivas especiais. Permite que linguagens tipo script usem C/C++
83 com um mínimo de esforço.
86 %setup -q -n SWIG-%{version}
92 %if "%{_lib}" == "lib64"
98 %{__aclocal} -I Tools/config
107 rm -rf $RPM_BUILD_ROOT
108 install -d $RPM_BUILD_ROOT{%{_mandir}/man1,%{_examplesdir}/%{name}-%{version}}
111 DESTDIR=$RPM_BUILD_ROOT \
112 M4_INSTALL_DIR=$RPM_BUILD_ROOT%{_aclocaldir}
114 cp -a Examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
117 rm -rf $RPM_BUILD_ROOT
119 %post -p /sbin/ldconfig
120 %postun -p /sbin/ldconfig
123 %defattr(644,root,root,755)
124 %doc Doc CHANGES NEW README ANNOUNCE TODO LICENSE
125 %attr(755,root,root) %{_bindir}/swig
126 %{_examplesdir}/%{name}-%{version}