1
0
Dirk Stoecker 2019-07-02 14:46:32 +00:00 committed by Git OBS Bridge
parent 46009a5c35
commit 2a520addd7
8 changed files with 69 additions and 59 deletions

View File

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

View File

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

View File

@ -1,34 +0,0 @@
From 8ad47de54cdc7a3145226627f9af3e137adb8461 Mon Sep 17 00:00:00 2001
From: Pablo Hernandez-Cerdan <pablo.hernandez.cerdan@outlook.com>
Date: Tue, 15 May 2018 16:17:01 -0400
Subject: [PATCH] COMP: Add gcc8 support to vcl_compiler.
It just adds a if/else branch to the existing logic.
Triggered here: https://discourse.itk.org/t/building-and-compiling-with-gcc-8-1/934/4
---
vcl/vcl_compiler.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/vcl/vcl_compiler.h b/vcl/vcl_compiler.h
index 6a3f2e2152..5ca624603d 100644
--- a/vcl/vcl_compiler.h
+++ b/vcl/vcl_compiler.h
@@ -86,6 +86,17 @@
# else
# define VCL_GCC_70
# endif
+# elif (__GNUC__==8)
+# define VCL_GCC_8
+# if (__GNUC_MINOR__ > 2 )
+# define VCL_GCC_83
+# elif (__GNUC_MINOR__ > 1 )
+# define VCL_GCC_82
+# elif (__GNUC_MINOR__ > 0 )
+# define VCL_GCC_81
+# else
+# define VCL_GCC_80
+# endif
# else
# error "Dunno about this gcc"
# endif

21
add_gcc9_support.patch Normal file
View File

@ -0,0 +1,21 @@
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,6 +1,6 @@
diff -ruN InsightToolkit-4.10.0.orig/Modules/ThirdParty/DCMTK/CMake/FindDCMTK.cmake InsightToolkit-4.10.0/Modules/ThirdParty/DCMTK/CMake/FindDCMTK.cmake
--- InsightToolkit-4.10.0.orig/Modules/ThirdParty/DCMTK/CMake/FindDCMTK.cmake 1970-01-01 02:00:00.000000000 +0200
+++ InsightToolkit-4.10.0/Modules/ThirdParty/DCMTK/CMake/FindDCMTK.cmake 2015-11-12 18:21:07.000000000 +0200
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:
@ -352,10 +352,10 @@ diff -ruN InsightToolkit-4.10.0.orig/Modules/ThirdParty/DCMTK/CMake/FindDCMTK.cm
+endif()
+
+message(STATUS "Trying to find DCMTK relying on FindDCMTK.cmake - ok")
diff -ruN InsightToolkit-4.10.0.orig/Modules/ThirdParty/DCMTK/CMakeLists.txt InsightToolkit-4.10.0/Modules/ThirdParty/DCMTK/CMakeLists.txt
--- InsightToolkit-4.10.0.orig/Modules/ThirdParty/DCMTK/CMakeLists.txt 2016-05-26 18:32:22.000000000 +0300
+++ InsightToolkit-4.10.0/Modules/ThirdParty/DCMTK/CMakeLists.txt 2016-10-02 12:37:14.117972925 +0300
@@ -65,14 +65,14 @@
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}\")
@ -372,9 +372,9 @@ diff -ruN InsightToolkit-4.10.0.orig/Modules/ThirdParty/DCMTK/CMakeLists.txt Ins
endif()
")
diff -ruN InsightToolkit-4.10.0.orig/Modules/ThirdParty/DCMTK/itk-module-init.cmake InsightToolkit-4.10.0/Modules/ThirdParty/DCMTK/itk-module-init.cmake
--- InsightToolkit-4.10.0.orig/Modules/ThirdParty/DCMTK/itk-module-init.cmake 2016-05-26 18:32:22.000000000 +0300
+++ InsightToolkit-4.10.0/Modules/ThirdParty/DCMTK/itk-module-init.cmake 2016-10-02 12:37:41.557974143 +0300
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.
@ -382,5 +382,5 @@ diff -ruN InsightToolkit-4.10.0.orig/Modules/ThirdParty/DCMTK/itk-module-init.cm
- find_package(DCMTK REQUIRED NO_MODULE)
+ find_package(DCMTK REQUIRED)
else(ITK_USE_SYSTEM_DCMTK)
if(MSVC)
message(FATAL_ERROR "The ITKDCMTK module requires ITK_USE_SYSTEM_DCMTK to be ON for MSVC.")
# Copied and mofified from DCMTK/CMake/3rdparty.cmake
if(NOT DEFINED DCMTK_USE_ICU)

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Jul 2 13:21:01 UTC 2019 - Dirk Stoecker <opensuse@dstoecker.de>
- update to 4.13.2
- Replace add_gcc8_support.patch with add_gcc9_support.patch
- Update dcmtk-cmake.patch
-------------------------------------------------------------------
Thu May 16 08:55:49 UTC 2019 - Guillaume GARDET <guillaume.gardet@opensuse.org>

View File

@ -18,17 +18,22 @@
%define tarname InsightToolkit
%define baseversion 4.13
Name: insighttoolkit
Version: 4.12.2
Version: %{baseversion}.2
Release: 0
Summary: Insight Segmentation and Registration Toolkit
License: Apache-2.0
Group: Development/Libraries/C and C++
Url: http://www.itk.org
Source0: http://sourceforge.net/projects/itk/files/itk/4.12/%{tarname}-%{version}.tar.xz
Patch0: nrrdio-linking.patch
Patch1: dcmtk-cmake.patch
Patch2: add_gcc8_support.patch
Source0: http://sourceforge.net/projects/itk/files/itk/%{baseversion}/%{tarname}-%{version}.tar.xz
Patch0: dcmtk-cmake.patch
# PATCH-FIX-UPSTREAM proper linking against math library
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
Patch3: itklbfgs-linking.patch
BuildRequires: cmake >= 2.8.0
BuildRequires: dcmtk
BuildRequires: dcmtk-devel
@ -96,9 +101,8 @@ analysis..
%setup -q -n %{tarname}-%{version}
%patch0 -p1
%patch1 -p1
pushd Modules/ThirdParty/VNL/src/vxl/
%patch2 -p1
popd
%patch3 -p1
%build
%cmake \
@ -144,9 +148,9 @@ make VERBOSE=1 %{?_smp_mflags}
%if "%{_lib}" == "lib64"
mkdir -p %{buildroot}%{_libdir}
mv %{buildroot}%{_libexecdir}/* %{buildroot}%{_libdir}/
sed -i 's|/lib/|/lib64/|g' %{buildroot}%{_libdir}/cmake/ITK-4.12/ITKConfig.cmake
sed -i 's|/lib/|/lib64/|g' %{buildroot}%{_libdir}/cmake/ITK-4.12/ITKTargets.cmake
sed -i 's|/lib/|/lib64/|g' %{buildroot}%{_libdir}/cmake/ITK-4.12/ITKTargets-release.cmake
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

12
itklbfgs-linking.patch Normal file
View File

@ -0,0 +1,12 @@
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 @@
set(ITK3P_INSTALL_LIBRARY_DIR "${ITKLIBLBFGS_INSTALL_LIBRARY_DIR}")
set(ITK3P_INSTALL_ARCHIVE_DIR "${ITKLIBLBFGS_INSTALL_ARCHIVE_DIR}")
+TARGET_LINK_LIBRARIES(itklbfgs -lm)
+
INSTALL(TARGETS itklbfgs
EXPORT ${ITK3P_INSTALL_EXPORT_NAME}
RUNTIME DESTINATION ${ITK3P_INSTALL_RUNTIME_DIR} COMPONENT RuntimeLibraries