Blob Blame History Raw
Summary:        Create interfaces to interpreted languages for templated code
Name:           CableSwig
Version:        3.20.0
Release:        11%{?dist}
License:        BSD
Group:          Development/Libraries
URL:            http://www.itk.org/ITK/resources/CableSwig.html
Source0:        http://download.sourceforge.net/project/itk/itk/3.20/CableSwig-ITK-3.20.0.tar.gz
Patch0:		CableSwig-Remove-bundled-expat.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  cmake
BuildRequires:  gccxml
BuildRequires:  expat-devel
BuildRequires:  python-devel
BuildRequires:  tcl-devel
BuildRequires:  tk-devel

Requires: gccxml

%description
CableSwig is used to create interfaces (i.e. "wrappers") to interpreted
languages such as Tcl and Python. It was created to produce wrappers for ITK
because the toolkit uses C++ structures that SWIG cannot parse (deeply nested
template instantiations). CableSwig is a combination tool that uses  GCC_XML as
the c++ parser. The input files are  Cable style input files. The XML produced
from the Cable/GCC_XML input files are then parsed and feed into a modified
version of  SWIG. SWIG is a software development tool that connects programs
written in C and C++ with a variety of high-level programming languages. It is
used to generate the language bindings to the target language. Currently, Tcl
and Python are supported.

%prep
%setup -q
rm -rf Cable/Expat
rm -rf GCC
rm -rf GCC_XML
%patch0 -p1 -b .expat

#Fix spurious executable permissions:
chmod 644 SWIG/Source/Modules/ocaml.cxx
chmod 644 Executables/CableSwig.h
chmod 644 Executables/CableSwig.cxx
chmod 644 Executables/cableidx.cxx
chmod 644 Executables/cableSwigMain.cxx

%build
%cmake -DCMAKE_BUILD_TYPE:STRING=Release \
       -DCMAKE_VERBOSE_MAKEFILE=ON \
       -DBUILD_TESTING=ON . \
       -DCSWIG_USE_SYSTEM_GCCXML=yes

make %{?_smp_mflags}


%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}

mkdir -p %{buildroot}%{_datadir}/CableSwig/
# Move SWIGLib files:
mv %{buildroot}/usr/lib/CableSwig/SWIGLib %{buildroot}%{_datadir}/CableSwig/
# Move CableSwig CMake conf:
mv %{buildroot}/usr/lib/CableSwig/CableSwigConfig.cmake %{buildroot}%{_datadir}/CableSwig/

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%{_bindir}/*
%{_datadir}/CableSwig

%changelog
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.20.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Fri Jun 06 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.20.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Fri Aug 02 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.20.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.20.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.20.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.20.0-6
- Rebuilt for c++ ABI breakage

* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.20.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.20.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Sep 22 2010 Mario Ceresa <mrceresa@gmail.com> - 3.20.0-3
- Thanks to Peter Lemenkov for:
a) Removed bundled libraries GCC and GCC-XML
b) Cleaned up the spec files
c) Re-enabled the cmake verbose makefile switch
d) Provided patch to remove Cable/expat utilities
e) Figured out the correct BuildRequires
f) Fixed spurious executable permissions

* Sat Sep 18 2010 Mario Ceresa <mrceresa@gmail.com> - 3.20.0-2
- Removed "dist" tag from changelog entries

* Wed Sep 17 2010 Mario Ceresa <mrceresa@gmail.com> - 3.20.0-1
- Updated to 3.20 release
- Removed -ITK suffix from name as upstream refer to the package without it

* Tue Mar 30 2010 Mario Ceresa <mrceresa@gmail.com> - 3.16.0-3
- Fixed install paths

* Wed Mar 03 2010 Mario Ceresa <mrceresa@gmail.com> - 3.16.0-2
- Updated to 3.16 release

* Fri Nov 20 2009 Mario Ceresa <mrceresa@gmail.com> - cvs20091120-1
- Initial RPM Release