sci-chemistry/openbabel: Backport Fix for gcc 6/7
authorJustin Lecher <jlec@gentoo.org>
Sat, 13 May 2017 16:14:26 +0000 (17:14 +0100)
committerJustin Lecher <jlec@gentoo.org>
Sat, 13 May 2017 16:14:26 +0000 (17:14 +0100)
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=594154
Package-Manager: Portage-2.3.5, Repoman-2.3.2
Signed-off-by: Justin Lecher <jlec@gentoo.org>
sci-chemistry/openbabel/files/openbabel-2.3.2-gcc-6_and_7-backport.patch [new file with mode: 0644]
sci-chemistry/openbabel/openbabel-2.3.2-r1.ebuild

diff --git a/sci-chemistry/openbabel/files/openbabel-2.3.2-gcc-6_and_7-backport.patch b/sci-chemistry/openbabel/files/openbabel-2.3.2-gcc-6_and_7-backport.patch
new file mode 100644 (file)
index 0000000..e23dc60
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0ee545cf..7f4b944e 100755
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -239,7 +239,7 @@ check_type_size(clock_t CLOCK_T)
+ # Get the GCC version - from KDE4 cmake files
+ if(CMAKE_COMPILER_IS_GNUCXX)
+   exec_program(${CMAKE_C_COMPILER} ARGS --version OUTPUT_VARIABLE _gcc_version_info)
+-  string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}")
++  string(REGEX MATCH "[34567]\\.[0-9]\\.[0-9]" _gcc_version "${_gcc_version_info}")
+   # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
+   # patch level, handle this here:
+   if (NOT _gcc_version)
index ab9bb5777909373a04f86b849615d3c8e028e57a..f84e2a1f51b4bf573a50f70cc04e7c3535eb65b4 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=5
@@ -28,7 +28,10 @@ DEPEND="${RDEPEND}
 
 DOCS="AUTHORS ChangeLog NEWS README THANKS doc/*.inc doc/README* doc/*.mol2"
 
-PATCHES=( "${FILESDIR}"/${P}-test_lib_path.patch )
+PATCHES=(
+       "${FILESDIR}"/${P}-test_lib_path.patch
+       "${FILESDIR}"/${P}-gcc-6_and_7-backport.patch
+       )
 
 pkg_setup() {
        if use openmp; then