commit:     64839f71f4892ca57ce5e36648b9a2b1c8a60822
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Jun  6 09:19:08 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Jun  6 09:41:50 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64839f71

sci-libs/vtk: Fix CMake detection of GCC 10

Thanks-to: Tiernan Hubble <tiernanhubble+gentoo <AT> gmail.com>
Closes: https://bugs.gentoo.org/723374
Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 sci-libs/vtk/files/vtk-8.2.0-gcc-10.patch | 16 ++++++++++++++++
 sci-libs/vtk/vtk-8.2.0.ebuild             |  1 +
 2 files changed, 17 insertions(+)

diff --git a/sci-libs/vtk/files/vtk-8.2.0-gcc-10.patch 
b/sci-libs/vtk/files/vtk-8.2.0-gcc-10.patch
new file mode 100644
index 00000000000..a903b037530
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-8.2.0-gcc-10.patch
@@ -0,0 +1,16 @@
+--- a/CMake/VTKGenerateExportHeader.cmake  2020-05-24 14:33:12.154603698 -0600
++++ b/CMake/VTKGenerateExportHeader.cmake  2020-05-24 14:33:34.864603776 -0600
+@@ -174,8 +174,12 @@
+     execute_process(COMMAND ${CMAKE_C_COMPILER} --version
+       OUTPUT_VARIABLE _gcc_version_info
+       ERROR_VARIABLE _gcc_version_info)
+-    string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*"
++    string(REGEX MATCH "[1-9][0-9]\\.[0-9]\\.[0-9]*"
+       _gcc_version "${_gcc_version_info}")
++    if(NOT _gcc_version)
++      string(REGEX MATCH "[3-9]\\.[0-9]\\.[0-9]*"
++        _gcc_version "${_gcc_version_info}")
++    endif()
+     # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
+     # patch level, handle this here:
+     if(NOT _gcc_version)
\ No newline at end of file

diff --git a/sci-libs/vtk/vtk-8.2.0.ebuild b/sci-libs/vtk/vtk-8.2.0.ebuild
index 1097c4df324..0538637cc2a 100644
--- a/sci-libs/vtk/vtk-8.2.0.ebuild
+++ b/sci-libs/vtk/vtk-8.2.0.ebuild
@@ -126,6 +126,7 @@ S="${WORKDIR}"/VTK-${PV}
 PATCHES=(
        "${FILESDIR}"/${PN}-8.1.0-openmpi-4-compatibility.patch
        "${FILESDIR}"/${P}-qt-5.15.patch # bug 726960
+       "${FILESDIR}"/${P}-gcc-10.patch # bug 723374
 )
 
 RESTRICT="test"

Reply via email to