2015-12-30 13:32:33 +01:00
#
# spec file for package insighttoolkit
#
2022-02-04 02:29:26 +01:00
# Copyright (c) 2022 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
2020-09-04 20:52:37 +02:00
%define tarname ITK
2022-04-28 08:51:43 +02:00
%define libname lib%{name}5_2-1
2020-05-29 08:34:10 +02:00
2022-02-04 02:29:26 +01:00
# Do not use system eigen on aarch64 until fixed upstream:
# https://github.com/InsightSoftwareConsortium/ITK/issues/2903
%ifarch aarch64
%bcond_with system_eigen
%else
%bcond_without system_eigen
%endif
2022-09-01 03:29:08 +02:00
# Python bindings must be turned off until https://github.com/InsightSoftwareConsortium/ITK/issues/3506 is resolved
%if 0%{?suse_version} >= 1550
%bcond_with python
%else
%bcond_without python
%endif
2015-12-30 13:32:33 +01:00
Name : insighttoolkit
2021-08-18 10:43:05 +02:00
Version : 5.2.1
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
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
2020-09-04 20:52:37 +02:00
Source : https://github.com/InsightSoftwareConsortium/ITK/archive/v%{version} .tar.gz#/%{name}-%{version}.tar.gz
2022-09-01 03:29:08 +02:00
# PATCH-FIX-UPSTREAM insighttoolkit-fno-sized-deallocation.patch gh#InsightSoftwareConsortium/ITK#3452 badshah400@gmail.com -- Add -fno-sized-deallocation for GCC 12 to fix build failures; patch taken from upstream commit
Patch0 : https://github.com/InsightSoftwareConsortium/ITK/commit/8f5e2618c2dee584e53ad13899384af82fbb77d9.patch#/insighttoolkit-fno-sized-deallocation.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
2016-01-01 12:16:16 +01:00
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(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)
2021-05-17 13:05:58 +02:00
# https://github.com/InsightSoftwareConsortium/ITK/issues/2529
ExcludeArch : %{ix86}
2022-09-01 03:29:08 +02:00
%if %{with python}
BuildRequires : python3-devel
BuildRequires : swig
%endif
%if %{with system_eigen}
BuildRequires : pkgconfig(eigen3)
%endif
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
2022-04-28 08:51:43 +02:00
Requires : %{libname} = %{version} -%{release}
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
2022-04-28 08:51:43 +02:00
Conflicts : libinsighttoolkit5
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-09-04 20:52:37 +02:00
# Tests disabled because no KWStyle pkg 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 \
2022-02-04 02:29:26 +01:00
%if %{without system_eigen}
-DITK_USE_SYSTEM_EIGEN:BOOL=OFF \
%endif
2020-07-01 06:31:08 +02:00
-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 \
2022-09-01 03:29:08 +02:00
-DITK_WRAP_PYTHON:BOOL=%{?with_python:ON}%{!?with_python:OFF}
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} /
2022-09-01 03:29:08 +02:00
%if %{with python}
2020-05-29 08:34:10 +02:00
%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/
2022-09-01 03:29:08 +02:00
%endif
2015-12-30 13:32:33 +01:00
%changelog