3d0ec26
%define _ver_major      4
Mario Ceresa 49b5213
%define _ver_minor      4
Mario Ceresa 49b5213
%define _ver_release    0
3d0ec26
3d0ec26
%if 0%{?rhel} && 0%{?rhel} <= 5
3d0ec26
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
3d0ec26
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
3d0ec26
%endif
3d0ec26
3d0ec26
Name:           InsightToolkit
3d0ec26
Summary:        Insight Toolkit library for medical image processing
3d0ec26
Version:        %{_ver_major}.%{_ver_minor}.%{_ver_release}
Mario Ceresa 534a771
Release:        2%{?dist}
3d0ec26
License:        ASL 2.0 
3d0ec26
Group:          Applications/Engineering
3d0ec26
Source0:        http://sourceforge.net/projects/itk/files/itk/%{_ver_major}.%{_ver_minor}/%{name}-%{version}.tar.gz
3d0ec26
Source1:        http://downloads.sourceforge.net/project/itk/itk/2.4/ItkSoftwareGuide-2.4.0.pdf
3d0ec26
URL:            http://www.itk.org/
3d0ec26
Patch0:         %{name}-0001-Set-lib-lib64-according-to-the-architecture.patch
3d0ec26
3d0ec26
BuildRequires:  cmake
3d0ec26
BuildRequires:  doxygen
3d0ec26
BuildRequires:  fftw-devel
3d0ec26
BuildRequires:  gdcm-devel
3d0ec26
BuildRequires:  gccxml
3d0ec26
BuildRequires:  hdf5-devel
3d0ec26
BuildRequires:  libjpeg-devel
3d0ec26
BuildRequires:  libxml2-devel
3d0ec26
BuildRequires:  libpng-devel
3d0ec26
BuildRequires:  libtiff-devel
3d0ec26
BuildRequires:  libjpeg-devel
3d0ec26
BuildRequires:  graphviz
3d0ec26
BuildRequires:  python2-devel
3d0ec26
BuildRequires:  vxl-devel
3d0ec26
BuildRequires:  zlib-devel
Mario Ceresa 49b5213
BuildRequires:  vtk-devel
3d0ec26
3d0ec26
%description
3d0ec26
3d0ec26
ITK is an open-source software toolkit for performing registration and 
3d0ec26
segmentation. Segmentation is the process of identifying and classifying data
3d0ec26
found in a digitally sampled representation. Typically the sampled
3d0ec26
representation is an image acquired from such medical instrumentation as CT or
3d0ec26
MRI scanners. Registration is the task of aligning or developing 
3d0ec26
correspondences between data. For example, in the medical environment, a CT
3d0ec26
scan may be aligned with a MRI scan in order to combine the information
3d0ec26
contained in both.
3d0ec26
3d0ec26
ITK is implemented in C++ and its implementation style is referred to as 
3d0ec26
generic programming (i.e.,using templated code). Such C++ templating means
3d0ec26
that the code is highly efficient, and that many software problems are 
3d0ec26
discovered at compile-time, rather than at run-time during program execution.
3d0ec26
3d0ec26
%package        devel
3d0ec26
Summary:        Insight Toolkit
3d0ec26
Group:          Development/Libraries
3d0ec26
Requires:       %{name}%{?_isa} = %{version}-%{release}
Mario Ceresa 534a771
Requires:       vtk-devel%{?_isa}
3d0ec26
3d0ec26
%description devel
3d0ec26
3d0ec26
%{summary}.
3d0ec26
Install this if you want to develop applications that use ITK.
3d0ec26
3d0ec26
%package        examples
3d0ec26
Summary:        C++, Tcl and Python example programs/scripts for ITK
3d0ec26
Group:          Development/Languages
3d0ec26
Requires:       %{name}%{?_isa} = %{version}-%{release}
3d0ec26
3d0ec26
%description examples
3d0ec26
ITK examples
3d0ec26
3d0ec26
%package        doc
3d0ec26
Summary:        Documentation for ITK
3d0ec26
Group:          Documentation
3d0ec26
BuildArch:      noarch
3d0ec26
3d0ec26
%description    doc
3d0ec26
%{summary}.
3d0ec26
This package contains additional documentation.
3d0ec26
3d0ec26
# Hit bug http://www.gccxml.org/Bug/view.php?id=13372
3d0ec26
# We agreed with Mattias Ellert to postpone the bindings till
3d0ec26
# next gccxml update.
3d0ec26
#%package        python
3d0ec26
#Summary:        Documentation for ITK
3d0ec26
#Group:          Documentation
3d0ec26
#BuildArch:      noarch
3d0ec26
3d0ec26
#%description    python
3d0ec26
#%{summary}.
3d0ec26
#This package contains python bindings for ITK.
3d0ec26
3d0ec26
3d0ec26
%prep
3d0ec26
%setup -q
3d0ec26
%patch0 -p1
3d0ec26
3d0ec26
# copy guide into the appropriate directory
3d0ec26
cp -a %{SOURCE1} .
3d0ec26
3d0ec26
# remove applications: they are shipped separately now
3d0ec26
rm -rf Applications/
3d0ec26
3d0ec26
%build
3d0ec26
3d0ec26
mkdir -p %{_target_platform}
3d0ec26
pushd %{_target_platform}
3d0ec26
3d0ec26
%cmake .. \
3d0ec26
       -DBUILD_SHARED_LIBS:BOOL=ON \
3d0ec26
       -DBUILD_EXAMPLES:BOOL=ON \
3d0ec26
       -DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo"\
3d0ec26
       -DCMAKE_VERBOSE_MAKEFILE=ON\
3d0ec26
       -DBUILD_TESTING=ON\
3d0ec26
       -DITKV3_COMPATIBILITY:BOOL=ON \
3d0ec26
       -DITK_BUILD_ALL_MODULES:BOOL=ON \
Mario Ceresa 49b5213
       -DModule_ITKVtkGlue:BOOL=ON \
3d0ec26
       -DITK_WRAP_PYTHON:BOOL=OFF \
3d0ec26
       -DITK_WRAP_JAVA:BOOL=OFF \
3d0ec26
       -DBUILD_DOCUMENTATION:BOOL=OFF \
3d0ec26
       -DITK_USE_REVIEW:BOOL=ON \
3d0ec26
       -DITK_USE_SYSTEM_HDF5=ON \
3d0ec26
       -DITK_USE_SYSTEM_JPEG=ON \
3d0ec26
       -DITK_USE_SYSTEM_TIFF=ON \
3d0ec26
       -DITK_USE_SYSTEM_PNG=ON \
3d0ec26
       -DITK_USE_SYSTEM_ZLIB=ON \
3d0ec26
       -DITK_USE_SYSTEM_GDCM=ON \
3d0ec26
       -DITK_USE_SYSTEM_VXL=ON \
3d0ec26
       -DITK_USE_SYSTEM_SWIG=ON \
3d0ec26
       -DITK_USE_SYSTEM_GCCXML=ON \
d9204f3
       -DITK_INSTALL_LIBRARY_DIR=%{_lib}/ \
3d0ec26
       -DITK_INSTALL_INCLUDE_DIR=include/%{name} \
3d0ec26
       -DITK_INSTALL_PACKAGE_DIR=%{_lib}/cmake/%{name}/ \
3d0ec26
       -DITK_INSTALL_RUNTIME_DIR:PATH=%{_bindir} \
3d0ec26
       -DCMAKE_CXX_FLAGS:STRING="-fpermissive"
3d0ec26
3d0ec26
popd
3d0ec26
3d0ec26
make %{?_smp_mflags} -C %{_target_platform}
3d0ec26
3d0ec26
%install
3d0ec26
%make_install -C %{_target_platform}
3d0ec26
3d0ec26
# Install examples
3d0ec26
mkdir -p %{buildroot}%{_datadir}/%{name}/examples
3d0ec26
cp -ar Examples/* %{buildroot}%{_datadir}/%{name}/examples/
3d0ec26
3d0ec26
%check
3d0ec26
# There are a couple of tests randomly failing on f19 and rawhide and I'm debugging
3d0ec26
# it with upstream. Making the tests informative for now
3d0ec26
make test -C %{_target_platform} || exit 0
3d0ec26
3d0ec26
%post -p /sbin/ldconfig
3d0ec26
3d0ec26
%postun -p /sbin/ldconfig
3d0ec26
3d0ec26
%files
3d0ec26
%dir %{_datadir}/%{name}
d9204f3
%{_libdir}/*.so.*
d9204f3
%{_bindir}/itkTestDriver
3d0ec26
%doc LICENSE README.txt NOTICE
3d0ec26
3d0ec26
3d0ec26
%files devel
d9204f3
%{_libdir}/*.so
3d0ec26
%{_libdir}/cmake/%{name}/
3d0ec26
%{_includedir}/%{name}/
3d0ec26
3d0ec26
3d0ec26
%files examples
3d0ec26
%{_datadir}/%{name}/examples
d9204f3
3d0ec26
3d0ec26
%files doc
3d0ec26
%{_docdir}/%{name}-%{version}/
3d0ec26
%{_docdir}/ITK-%{_ver_major}.%{_ver_minor}/
3d0ec26
%doc ItkSoftwareGuide-2.4.0.pdf
3d0ec26
3d0ec26
3d0ec26
%changelog
Mario Ceresa 534a771
* Wed Jul 10 2013 Mario Ceresa mrceresa fedoraproject org 4.4.0-2
Mario Ceresa 534a771
- Devel package now requires vtk-devel because it is build with itkvtkglue mod
Mario Ceresa 534a771
- Minor cleanups
Mario Ceresa 534a771
Mario Ceresa 534a771
* Mon Jul 08 2013 Mario Ceresa mrceresa fedoraproject org 4.4.0-1
Mario Ceresa 49b5213
- Contributed by Sebastian Pölsterl <sebp@k-d-w.org>
Mario Ceresa 49b5213
- Updated to upstream version 4.4.0
Mario Ceresa 49b5213
- Add VTK Glue module
Mario Ceresa 49b5213
- Removed obsolete TIFF patch
Mario Ceresa 49b5213
9c7f19c
* Thu May 16 2013 Orion Poplawski <orion@cora.nwra.com> - 4.3.1-12
9c7f19c
- Rebuild for hdf5 1.8.11
9c7f19c
1724078
* Fri May 2 2013 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.3.1-11
Mario Ceresa 534a771
- Rebuilt for gdcm 2.3.2
1724078
d9204f3
* Fri Apr 26 2013 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.3.1-10
d9204f3
- Install itkTestDriver in default package
d9204f3
- Install libraries into _libdir and drop ldconfig file
d9204f3
3d0ec26
* Tue Apr 23 2013 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.3.1-9
3d0ec26
- Changed license to ASL 2.0
3d0ec26
3d0ec26
* Mon Apr 22 2013 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.3.1-8
3d0ec26
- Build examples
3d0ec26
- Making tests informative as we debug it with upstream
3d0ec26
- Fixed cmake support file location
3d0ec26
- Disabled python bindings for now, hit http://www.gccxml.org/Bug/view.php?id=13372
3d0ec26
3d0ec26
* Sat Apr 20 2013 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.3.1-7
3d0ec26
- Enabled v3.20 compatibility layer
3d0ec26
3d0ec26
* Thu Apr 18 2013 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.3.1-6
3d0ec26
- Removed unused patches
3d0ec26
3d0ec26
* Mon Apr 08 2013 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.3.1-5
3d0ec26
- Fixed failing tests
3d0ec26
3d0ec26
* Wed Apr 03 2013 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.3.1-4
3d0ec26
- Fixed build with USE_SYSTEM_TIFF
3d0ec26
3d0ec26
* Fri Mar 29 2013 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.3.1-3
3d0ec26
- Compiles against VXL with compatibility patches
3d0ec26
- Enabled testing
3d0ec26
3d0ec26
* Tue Feb 12 2013 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.3.1-2
3d0ec26
- Reorganized sections
3d0ec26
- Fixed patch naming
3d0ec26
- Removed buildroot and rm in install section
3d0ec26
- Removed cmake version constraint
3d0ec26
- Changed BR libjpeg-turbo-devel to libjpeg-devel
3d0ec26
- Preserve timestamp of SOURCE1 file.
3d0ec26
- Fixed main file section
3d0ec26
- Added noreplace
3d0ec26
3d0ec26
* Fri Jan 25 2013 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.3.1-1
3d0ec26
- Updated to 4.3.1
3d0ec26
- Fixed conflicts with previous patches
3d0ec26
- Dropped gcc from BR
3d0ec26
- Fixed tabs-vs-space
3d0ec26
- Improved description
3d0ec26
- Re-enabled system tiff
3d0ec26
- Clean up the spec
3d0ec26
- Sanitize use of dir macro
3d0ec26
- Re-organized docs
3d0ec26
- Fixed libdir and datadir ownership
3d0ec26
3d0ec26
* Wed Dec 12 2012 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.2.1-4
3d0ec26
- Included improvements to the spec file from Dan Vratil
3d0ec26
3d0ec26
* Tue Dec 4 2012 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.2.1-3
3d0ec26
- Build against system VXL
3d0ec26
3d0ec26
* Mon Nov 26 2012 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.2.1-2
3d0ec26
- Reorganized install paths
3d0ec26
3d0ec26
* Tue Nov 20 2012 Mario Ceresa mrceresa fedoraproject org InsightToolkit 4.2.1-1
3d0ec26
- Updated to new version
3d0ec26
3d0ec26
* Wed Nov 30 2011 Mario Ceresa mrceresa fedoraproject org InsightToolkit 3.20.1-1
3d0ec26
- Updated to new version
3d0ec26
- Added binary morphology code
3d0ec26
3d0ec26
* Fri May 27 2011 Mario Ceresa mrceresa fedoraproject org InsightToolkit 3.20.0-5
3d0ec26
- Added cstddef patch for gcc 4.6
3d0ec26
3d0ec26
* Mon Jan 24 2011 Mario Ceresa mrceresa@gmail.com InsightToolkit 3.20.0-4
3d0ec26
- Added the ld.so.conf file
3d0ec26
3d0ec26
* Mon Nov 22 2010 Mario Ceresa mrceresa@gmail.com InsightToolkit 3.20.0-3
3d0ec26
- Updated to 3.20 release
3d0ec26
- Added vxl utility and review material
3d0ec26
- Applied patch from upstream to fix vtk detection (Thanks to Mathieu Malaterre)
3d0ec26
- Added patch to install in the proper lib dir based on arch value
3d0ec26
- Added patch to set datadir as cmake configuration files dir
3d0ec26
3d0ec26
* Sun Dec  6 2009 Mario Ceresa mrceresa@gmail.com InsightToolkit 3.16.0-2
3d0ec26
- Fixed comments from revision: https://bugzilla.redhat.com/show_bug.cgi?id=539387#c8
3d0ec26
3d0ec26
* Tue Nov 17 2009 Mario Ceresa mrceresa@gmail.com InsightToolkit 3.16.0-1
3d0ec26
- Initial RPM Release
3d0ec26
3d0ec26