summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2017-05-13 17:17:32 +0100
committerJustin Lecher <jlec@gentoo.org>2017-05-13 17:17:32 +0100
commite18588da96617b72cd1b289f5be17566952d3f95 (patch)
tree15a5b5d651ea59823e5cccf66ee22b15fd56ba45 /sci-chemistry
parentsci-chemistry/openbabel: Backport Fix for gcc 6/7 (diff)
downloadgentoo-e18588da96617b72cd1b289f5be17566952d3f95.tar.gz
gentoo-e18588da96617b72cd1b289f5be17566952d3f95.tar.bz2
gentoo-e18588da96617b72cd1b289f5be17566952d3f95.zip
sci-chemistry/openbabel-perl: Backport Fix for gcc 6/7
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>
Diffstat (limited to 'sci-chemistry')
-rw-r--r--sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.2-gcc-6_and_7-backport.patch13
-rw-r--r--sci-chemistry/openbabel-perl/openbabel-perl-2.3.2.ebuild12
2 files changed, 21 insertions, 4 deletions
diff --git a/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.2-gcc-6_and_7-backport.patch b/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.2-gcc-6_and_7-backport.patch
new file mode 100644
index 000000000000..e23dc6020ee5
--- /dev/null
+++ b/sci-chemistry/openbabel-perl/files/openbabel-perl-2.3.2-gcc-6_and_7-backport.patch
@@ -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)
diff --git a/sci-chemistry/openbabel-perl/openbabel-perl-2.3.2.ebuild b/sci-chemistry/openbabel-perl/openbabel-perl-2.3.2.ebuild
index 18d68a5a31d1..e7f3aafc6d96 100644
--- a/sci-chemistry/openbabel-perl/openbabel-perl-2.3.2.ebuild
+++ b/sci-chemistry/openbabel-perl/openbabel-perl-2.3.2.ebuild
@@ -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
@@ -23,13 +23,17 @@ DEPEND="${RDEPEND}
S="${WORKDIR}/openbabel-${PV}"
+PATCHES=(
+ "${FILESDIR}"/${P}-trunk_cmake.patch
+ "${FILESDIR}"/${P}-bindings_only.patch
+ "${FILESDIR}"/${P}-gcc-6_and_7-backport.patch
+)
+
src_prepare() {
sed \
-e '/__GNUC__/s:== 4:>= 4:g' \
-i include/openbabel/shared_ptr.h || die
- epatch \
- "${FILESDIR}"/${P}-trunk_cmake.patch \
- "${FILESDIR}"/${P}-bindings_only.patch
+ epatch "${PATCHES[@]}"
perl_set_version
}