commit:     f3ba92a3877165fd3e436097b41b3c776f83bbb3
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 20 20:02:28 2016 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Tue Sep 20 21:06:17 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3ba92a3

sci-chemistry/reduce: Allow for compiling with GCC 6

Gentoo-bug: 594202
* EAPI=6
* Make PATCHES -p1 compliant

Package-Manager: portage-2.3.1

 sci-chemistry/reduce/files/3.13.080428-LDFLAGS.patch    |  4 ++--
 .../reduce/files/reduce-3.16.111118-fix-c++14.patch     | 14 ++++++++++++++
 sci-chemistry/reduce/reduce-3.16.111118.ebuild          | 17 ++++++++---------
 3 files changed, 24 insertions(+), 11 deletions(-)

diff --git a/sci-chemistry/reduce/files/3.13.080428-LDFLAGS.patch 
b/sci-chemistry/reduce/files/3.13.080428-LDFLAGS.patch
index bcee1a9..a615be0 100644
--- a/sci-chemistry/reduce/files/3.13.080428-LDFLAGS.patch
+++ b/sci-chemistry/reduce/files/3.13.080428-LDFLAGS.patch
@@ -1,5 +1,5 @@
---- reduce_src/Makefile        2009-08-09 10:11:29.000000000 +0200
-+++ reduce_src/Makefile.new    2009-08-09 10:13:31.000000000 +0200
+--- a/reduce_src/Makefile
++++ b/reduce_src/Makefile
 @@ -34,7 +34,7 @@
  all:    reduce
  

diff --git a/sci-chemistry/reduce/files/reduce-3.16.111118-fix-c++14.patch 
b/sci-chemistry/reduce/files/reduce-3.16.111118-fix-c++14.patch
new file mode 100644
index 00000000..5a45b7c
--- /dev/null
+++ b/sci-chemistry/reduce/files/reduce-3.16.111118-fix-c++14.patch
@@ -0,0 +1,14 @@
+Fix building with C++14, which errors out due to an erroneous std::cerr.
+See also: https://bugs.gentoo.org/show_bug.cgi?id=594202
+
+--- a/reduce_src/GraphToHoldScores.cpp
++++ b/reduce_src/GraphToHoldScores.cpp
+@@ -1150,7 +1150,7 @@
+               }
+       }
+       std::cerr << "CRITICAL ERROR IN whichVertex(" << vertex_index << ") 
called on edge [" <<
+-      std::cerr << vertex_indices_[ 0 ] << ", " << vertex_indices_[ 1 ] << 
"]" << std::endl;
++              vertex_indices_[ 0 ] << ", " << vertex_indices_[ 1 ] << "]" << 
std::endl;
+       assert(false);
+       exit(1);
+         return 0; // to avoid warnings

diff --git a/sci-chemistry/reduce/reduce-3.16.111118.ebuild 
b/sci-chemistry/reduce/reduce-3.16.111118.ebuild
index 6871341..aba49a9 100644
--- a/sci-chemistry/reduce/reduce-3.16.111118.ebuild
+++ b/sci-chemistry/reduce/reduce-3.16.111118.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI=4
+EAPI=6
 
-inherit eutils toolchain-funcs
+inherit toolchain-funcs
 
 MY_P="${PN}.${PV}.src"
 
@@ -22,12 +22,11 @@ DEPEND="${RDEPEND}
        app-arch/unzip"
 
 S="${WORKDIR}/"
-
-src_prepare() {
-       epatch \
-               "${FILESDIR}"/3.13.080428-LDFLAGS.patch \
-               "${FILESDIR}"/3.14.080821-CFLAGS.patch
-}
+PATCHES=(
+       "${FILESDIR}"/3.13.080428-LDFLAGS.patch
+       "${FILESDIR}"/3.14.080821-CFLAGS.patch
+       "${FILESDIR}"/${PN}-3.16.111118-fix-c++14.patch
+)
 
 src_compile() {
        DICT_DIR="/usr/share/reduce"

Reply via email to