sci-chemistry/reduce: Allow for compiling with GCC 6
authorDavid Seifert <soap@gentoo.org>
Tue, 20 Sep 2016 20:02:28 +0000 (22:02 +0200)
committerDavid Seifert <soap@gentoo.org>
Tue, 20 Sep 2016 21:06:17 +0000 (23:06 +0200)
Gentoo-bug: 594202
* EAPI=6
* Make PATCHES -p1 compliant

Package-Manager: portage-2.3.1

sci-chemistry/reduce/files/3.13.080428-LDFLAGS.patch
sci-chemistry/reduce/files/reduce-3.16.111118-fix-c++14.patch [new file with mode: 0644]
sci-chemistry/reduce/reduce-3.16.111118.ebuild

index bcee1a9fe8f3a458ca61ac2e7f4ac81e90787db3..a615be088b24d59c98852851d8a9bec8cfb04532 100644 (file)
@@ -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 (file)
index 0000000..5a45b7c
--- /dev/null
@@ -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
index 6871341758b853d5ec1f5bff523f8ea59abdd154..aba49a926d308f4c2311f226d335161670988f4e 100644 (file)
@@ -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"