2015-12-30 13:32:33 +01:00
#
# spec file for package insighttoolkit
#
2020-05-29 08:34:10 +02:00
# Copyright (c) 2020 SUSE LLC
2016-10-04 16:56:08 +02:00
# Copyright (c) 2016 Angelos Tzotsos <tzotsos@opensuse.org>.
2015-12-30 13:32:33 +01:00
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
2020-05-29 08:34:10 +02:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
2016-01-01 12:16:16 +01:00
#
2015-12-30 13:32:33 +01:00
2020-05-29 08:34:10 +02:00
%global __builder ninja
2015-12-30 13:32:33 +01:00
%define tarname InsightToolkit
2020-07-01 06:31:08 +02:00
%define baseversion 5.1
2020-05-29 08:34:10 +02:00
%define libname lib%{name}5
2015-12-30 13:32:33 +01:00
Name : insighttoolkit
2020-07-01 06:31:08 +02:00
Version : 5.1.0
2016-01-01 12:16:16 +01:00
Release : 0
2020-07-01 06:31:08 +02:00
Summary : Toolkit for scientific image processing, segmentation, and registration
2020-07-16 13:52:52 +02:00
# NON-FREE FILES IN Modules/ThirdParty/VNL/src/vxl/v3p/netlib/ NOT USED BY ITK AND REMOVED BY Patch4
# SEE NOTICE file, https://github.com/InsightSoftwareConsortium/ITK/pull/1913, and https://github.com/InsightSoftwareConsortium/ITK/pull/1920
2016-01-01 12:16:16 +01:00
License : Apache-2.0
2020-05-29 08:34:10 +02:00
URL : https://www.itk.org
Source : https://github.com/InsightSoftwareConsortium/ITK/releases/download/v%{version} /%{tarname} -%{version} .tar.gz
2020-07-01 06:31:08 +02:00
# PATCH-FIX-UPSTREAM proper linking against math library [gh#InsightSoftwareConsortium/ITK#1867, gh#InsightSoftwareConsortium/ITK#1878]
2019-07-02 16:46:32 +02:00
Patch1 : nrrdio-linking.patch
2020-07-01 06:31:08 +02:00
# PATCH-FIX-UPSTREAM proper linking against math library [gh#InsightSoftwareConsortium/ITK#1867, gh#InsightSoftwareConsortium/ITK#1878]
2019-07-02 16:46:32 +02:00
Patch3 : itklbfgs-linking.patch
2020-07-16 13:52:52 +02:00
# PATCH-FIX-UPSTREAM insighttoolkit-drop-netlib-triangle-files.patch [gh#InsightSoftwareConsortium/ITK#1913] badshah400@gmail.com -- Drop netlib triangle files and any linking to them due to licensing issues; patch from upstream
Patch4 : insighttoolkit-drop-netlib-triangle-files.patch
2020-07-31 11:27:01 +02:00
# PATCH-FIX-OPENSUSE reproducible.patch boo#1100677 gh#InsightSoftwareConsortium/ITK#1939
2020-07-31 11:25:43 +02:00
Patch100 : reproducible.patch
2020-05-29 08:34:10 +02:00
BuildRequires : CastXML-devel
2020-07-01 06:31:08 +02:00
BuildRequires : bison
2020-05-29 08:34:10 +02:00
BuildRequires : cmake
2016-01-01 12:16:16 +01:00
BuildRequires : dcmtk-devel
BuildRequires : fdupes
2015-12-30 13:32:33 +01:00
BuildRequires : fftw3-threads-devel
2016-01-01 12:16:16 +01:00
BuildRequires : gcc-c++
2020-05-29 08:34:10 +02:00
BuildRequires : gdcm-devel
BuildRequires : gtest
2015-12-30 13:32:33 +01:00
BuildRequires : hdf5-devel
2020-05-29 08:34:10 +02:00
BuildRequires : libnsl-devel
BuildRequires : ninja
BuildRequires : pkgconfig
BuildRequires : python3-devel
2016-01-01 12:16:16 +01:00
BuildRequires : swig
BuildRequires : vtk-devel
2020-05-29 08:34:10 +02:00
BuildRequires : vtk-qt
2016-01-01 12:16:16 +01:00
BuildRequires : xz
2020-05-29 08:34:10 +02:00
BuildRequires : cmake(double-conversion)
BuildRequires : pkgconfig(eigen3)
BuildRequires : pkgconfig(expat)
BuildRequires : pkgconfig(fftw3)
BuildRequires : pkgconfig(libjpeg)
2020-07-01 06:31:08 +02:00
BuildRequires : pkgconfig(libpcrecpp)
2020-05-29 08:34:10 +02:00
BuildRequires : pkgconfig(libpng)
BuildRequires : pkgconfig(libtiff-4)
BuildRequires : pkgconfig(libxml-2.0)
BuildRequires : pkgconfig(zlib)
2015-12-30 13:32:33 +01:00
%description
2020-07-01 06:31:08 +02:00
The Insight Toolkit (ITK) is a toolkit for N-dimensional scientific
image processing, segmentation, and registration.
2015-12-30 13:32:33 +01:00
%package devel
Summary : Development files for ITK
2020-05-29 08:34:10 +02:00
Requires : %{libname} = %{version}
2016-01-01 12:16:16 +01:00
Requires : dcmtk-devel
2020-07-01 06:31:08 +02:00
Requires : double-conversion-devel
2015-12-30 13:32:33 +01:00
Requires : fftw3-threads-devel
Requires : hdf5-devel
2016-01-01 12:16:16 +01:00
Requires : vtk-devel
2020-07-01 06:31:08 +02:00
Requires : pkgconfig(expat)
Requires : pkgconfig(fftw3)
Requires : pkgconfig(libjpeg)
Requires : pkgconfig(libpcrecpp)
Requires : pkgconfig(libpng)
Requires : pkgconfig(libtiff-4)
Requires : pkgconfig(libxml-2.0)
Requires : pkgconfig(zlib)
2015-12-30 13:32:33 +01:00
Provides : lib%{name} -devel
%description devel
2020-07-01 06:31:08 +02:00
The Insight Toolkit (ITK) is a toolkit for N-dimensional scientific
image processing, segmentation, and registration.
This package provides development files for the ITK library.
2015-12-30 13:32:33 +01:00
2020-05-29 08:34:10 +02:00
%package -n %{libname}
2020-07-01 06:31:08 +02:00
Summary : Toolkit for scientific image processing, segmentation, and registration
2015-12-30 13:32:33 +01:00
2020-05-29 08:34:10 +02:00
%description -n %{libname}
2020-07-01 06:31:08 +02:00
The Insight Toolkit (ITK) is a toolkit for N-dimensional scientific
image processing, segmentation, and registration.
This package provides shared libraries for ITK.
2015-12-30 13:32:33 +01:00
2020-05-29 08:34:10 +02:00
%package -n python3-itk
2020-07-01 06:31:08 +02:00
Summary : Python bindings for ITK
Requires : python3-numpy
2020-05-29 08:34:10 +02:00
%description -n python3-itk
2020-07-01 06:31:08 +02:00
The Insight Toolkit (ITK) is a toolkit for N-dimensional scientific
image processing, segmentation, and registration.
This package provides the modules for ITK's python bindings.
2020-05-29 08:34:10 +02:00
2015-12-30 13:32:33 +01:00
%prep
2020-07-01 06:31:08 +02:00
%autosetup -p1 -n %{tarname} -%{version}
2015-12-30 13:32:33 +01:00
%build
2020-05-29 08:34:10 +02:00
2020-07-01 06:31:08 +02:00
# Enabling BUILD_TESTING requires KWStyle, not available for openSUSE
2016-01-01 12:16:16 +01:00
%cmake \
2020-05-29 08:34:10 +02:00
-DITK_INSTALL_LIBRARY_DIR:PATH=%{_lib}/ \
-DITK_INSTALL_INCLUDE_DIR:PATH=include/%{name} / \
-DITK_INSTALL_PACKAGE_DIR:PATH=%{_lib}/cmake/%{name} / \
-DITK_INSTALL_RUNTIME_DIR:PATH=%{_bindir} \
-DITK_INSTALL_DOC_DIR=share/doc/packages/%{name} / \
2016-01-01 12:16:16 +01:00
-DBUILD_EXAMPLES:BOOL=ON \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DBUILD_TESTING:BOOL=OFF \
-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON \
-DITK_USE_FFTWD:BOOL=ON \
-DITK_USE_FFTWF:BOOL=ON \
2020-05-29 08:34:10 +02:00
-DITK_USE_SYSTEM_LIBRARIES:BOOL=ON \
-DITK_USE_SYSTEM_CASTXML:BOOL=ON \
2020-07-01 06:31:08 +02:00
-DITK_USE_SYSTEM_GDCM:BOOL=ON \
-DITK_USE_SYSTEM_SWIG:BOOL=ON \
2016-01-01 12:16:16 +01:00
-DITK_USE_SYSTEM_VXL:BOOL=OFF \
2020-07-16 13:52:52 +02:00
-DVXL_BUILD_CORE_NUMERICS:BOOL=OFF \
2016-01-01 12:16:16 +01:00
-DVCL_INCLUDE_CXX_0X:BOOL=ON \
2020-05-29 08:34:10 +02:00
-DITK_FORBID_DOWNLOADS=ON \
-DITK_WRAP_PYTHON:BOOL=ON
2015-12-30 13:32:33 +01:00
2020-05-29 08:34:10 +02:00
%cmake_build
2015-12-30 13:32:33 +01:00
%install
2016-01-01 12:16:16 +01:00
%cmake_install
2015-12-30 13:32:33 +01:00
2019-07-06 22:14:38 +02:00
%fdupes %{buildroot} /%{_prefix}
2015-12-30 13:32:33 +01:00
2020-05-29 08:34:10 +02:00
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
2015-12-30 13:32:33 +01:00
2020-05-29 08:34:10 +02:00
%files -n %{libname}
2020-07-16 13:52:52 +02:00
%license LICENSE NOTICE
2015-12-30 13:32:33 +01:00
%{_libdir} /*.so.1
%files devel
2020-07-16 13:52:52 +02:00
%license LICENSE NOTICE
2020-05-29 08:34:10 +02:00
%{_includedir} /%{name} /
2015-12-30 13:32:33 +01:00
%{_libdir} /lib*.so
%{_libdir} /cmake/
%{_bindir} /itkTestDriver
2020-05-29 08:34:10 +02:00
%doc %{_docdir} /%{name} /
%files -n python3-itk
2020-07-16 13:52:52 +02:00
%license LICENSE NOTICE
2020-05-29 08:34:10 +02:00
%{python3_sitearch} /*.py
%{python3_sitearch} /itk/
2015-12-30 13:32:33 +01:00
%changelog