diff --git a/add_gcc8_support.patch b/add_gcc8_support.patch new file mode 100644 index 0000000..4c4a282 --- /dev/null +++ b/add_gcc8_support.patch @@ -0,0 +1,34 @@ +From 8ad47de54cdc7a3145226627f9af3e137adb8461 Mon Sep 17 00:00:00 2001 +From: Pablo Hernandez-Cerdan +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 diff --git a/insighttoolkit.changes b/insighttoolkit.changes index 8dca7ff..177b99e 100644 --- a/insighttoolkit.changes +++ b/insighttoolkit.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jul 2 13:32:09 UTC 2018 - guillaume.gardet@opensuse.org + +- Add patch to add support to GCC8: + * add_gcc8_support.patch + ------------------------------------------------------------------- Thu Nov 23 19:28:40 UTC 2017 - bruno@ioda-net.ch diff --git a/insighttoolkit.spec b/insighttoolkit.spec index 3e3f537..ab3157d 100644 --- a/insighttoolkit.spec +++ b/insighttoolkit.spec @@ -28,6 +28,7 @@ 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 BuildRequires: cmake >= 2.8.0 BuildRequires: dcmtk BuildRequires: dcmtk-devel @@ -94,6 +95,9 @@ analysis.. %setup -q -n %{tarname}-%{version} %patch0 -p1 %patch1 -p1 +pushd Modules/ThirdParty/VNL/src/vxl/ +%patch2 -p1 +popd %build %cmake \