|
@@ -1,56 +1,126 @@
|
|
-Summary: Simplified Wrapper and Interface Generator
|
|
|
|
|
|
+%define tcl 0
|
|
|
|
+%define guile 0
|
|
|
|
+
|
|
|
|
+Summary: Connects C/C++/Objective C to some high-level programming languages
|
|
|
|
+Summary(ja): Connects C/C++/Objective C to some high-level programming languages
|
|
Name: swig
|
|
Name: swig
|
|
-Version: 1.3.40
|
|
|
|
-Release: 2%{_dist_release}
|
|
|
|
-URL: http://swig.sourceforge.net/
|
|
|
|
-Source0: http://prdownloads.sourceforge.net/swig/%{name}-%{version}.tar.gz
|
|
|
|
-License: BSD
|
|
|
|
|
|
+Version: 2.0.4
|
|
|
|
+Release: 1%{?_dist_release}
|
|
|
|
+License: GPLv3+ and BSD
|
|
Group: Development/Tools
|
|
Group: Development/Tools
|
|
-BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
|
|
|
-#BuildPreReq: guile-devel
|
|
|
|
-#BuildPreReq: python-devel
|
|
|
|
|
|
+URL: http://swig.sourceforge.net/
|
|
|
|
+Source: http://downloads.sourceforge.net/project/swig/swig/swig-%{version}/swig-%{version}.tar.gz
|
|
|
|
+Patch1: swig-1.3.23-pylib.patch
|
|
|
|
+Patch4: swig203-rh706140.patch
|
|
|
|
+
|
|
|
|
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
|
|
|
+BuildRequires: perl, python-devel, pcre-devel
|
|
|
|
+%if %{tcl}
|
|
|
|
+BuildRequires: tcl-devel
|
|
|
|
+%endif
|
|
|
|
+%if %{guile}
|
|
BuildRequires: guile-devel
|
|
BuildRequires: guile-devel
|
|
-BuildRequires: python-devel
|
|
|
|
|
|
+%endif
|
|
|
|
+BuildRequires: autoconf, automake, gawk, nkf
|
|
Obsoletes: swig-runtime
|
|
Obsoletes: swig-runtime
|
|
|
|
|
|
%description
|
|
%description
|
|
-SWIG is a software development tool that connects programs written in C and C++
|
|
|
|
-with a variety of high-level programming languages. SWIG is primarily used with
|
|
|
|
-common scripting languages such as Perl, Python, Tcl/Tk, and Ruby, however the
|
|
|
|
-list of supported languages also includes non-scripting languages such as Java,
|
|
|
|
-OCAML and C#. Also several interpreted and compiled Scheme implementations
|
|
|
|
-(Guile, MzScheme, Chicken) are supported. SWIG is most commonly used to create
|
|
|
|
-high-level interpreted or compiled programming environments, user interfaces,
|
|
|
|
-and as a tool for testing and prototyping C/C++ software. SWIG can also export
|
|
|
|
-its parse tree in the form of XML and Lisp s-expressions.
|
|
|
|
|
|
+Simplified Wrapper and Interface Generator (SWIG) is a software
|
|
|
|
+development tool for connecting C, C++ and Objective C programs with a
|
|
|
|
+variety of high-level programming languages. SWIG is primarily used
|
|
|
|
+with Perl, Python and Tcl/TK, but it has also been extended to Java,
|
|
|
|
+Eiffel and Guile. SWIG is normally used to create high-level
|
|
|
|
+interpreted programming environments, systems integration, and as a
|
|
|
|
+tool for building user interfaces
|
|
|
|
+
|
|
|
|
+%package doc
|
|
|
|
+Summary: Documentation files for SWIG
|
|
|
|
+Summary(ja): Documentation files for SWIG
|
|
|
|
+License: BSD
|
|
|
|
+Group: Development/Tools
|
|
|
|
+BuildArch: noarch
|
|
|
|
|
|
|
|
+%description doc
|
|
|
|
+This package contains documentation for SWIG and useful examples
|
|
|
|
|
|
%prep
|
|
%prep
|
|
-%setup -q
|
|
|
|
|
|
+%setup -q -n swig-%{version}
|
|
|
|
+%patch1 -p1 -b .pylib
|
|
|
|
+%patch4 -p1 -b .rh706140
|
|
|
|
+
|
|
|
|
+# as written on https://fedoraproject.org/wiki/Packaging_talk:Perl, section 2
|
|
|
|
+# (specific req/prov filtering). Before you remove this hack make sure you don't
|
|
|
|
+# reintroduce https://bugzilla.redhat.com/show_bug.cgi?id=489421
|
|
|
|
+cat << \EOF > %{name}-prov
|
|
|
|
+#!/bin/sh
|
|
|
|
+%{__perl_provides} `perl -p -e 's|\S+%{_docdir}/%{name}-doc-%{version}\S+||'`
|
|
|
|
+EOF
|
|
|
|
+
|
|
|
|
+%define __perl_provides %{_builddir}/%{name}-%{version}/%{name}-prov
|
|
|
|
+chmod +x %{__perl_provides}
|
|
|
|
+
|
|
|
|
+cat << \EOF > %{name}-req
|
|
|
|
+#!/bin/sh
|
|
|
|
+%{__perl_requires} `perl -p -e 's|\S+%{_docdir}/%{name}-doc-%{version}\S+||'`
|
|
|
|
+EOF
|
|
|
|
+
|
|
|
|
+%define __perl_requires %{_builddir}/%{name}-%{version}/%{name}-req
|
|
|
|
+chmod +x %{__perl_requires}
|
|
|
|
+
|
|
|
|
+for all in CHANGES README; do
|
|
|
|
+ iconv -f ISO88591 -t UTF8 < $all > $all.new
|
|
|
|
+ touch -r $all $all.new
|
|
|
|
+ mv -f $all.new $all
|
|
|
|
+done
|
|
|
|
|
|
%build
|
|
%build
|
|
|
|
+./autogen.sh
|
|
%configure
|
|
%configure
|
|
-%__make %{?_smp_mflags}
|
|
|
|
|
|
+make %{?_smp_mflags}
|
|
|
|
+
|
|
|
|
+# Test suite is currently broken
|
|
|
|
+#make check
|
|
|
|
|
|
%install
|
|
%install
|
|
rm -rf %{buildroot}
|
|
rm -rf %{buildroot}
|
|
-make install DESTDIR=%{buildroot}
|
|
|
|
|
|
|
|
|
|
+pushd Examples/
|
|
|
|
+# Remove all arch dependent files in Examples/
|
|
|
|
+find -type f -name 'Makefile.in' | xargs rm -f --
|
|
|
|
+
|
|
|
|
+# We don't want to ship files below.
|
|
|
|
+rm -rf test-suite
|
|
|
|
+find -type f -name '*.dsp' | xargs rm -f --
|
|
|
|
+find -type f -name '*.dsw' | xargs rm -f --
|
|
|
|
+
|
|
|
|
+# Convert files to UNIX format
|
|
|
|
+for all in `find -type f`; do
|
|
|
|
+ nkf --unix $all
|
|
|
|
+ chmod -x $all
|
|
|
|
+done
|
|
|
|
+popd
|
|
|
|
+
|
|
|
|
+make DESTDIR=%{buildroot} install
|
|
|
|
|
|
%clean
|
|
%clean
|
|
rm -rf %{buildroot}
|
|
rm -rf %{buildroot}
|
|
|
|
|
|
-
|
|
|
|
%files
|
|
%files
|
|
-%defattr(-,root,root)
|
|
|
|
-%doc ANNOUNCE CHANGES FUTURE README LICENSE NEW TODO
|
|
|
|
-%doc Doc/*
|
|
|
|
|
|
+%defattr(-,root,root,-)
|
|
%{_bindir}/*
|
|
%{_bindir}/*
|
|
%{_datadir}/swig
|
|
%{_datadir}/swig
|
|
-%{_mandir}/man*/*
|
|
|
|
|
|
+%{_mandir}/man1/ccache-swig.1*
|
|
|
|
+%doc ANNOUNCE CHANGES CHANGES.current INSTALL LICENSE LICENSE-GPL
|
|
|
|
+%doc LICENSE-UNIVERSITIES COPYRIGHT README TODO
|
|
|
|
+
|
|
|
|
+%files doc
|
|
|
|
+%defattr(-,root,root,-)
|
|
|
|
+%doc Doc Examples LICENSE LICENSE-GPL LICENSE-UNIVERSITIES COPYRIGHT
|
|
|
|
|
|
|
|
+%changelog
|
|
|
|
+* Sat Oct 29 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.0.4-1
|
|
|
|
+- update to 2.0.4
|
|
|
|
|
|
-%changelog
|
|
|
|
* Tue Mar 02 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.3.40-2
|
|
* Tue Mar 02 2010 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.3.40-2
|
|
- add missing man file(s) to the filelist
|
|
- add missing man file(s) to the filelist
|
|
|
|
|