Accepting request 821295 from Application:Geo

OBS-URL: https://build.opensuse.org/request/show/821295
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/insighttoolkit?expand=0&rev=2
This commit is contained in:
Dominique Leuenberger 2020-07-24 07:54:16 +00:00 committed by Git OBS Bridge
commit be51fb962a
10 changed files with 20223 additions and 529 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:dabe05234d24635c96fd9b1a5f5e3afc34e11f49a31e5107db19bf61da758fa5
size 12424136

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:121020a1611508cec8123eb5226215598cec07be627d843a2e6b6da891e61d13
size 20694338

View File

@ -1,7 +1,10 @@
<constraints>
<hardware>
<disk>
<size unit="G">6</size>
<size unit="G">24</size>
</disk>
<physicalmemory>
<size unit="G">2</size>
</physicalmemory>
</hardware>
</constraints>

View File

@ -1,21 +0,0 @@
diff -ur InsightToolkit-4.13.2/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_compiler.h InsightToolkit-4.13.2_fix/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_compiler.h
--- InsightToolkit-4.13.2/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_compiler.h 2019-07-02 15:24:20.401356209 +0200
+++ InsightToolkit-4.13.2_fix/Modules/ThirdParty/VNL/src/vxl/vcl/vcl_compiler.h 2019-07-02 15:25:33.639041143 +0200
@@ -97,6 +97,17 @@
# else
# define VCL_GCC_80
# endif
+# elif (__GNUC__==9)
+# define VCL_GCC_9
+# if (__GNUC_MINOR__ > 2 )
+# define VCL_GCC_93
+# elif (__GNUC_MINOR__ > 1 )
+# define VCL_GCC_92
+# elif (__GNUC_MINOR__ > 0 )
+# define VCL_GCC_91
+# else
+# define VCL_GCC_90
+# endif
# else
# error "Dunno about this gcc"
# endif

View File

@ -1,386 +0,0 @@
diff -ruN InsightToolkit-4.13.2.orig/Modules/ThirdParty/DCMTK/CMake/FindDCMTK.cmake InsightToolkit-4.13.2/Modules/ThirdParty/DCMTK/CMake/FindDCMTK.cmake
--- InsightToolkit-4.13.2.orig/Modules/ThirdParty/DCMTK/CMake/FindDCMTK.cmake 1970-01-01 02:00:00.000000000 +0200
+++ InsightToolkit-4.13.2/Modules/ThirdParty/DCMTK/CMake/FindDCMTK.cmake 2015-11-12 18:21:07.000000000 +0200
@@ -0,0 +1,350 @@
+# - find DCMTK libraries and applications
+# The module defines the following variables:
+#
+# DCMTK_INCLUDE_DIRS - Directories to include to use DCMTK
+# DCMTK_LIBRARIES - Files to link against to use DCMTK
+# DCMTK_FOUND - If false, don't try to use DCMTK
+# DCMTK_DIR - (optional) Source directory for DCMTK
+#
+# DCMTK_DIR can be used to make it simpler to find the various include
+# directories and compiled libraries if you've just compiled it in the
+# source tree. Just set it to the root of the tree where you extracted
+# the source (default to /usr)
+#
+#
+# This file is able to find version of DCMTK that do or do not export
+# a DCMTKConfig.cmake file.
+#
+# IMPORTANT: A set of patches has been contributed to DCMTK
+# maintainers, as soon as:
+# (1) it has been integrated upstream so that it is available in
+# an official release (for example X.Y.Z),
+# (2) code bases have been updated to build against X.Y.Z
+# This file could be removed.
+#
+# The set of patches is listed here: https://github.com/commontk/DCMTK/compare/79030ba...f461865
+#
+#
+# Waiting for this to happen, build systems will have to be able
+# to support different versions of DCMTK.
+#
+# On any given system, the following combination of DCMTK version could be
+# considered:
+#
+# | SYSTEM DCMTK + LOCAL DCMTK | Supported ? |
+# ---------------------------------------------------------------------------
+# Case A | NA + [ ] DCMTKConfig | YES |
+# ------------------------------------------------------|--------------------
+# Case B | NA + [X] DCMTKConfig | YES |
+# ------------------------------------------------------|--------------------
+# Case C | [ ] DCMTKConfig + NA | YES |
+# ------------------------------------------------------|--------------------
+# Case D | [X] DCMTKConfig + NA | YES |
+# ------------------------------------------------------|--------------------
+# Case E | [ ] DCMTKConfig + [ ] DCMTKConfig | YES (*) |
+# ------------------------------------------------------|--------------------
+# Case F | [X] DCMTKConfig + [ ] DCMTKConfig | NO |
+# ------------------------------------------------------|--------------------
+# Case G | [ ] DCMTKConfig + [X] DCMTKConfig | YES |
+# ------------------------------------------------------|--------------------
+# Case H | [X] DCMTKConfig + [X] DCMTKConfig | YES |
+# ---------------------------------------------------------------------------
+#
+# (*) See Troubleshooting section.
+#
+# Legend:
+#
+# NA ...............: Means that no System or Local DCMTK is available
+#
+# [ ] DCMTKConfig ..: Means that the version of DCMTK does NOT export a DCMTKConfig.cmake file.
+#
+# [X] DCMTKConfig ..: Means that the version of DCMTK exports a DCMTKConfig.cmake file.
+#
+#
+#
+# In CTK commits 52d953 and 74b4b07, the FindDCMTK.cmake module has been updated to be able
+# to find both version of DCMTK ([ ] DCMTKConfig and [X] DCMTKConfig).
+#
+# It is a two steps process:
+#
+# * Step 1: Attempt to find DCMTK version providing a DCMTKConfig.cmake file. This is done
+# with the help of ''
+#
+# * Step 2: If step 1 failed, rely on FindDCMTK.cmake to set DCMTK_* variables details below.
+#
+#
+#
+# Troubleshooting:
+#
+# What to do if my project find a different version of DCMTK ?
+#
+# Remove DCMTK entry from the CMake registry.
+# Search for "CMake user package registry" on http://www.cmake.org/cmake/help/v2.8.9/cmake.html#command:find_package
+#
+# Details: As some point, the DCMTK build tree was exported [1][2][3]. Indeed, before the set of
+# patches discussed above has been contributed to upstream DCMTK, an initial implementation of
+# a DCMTK build system exporting its build tree has been implemented and has been tested by some
+# folks. This had the effect of populating the CMake registry.
+#
+# Since Step1 does not exclude the CMake registry, when dealing with case E, the incorrect version of
+# DCMTK could be found.
+#
+# [1] http://slicer-devel.65872.n3.nabble.com/Packaging-seems-to-work-again-tp4028121p4028134.html
+# [2] https://www.assembla.com/spaces/slicerrt/tickets/244-dcmtk_dir-vs--dcmtkconfig-cmake?comment=267984263#comment:267984263
+# [3] http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command:export
+#
+#
+#=============================================================================
+# Copyright 2004-2009 Kitware, Inc.
+# Copyright 2009-2010 Mathieu Malaterre <mathieu.malaterre@gmail.com>
+# Copyright 2010 Thomas Sondergaard <ts@medical-insight.com>
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distributed this file outside of CMake, substitute the full
+# License text for the above reference.)
+
+#
+# Written for VXL by Amitha Perera.
+# Upgraded for GDCM by Mathieu Malaterre.
+# Modified for EasyViz by Thomas Sondergaard.
+#
+
+set(_dcmtk_dir_description "The directory of DCMTK build or install tree.")
+
+# Ensure that DCMTK_DIR is set to a reasonable default value
+# so that DCMTK libraries can be found on a standard Unix distribution.
+# It also overwrite the value of DCMTK_DIR after this one has been
+# set by a successful discovery of DCMTK by the unpatched FindDCMTK.cmake module
+# distributed with CMake (as of 0167cea)
+if(NOT DCMTK_DIR OR DCMTK_DIR STREQUAL "/usr/include/dcmtk")
+ set(DCMTK_DIR "/usr" CACHE PATH ${_dcmtk_dir_description} FORCE)
+endif()
+
+set(_SAVED_DCMTK_DIR ${DCMTK_DIR})
+
+#
+# Step1: Attempt to find a version of DCMTK providing a DCMTKConfig.cmake file.
+#
+message(STATUS "Trying to find DCMTK expecting DCMTKConfig.cmake")
+find_package(DCMTK QUIET NO_MODULE)
+if(DCMTK_FOUND
+ AND NOT "x" STREQUAL "x${DCMTK_LIBRARIES}"
+ AND NOT "x" STREQUAL "x${DCMTK_INCLUDE_DIRS}")
+ message(STATUS "Trying to find DCMTK expecting DCMTKConfig.cmake - ok")
+ return()
+else()
+ message(STATUS "Trying to find DCMTK expecting DCMTKConfig.cmake - failed")
+endif()
+
+message(STATUS "Trying to find DCMTK relying on FindDCMTK.cmake")
+
+# Restore the value reset by the previous call to 'find_package(DCMTK QUIET NO_MODULE)'
+set(DCMTK_DIR ${_SAVED_DCMTK_DIR} CACHE PATH ${_dcmtk_dir_description} FORCE)
+
+
+#
+# Step2: Attempt to find a version of DCMTK that does NOT provide a DCMTKConfig.cmake file.
+#
+
+# prefer DCMTK_DIR over default system paths like /usr/lib
+if(DCMTK_DIR)
+ set(CMAKE_PREFIX_PATH ${DCMTK_DIR}/lib ${CMAKE_PREFIX_PATH}) # this is given to FIND_LIBRARY or FIND_PATH
+endif()
+
+# Find all libraries, store debug and release separately
+foreach(lib
+ dcmpstat
+ dcmsr
+ dcmsign
+ dcmtls
+ dcmqrdb
+ dcmnet
+ dcmjpeg
+ dcmimage
+ dcmimgle
+ dcmdata
+ oflog
+ ofstd
+ ijg12
+ ijg16
+ ijg8
+ )
+
+ # Find Release libraries
+ find_library(DCMTK_${lib}_LIBRARY_RELEASE
+ ${lib}
+ PATHS
+ ${DCMTK_DIR}/${lib}/libsrc
+ ${DCMTK_DIR}/${lib}/libsrc/Release
+ ${DCMTK_DIR}/${lib}/Release
+ ${DCMTK_DIR}/lib
+ ${DCMTK_DIR}/lib/Release
+ ${DCMTK_DIR}/dcmjpeg/lib${lib}/Release
+ NO_DEFAULT_PATH
+ )
+
+ # Find Debug libraries
+ find_library(DCMTK_${lib}_LIBRARY_DEBUG
+ ${lib}
+ PATHS
+ ${DCMTK_DIR}/${lib}/libsrc
+ ${DCMTK_DIR}/${lib}/libsrc/Debug
+ ${DCMTK_DIR}/${lib}/Debug
+ ${DCMTK_DIR}/lib
+ ${DCMTK_DIR}/lib/Debug
+ ${DCMTK_DIR}/dcmjpeg/lib${lib}/Debug
+ NO_DEFAULT_PATH
+ )
+
+ mark_as_advanced(DCMTK_${lib}_LIBRARY_RELEASE)
+ mark_as_advanced(DCMTK_${lib}_LIBRARY_DEBUG)
+
+ # Add libraries to variable according to build type
+ if(DCMTK_${lib}_LIBRARY_RELEASE)
+ list(APPEND DCMTK_LIBRARIES optimized ${DCMTK_${lib}_LIBRARY_RELEASE})
+ endif()
+
+ if(DCMTK_${lib}_LIBRARY_DEBUG)
+ list(APPEND DCMTK_LIBRARIES debug ${DCMTK_${lib}_LIBRARY_DEBUG})
+ endif()
+
+endforeach()
+
+set(CMAKE_THREAD_LIBS_INIT)
+if(DCMTK_oflog_LIBRARY_RELEASE OR DCMTK_oflog_LIBRARY_DEBUG)
+ # Hack - Not having a DCMTKConfig.cmake file to read the settings from, we will attempt to
+ # find the library in all cases.
+ # Ideally, pthread library should be discovered only if DCMTK_WITH_THREADS is enabled.
+ set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
+ find_package(Threads)
+endif()
+
+if(CMAKE_THREAD_LIBS_INIT)
+ list(APPEND DCMTK_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+endif()
+
+#
+# SPECIFIC CASE FOR DCMTK BUILD DIR as DCMTK_DIR
+# (as opposed to a DCMTK install dir)
+# Have to find the source directory.
+if(EXISTS ${DCMTK_DIR}/CMakeCache.txt)
+ load_cache(${DCMTK_DIR} READ_WITH_PREFIX "EXT"
+ DCMTK_SOURCE_DIR)
+ if(NOT EXISTS ${EXTDCMTK_SOURCE_DIR})
+ message(FATAL_ERROR
+ "DCMTK build directory references
+nonexistant DCMTK source directory ${EXTDCMTK_SOURCE_DIR}")
+ endif()
+endif()
+
+set(DCMTK_config_TEST_HEADER osconfig.h)
+set(DCMTK_dcmdata_TEST_HEADER dctypes.h)
+set(DCMTK_dcmimage_TEST_HEADER dicoimg.h)
+set(DCMTK_dcmimgle_TEST_HEADER dcmimage.h)
+set(DCMTK_dcmjpeg_TEST_HEADER djdecode.h)
+set(DCMTK_dcmnet_TEST_HEADER assoc.h)
+set(DCMTK_dcmpstat_TEST_HEADER dcmpstat.h)
+set(DCMTK_dcmqrdb_TEST_HEADER dcmqrdba.h)
+set(DCMTK_dcmsign_TEST_HEADER sicert.h)
+set(DCMTK_dcmsr_TEST_HEADER dsrtree.h)
+set(DCMTK_dcmtls_TEST_HEADER tlslayer.h)
+set(DCMTK_ofstd_TEST_HEADER ofstdinc.h)
+set(DCMTK_oflog_TEST_HEADER oflog.h)
+set(DCMTK_dcmjpls_TEST_HEADER djlsutil.h)
+
+set(DCMTK_INCLUDE_DIR_NAMES)
+
+foreach(dir
+ config
+ dcmdata
+ dcmimage
+ dcmimgle
+ dcmjpeg
+ dcmjpls
+ dcmnet
+ dcmpstat
+ dcmqrdb
+ dcmsign
+ dcmsr
+ dcmtls
+ ofstd
+ oflog)
+ if(EXTDCMTK_SOURCE_DIR)
+ set(SOURCE_DIR_PATH
+ ${EXTDCMTK_SOURCE_DIR}/${dir}/include/dcmtk/${dir})
+ endif()
+ find_path(DCMTK_${dir}_INCLUDE_DIR
+ ${DCMTK_${dir}_TEST_HEADER}
+ PATHS
+ ${DCMTK_DIR}/${dir}/include
+ ${DCMTK_DIR}/${dir}
+ ${DCMTK_DIR}/include/dcmtk/${dir}
+ ${DCMTK_DIR}/${dir}/include/dcmtk/${dir}
+ ${DCMTK_DIR}/include/${dir}
+ ${SOURCE_DIR_PATH}
+ )
+ mark_as_advanced(DCMTK_${dir}_INCLUDE_DIR)
+ list(APPEND DCMTK_INCLUDE_DIR_NAMES DCMTK_${dir}_INCLUDE_DIR)
+
+ if(DCMTK_${dir}_INCLUDE_DIR)
+ # add the 'include' path so eg
+ #include "dcmtk/dcmimgle/dcmimage.h"
+ # works
+ get_filename_component(_include ${DCMTK_${dir}_INCLUDE_DIR} PATH)
+ get_filename_component(_include ${_include} PATH)
+ list(APPEND
+ DCMTK_INCLUDE_DIRS
+ ${DCMTK_${dir}_INCLUDE_DIR}
+ ${_include})
+ endif()
+endforeach()
+
+list(APPEND DCMTK_INCLUDE_DIRS ${DCMTK_DIR}/include)
+
+if(WIN32)
+ list(APPEND DCMTK_LIBRARIES netapi32 wsock32)
+endif()
+
+if(DCMTK_ofstd_INCLUDE_DIR)
+ get_filename_component(DCMTK_dcmtk_INCLUDE_DIR
+ ${DCMTK_ofstd_INCLUDE_DIR}
+ PATH
+ CACHE)
+ list(APPEND DCMTK_INCLUDE_DIRS ${DCMTK_dcmtk_INCLUDE_DIR})
+ mark_as_advanced(DCMTK_dcmtk_INCLUDE_DIR)
+endif()
+
+# Compatibility: This variable is deprecated
+set(DCMTK_INCLUDE_DIR ${DCMTK_INCLUDE_DIRS})
+
+find_package_handle_standard_args(DCMTK
+ REQUIRED_VARS ${DCMTK_INCLUDE_DIR_NAMES} DCMTK_LIBRARIES
+ FAIL_MESSAGE "Please set DCMTK_DIR and re-run configure")
+
+# Workaround bug in packaging of DCMTK 3.6.0 on Debian.
+# See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637687
+#
+# By setting 'DCMTK_FIND_PACKAGE_SKIP_ADD_DEFINITIONS' to '1' before
+# calling 'find_package(DCMTK)', the variable 'DCMTK_DEFINITIONS' will be set
+# appropriately.
+if(DCMTK_FOUND AND UNIX AND NOT APPLE)
+ include(CheckCXXSourceCompiles)
+ set(CMAKE_REQUIRED_FLAGS )
+ set(CMAKE_REQUIRED_DEFINITIONS )
+ set(CMAKE_REQUIRED_INCLUDES ${DCMTK_INCLUDE_DIRS})
+ set(CMAKE_REQUIRED_LIBRARIES ${DCMTK_LIBRARIES})
+ check_cxx_source_compiles("#include <dcmtk/config/osconfig.h>\n#include <dcmtk/ofstd/ofstream.h>\nint main(int,char*[]){return 0;}"
+ DCMTK_HAVE_CONFIG_H_OPTIONAL
+ )
+ if(NOT DCMTK_HAVE_CONFIG_H_OPTIONAL)
+ set(DCMTK_DEFINITIONS "HAVE_CONFIG_H")
+ endif()
+endif()
+
+message(STATUS "Trying to find DCMTK relying on FindDCMTK.cmake - ok")
diff -ruN InsightToolkit-4.13.2.orig/Modules/ThirdParty/DCMTK/CMakeLists.txt InsightToolkit-4.13.2/Modules/ThirdParty/DCMTK/CMakeLists.txt
--- InsightToolkit-4.13.2.orig/Modules/ThirdParty/DCMTK/CMakeLists.txt 2016-05-26 18:32:22.000000000 +0300
+++ InsightToolkit-4.13.2/Modules/ThirdParty/DCMTK/CMakeLists.txt 2016-10-02 12:37:14.117972925 +0300
@@ -154,14 +154,14 @@
# When this module is loaded by an app, load DCMTK too.
set(ITKDCMTK_EXPORT_CODE_INSTALL "
set(DCMTK_DIR \"${DCMTK_DIR}\")
-find_package(DCMTK REQUIRED NO_MODULE)
+find_package(DCMTK REQUIRED)
")
set(ITKDCMTK_EXPORT_CODE_BUILD "
if(NOT ITK_BINARY_DIR)
set(CMAKE_MODULE_PATH
\"${CMAKE_CURRENT_SOURCE_DIR}/CMake\" \${CMAKE_MODULE_PATH})
set(DCMTK_DIR \"${DCMTK_DIR}\")
- find_package(DCMTK REQUIRED NO_MODULE)
+ find_package(DCMTK REQUIRED)
endif()
")
diff -ruN InsightToolkit-4.13.2.orig/Modules/ThirdParty/DCMTK/itk-module-init.cmake InsightToolkit-4.13.2/Modules/ThirdParty/DCMTK/itk-module-init.cmake
--- InsightToolkit-4.13.2.orig/Modules/ThirdParty/DCMTK/itk-module-init.cmake 2016-05-26 18:32:22.000000000 +0300
+++ InsightToolkit-4.13.2/Modules/ThirdParty/DCMTK/itk-module-init.cmake 2016-10-02 12:37:41.557974143 +0300
@@ -12,7 +12,7 @@
if(ITK_USE_SYSTEM_DCMTK)
# Use local FindDCMTK.cmake.
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_LIST_DIR}/CMake")
- find_package(DCMTK REQUIRED NO_MODULE)
+ find_package(DCMTK REQUIRED)
else(ITK_USE_SYSTEM_DCMTK)
# Copied and mofified from DCMTK/CMake/3rdparty.cmake
if(NOT DEFINED DCMTK_USE_ICU)

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,69 @@
-------------------------------------------------------------------
Tue Jul 14 22:09:20 UTC 2020 - Atri Bhattacharya <badshah400@gmail.com>
- Add insighttoolkit-drop-netlib-triangle-files.patch: Drop netlib
triangle files and any linking to them due to licensing issues;
patch from upstream [gh#InsightSoftwareConsortium/ITK#1913].
-------------------------------------------------------------------
Wed Jun 3 00:58:31 UTC 2020 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 5.1.0: See
https://blog.kitware.com/itk-5-1-0-available-for-download/.
- Drop dcmtk-cmake.patch: no longer needed when using system
dcmtk.
- Update itklbfgs-linking.patch and nrrdio-linking.patch to
upstream-blessed versions (minor changes only)
[gh#InsightSoftwareConsortium/ITK#1867,
gh#InsightSoftwareConsortium/ITK#1878].
- New BuildRequires: pkgconfig(libpcrecpp) and bison.
- Drop BuildRequires: tcpd-devel, no longer needed.
- Add necessary Requires: python3-numpy to python3-%{name}
package.
- Update Requires for devel package and convert existing Requires
to pkgconfig equivalents where possible.
- Pass -DITK_USE_SYSTEM_SWIG:BOOL=ON to cmake, otherwise it
defaults to OFF and tries to download swig.
- Drop -DITK_USE_STRICT_CONCEPT_CHECKING:BOOL=ON option passed to
cmake: no longer used.
- Drop -DITK_WRAPPING option passed to cmake: obsoleted by
-DITK_WRAP_PYTHON.
- No longer need to `export CXXFLAGS+=" -I%{_includedir}/gdcm/"`
[gh#InsightSoftwareConsortium/ITK#1768].
- Drop Group tags.
- Improve Summary and descriptions for packages.
-------------------------------------------------------------------
Mon May 18 01:15:30 UTC 2020 - Atri Bhattacharya <badshah400@gmail.com>
- Update to version 5.0.1: See
https://discourse.itk.org/t/itk-5-0-1-has-been-released/2094.
- Changes from version 5.0.0: See
https://discourse.itk.org/t/itk-5-0-0-has-been-released/1931.
- Drop add_gcc9_support.patch: no longer required with upstream
support for up to GCC 10 baked in.
- Pass options to %cmake to set proper install paths when
installing; prevents the need to manually move installed libs
around. Drop sed BuildRequires that is no longer required as a
consequence.
- Enable python3 wrapping (needed for tomviz, for instance); split
out separate python3-itk package. Introduces BuildRequires:
python3-devel.
- Add BuildRequires: memory-constraints and use %limit_build
to require at least 2 GiB memory per thread; OOM failures
otherwise.
- Update _constraints file: at least 24 GB (!!!) disk space and 2
GB memory now required.
- Use ninja for build (BuildRequires: ninja); compile using
%cmake_build instead of make directly.
- Additional system library dependencies: CastXML-devel, gtest,
double-conversion, and gdcm-devel.
- Convert BuildRequires to pkgconfig() or cmake() based ones
wherever possible.
- Update URL and Source URL in keeping with upstream's move to
github.
- Drop conditionals for old openSUSE versions.
-------------------------------------------------------------------
Sat Jul 6 18:06:51 UTC 2019 - Jan Engelhardt <jengelh@inai.de>

View File

@ -1,7 +1,7 @@
#
# spec file for package insighttoolkit
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2016 Angelos Tzotsos <tzotsos@opensuse.org>.
#
# All modifications and additions to the file contributed by third parties
@ -13,167 +13,161 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global __builder ninja
%define tarname InsightToolkit
%define baseversion 4.13
%define baseversion 5.1
%define libname lib%{name}5
Name: insighttoolkit
Version: %{baseversion}.2
Version: 5.1.0
Release: 0
Summary: Insight Segmentation and Registration Toolkit
Summary: Toolkit for scientific image processing, segmentation, and registration
# 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
License: Apache-2.0
Group: Development/Libraries/C and C++
Url: http://www.itk.org
#Source0: http://sourceforge.net/projects/itk/files/itk/%{baseversion}/%{tarname}-%{version}.tar.xz
Source: https://netix.dl.sourceforge.net/project/itk/itk/%{baseversion}/%{tarname}-%{version}.tar.xz
Patch0: dcmtk-cmake.patch
# PATCH-FIX-UPSTREAM proper linking against math library
URL: https://www.itk.org
Source: https://github.com/InsightSoftwareConsortium/ITK/releases/download/v%{version}/%{tarname}-%{version}.tar.gz
# PATCH-FIX-UPSTREAM proper linking against math library [gh#InsightSoftwareConsortium/ITK#1867, gh#InsightSoftwareConsortium/ITK#1878]
Patch1: nrrdio-linking.patch
# PATCH-FIX-UPSTREAM add support for GCC 9
Patch2: add_gcc9_support.patch
# PATCH-FIX-UPSTREAM proper linking against math library
# PATCH-FIX-UPSTREAM proper linking against math library [gh#InsightSoftwareConsortium/ITK#1867, gh#InsightSoftwareConsortium/ITK#1878]
Patch3: itklbfgs-linking.patch
BuildRequires: cmake >= 2.8.0
BuildRequires: dcmtk
# 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
BuildRequires: CastXML-devel
BuildRequires: bison
BuildRequires: cmake
BuildRequires: dcmtk-devel
BuildRequires: fdupes
BuildRequires: fftw3-devel
BuildRequires: fftw3-threads-devel
BuildRequires: gcc
BuildRequires: gcc-c++
# BuildRequires: gdcm-devel
BuildRequires: gdcm-devel
BuildRequires: gtest
BuildRequires: hdf5-devel
BuildRequires: libexpat-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libtiff-devel
BuildRequires: libxml2-devel
BuildRequires: python-devel
BuildRequires: sed
BuildRequires: swig
%if 0%{suse_version} > 1320
# Indirect DCMTK dep. Should DCMTK be fixed?
# tcpd-devel is needed for libwrap.so on Tumbleweed (> Leap 42.3)
BuildRequires: tcpd-devel
BuildRequires: libnsl-devel
%endif
BuildRequires: memory-constraints
BuildRequires: ninja
BuildRequires: pkgconfig
BuildRequires: python3-devel
BuildRequires: swig
BuildRequires: vtk-devel
BuildRequires: vtk-qt
BuildRequires: xz
BuildRequires: zlib-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: cmake(double-conversion)
BuildRequires: pkgconfig(eigen3)
BuildRequires: pkgconfig(expat)
BuildRequires: pkgconfig(fftw3)
BuildRequires: pkgconfig(libjpeg)
BuildRequires: pkgconfig(libpcrecpp)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libtiff-4)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(zlib)
%description
ITK is a suite of software tools for image analysis.
The Insight Toolkit (ITK) is a toolkit for N-dimensional scientific
image processing, segmentation, and registration.
%package devel
Summary: Development files for ITK
Group: Development/Libraries/C and C++
Requires: %{libname} = %{version}
Requires: dcmtk-devel
Requires: fftw3-devel
Requires: double-conversion-devel
Requires: fftw3-threads-devel
Requires: hdf5-devel
Requires: lib%{name}4 = %{version}
Requires: libexpat-devel
Requires: libjpeg-devel
Requires: libpng-devel
Requires: libtiff-devel
Requires: vtk-devel
Requires: zlib-devel
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)
Provides: lib%{name}-devel
%description devel
Development files for the ITK library.
ITK is a suite of software tools for image analysis.
The Insight Toolkit (ITK) is a toolkit for N-dimensional scientific
image processing, segmentation, and registration.
%package -n lib%{name}4
Summary: Insight Segmentation and Registration Toolkit
Group: System/Libraries
This package provides development files for the ITK library.
%description -n lib%{name}4
Shared ITK library.
ITK is a suite of software tools for image analysis.
%package -n %{libname}
Summary: Toolkit for scientific image processing, segmentation, and registration
%description -n %{libname}
The Insight Toolkit (ITK) is a toolkit for N-dimensional scientific
image processing, segmentation, and registration.
This package provides shared libraries for ITK.
%package -n python3-itk
Summary: Python bindings for ITK
Requires: python3-numpy
%description -n python3-itk
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.
%prep
%setup -q -n %{tarname}-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%autosetup -p1 -n %{tarname}-%{version}
%build
%limit_build -m 2000
# Enabling BUILD_TESTING requires KWStyle, not available for openSUSE
%cmake \
-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}/ \
-DBUILD_EXAMPLES:BOOL=ON \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DBUILD_TESTING:BOOL=OFF \
-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON \
-DUSE_FFTWF=ON \
-DITK_USE_FFTWD:BOOL=ON \
-DITK_USE_FFTWF:BOOL=ON \
-DITK_USE_SYSTEM_FFTW:BOOL=ON \
-DITK_USE_STRICT_CONCEPT_CHECKING:BOOL=ON \
-DITK_USE_SYSTEM_DOUBLECONVERSION:BOOL=OFF \
-DITK_USE_SYSTEM_DCMTK:BOOL=ON \
-DITK_USE_SYSTEM_GDCM:BOOL=OFF \
-DITK_USE_SYSTEM_HDF5:BOOL=ON \
-DITK_USE_SYSTEM_JPEG:BOOL=ON \
-DITK_USE_SYSTEM_PNG:BOOL=ON \
-DITK_USE_SYSTEM_TIFF:BOOL=ON \
-DITK_USE_SYSTEM_LIBRARIES:BOOL=ON \
-DITK_USE_SYSTEM_CASTXML:BOOL=ON \
-DITK_USE_SYSTEM_GDCM:BOOL=ON \
-DITK_USE_SYSTEM_SWIG:BOOL=ON \
-DITK_USE_SYSTEM_VXL:BOOL=OFF \
-DITK_USE_SYSTEM_ZLIB:BOOL=ON \
-DITK_USE_SYSTEM_EXPAT:BOOL=ON \
-DModule_ITKDCMTK:BOOL=ON \
-DModule_ITKIOPhilipsREC:BOOL=OFF \
-DModule_ITKLevelSetsv4Visualization:BOOL=OFF \
-DModule_ITKReview:BOOL=OFF \
-DModule_ITKVideoBridgeOpenCV:BOOL=OFF \
-DModule_ITKVideoBridgeVXL:BOOL=OFF \
-DModule_ITKVtkGlue:BOOL=OFF \
-DModule_ITKDeprecated:BOOL=OFF \
-DITKV3_COMPATIBILITY:BOOL=ON \
-DVXL_BUILD_CORE_NUMERICS:BOOL=OFF \
-DVCL_INCLUDE_CXX_0X:BOOL=ON \
-DITK_WRAPPING:BOOL=OFF \
-DITK_WRAP_PYTHON:BOOL=OFF \
-DCMAKE_BUILD_TYPE:STRING="Release"
make VERBOSE=1 %{?_smp_mflags}
-DITK_FORBID_DOWNLOADS=ON \
-DITK_WRAP_PYTHON:BOOL=ON
%cmake_build
%install
%cmake_install
%if "%{_lib}" == "lib64"
mkdir -p %{buildroot}%{_libdir}
mv %{buildroot}%{_libexecdir}/* %{buildroot}%{_libdir}/
sed -i 's|/lib/|/lib64/|g' %{buildroot}%{_libdir}/cmake/ITK-%{baseversion}/ITKConfig.cmake
sed -i 's|/lib/|/lib64/|g' %{buildroot}%{_libdir}/cmake/ITK-%{baseversion}/ITKTargets.cmake
sed -i 's|/lib/|/lib64/|g' %{buildroot}%{_libdir}/cmake/ITK-%{baseversion}/ITKTargets-release.cmake
%endif
rm -rf %{buildroot}%{_libexecdir}/debug
# move files to a proper place
mv %{buildroot}%{_libdir}/*itk*.cmake %{buildroot}%{_libdir}/cmake/
# remove openjp2 file installation
rm -rf %{buildroot}/%{_includedir}/gdcmopenjpeg %{buildroot}%{_libdir}/gdcmopenjpeg-* %{buildroot}%{_libdir}/pkgconfig/libopenjp2.pc
rmdir %{buildroot}%{_libdir}/pkgconfig
%fdupes %{buildroot}/%{_prefix}
%post -n lib%{name}4 -p /sbin/ldconfig
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%postun -n lib%{name}4 -p /sbin/ldconfig
%files -n lib%{name}4
%defattr(644,root,root,755)
%license LICENSE
%files -n %{libname}
%license LICENSE NOTICE
%{_libdir}/*.so.1
%files devel
%defattr(-,root,root,-)
%{_includedir}/*
%license LICENSE NOTICE
%{_includedir}/%{name}/
%{_libdir}/lib*.so
%{_libdir}/cmake/
%{_bindir}/itkTestDriver
%{_datadir}/*
%doc %{_docdir}/%{name}/
%files -n python3-itk
%license LICENSE NOTICE
%{python3_sitearch}/*.py
%{python3_sitearch}/itk/
%changelog

View File

@ -1,11 +1,14 @@
diff -ur InsightToolkit-4.13.2/Modules/ThirdParty/libLBFGS/src/CMakeLists.txt InsightToolkit-4.13.2_fix/Modules/ThirdParty/libLBFGS/src/CMakeLists.txt
--- InsightToolkit-4.13.2/Modules/ThirdParty/libLBFGS/src/CMakeLists.txt 2019-02-28 17:45:49.000000000 +0100
+++ InsightToolkit-4.13.2_fix/Modules/ThirdParty/libLBFGS/src/CMakeLists.txt 2019-07-02 16:05:59.161006477 +0200
@@ -17,6 +17,8 @@
Index: InsightToolkit-5.1.0/Modules/ThirdParty/libLBFGS/src/CMakeLists.txt
===================================================================
--- InsightToolkit-5.1.0.orig/Modules/ThirdParty/libLBFGS/src/CMakeLists.txt
+++ InsightToolkit-5.1.0/Modules/ThirdParty/libLBFGS/src/CMakeLists.txt
@@ -17,6 +17,10 @@ set(ITK3P_INSTALL_RUNTIME_DIR "${ITKLIBL
set(ITK3P_INSTALL_LIBRARY_DIR "${ITKLIBLBFGS_INSTALL_LIBRARY_DIR}")
set(ITK3P_INSTALL_ARCHIVE_DIR "${ITKLIBLBFGS_INSTALL_ARCHIVE_DIR}")
+TARGET_LINK_LIBRARIES(itklbfgs -lm)
+IF(UNIX)
+ TARGET_LINK_LIBRARIES(itklbfgs m)
+ENDIF(UNIX)
+
INSTALL(TARGETS itklbfgs
EXPORT ${ITK3P_INSTALL_EXPORT_NAME}

View File

@ -1,15 +1,18 @@
Description: Link libITKNrrdIO with -lm (needed for sqrt)
Author: Steve Robbins <smr@debian.org>
Forwarded: no
--- insighttoolkit4-4.5.0.orig/Modules/ThirdParty/NrrdIO/src/NrrdIO/CMakeLists.txt
+++ insighttoolkit4-4.5.0/Modules/ThirdParty/NrrdIO/src/NrrdIO/CMakeLists.txt
@@ -64,7 +64,7 @@
diff --git a/Modules/ThirdParty/NrrdIO/src/NrrdIO/CMakeLists.txt b/Modules/ThirdParty/NrrdIO/src/NrrdIO/CMakeLists.txt
index 6c706f096a9..3039e426de5 100644
--- a/Modules/ThirdParty/NrrdIO/src/NrrdIO/CMakeLists.txt
+++ b/Modules/ThirdParty/NrrdIO/src/NrrdIO/CMakeLists.txt
@@ -64,7 +64,12 @@ ENDIF(QNANHIBIT)
ADD_DEFINITIONS(-DTEEM_ZLIB=1)
ADD_LIBRARY(ITKNrrdIO ${nrrdio_SRCS} )
-TARGET_LINK_LIBRARIES(ITKNrrdIO ${ITKZLIB_LIBRARIES})
+TARGET_LINK_LIBRARIES(ITKNrrdIO ${ITKZLIB_LIBRARIES} -lm)
+
+IF(UNIX)
+ TARGET_LINK_LIBRARIES(ITKNrrdIO ${ITKZLIB_LIBRARIES} m)
+ELSE(UNIX)
+ TARGET_LINK_LIBRARIES(ITKNrrdIO ${ITKZLIB_LIBRARIES})
+ENDIF(UNIX)
IF(ITK_LIBRARY_PROPERTIES)
SET_TARGET_PROPERTIES(ITKNrrdIO PROPERTIES ${ITK_LIBRARY_PROPERTIES})