summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Kahle <tomka@gentoo.org>2016-06-09 22:16:05 +0200
committerThomas Kahle <tomka@gentoo.org>2016-06-09 22:16:25 +0200
commit68b401536df91ee42b4e58cd38b74f96ca0a0560 (patch)
treed1982f548addaed754f25fa15efd44c433225270 /sci-mathematics
parentx11-terms/xterm: make building xinerama support optional (diff)
downloadgentoo-68b401536df91ee42b4e58cd38b74f96ca0a0560.tar.gz
gentoo-68b401536df91ee42b4e58cd38b74f96ca0a0560.tar.bz2
gentoo-68b401536df91ee42b4e58cd38b74f96ca0a0560.zip
sci-mathematics/gfan: gcc-6.1 compat and EAPI=6
Package-Manager: portage-2.3.0_rc1
Diffstat (limited to 'sci-mathematics')
-rw-r--r--sci-mathematics/gfan/files/gfan-0.5-gcc6.1-compat.patch70
-rw-r--r--sci-mathematics/gfan/gfan-0.5-r1.ebuild39
2 files changed, 109 insertions, 0 deletions
diff --git a/sci-mathematics/gfan/files/gfan-0.5-gcc6.1-compat.patch b/sci-mathematics/gfan/files/gfan-0.5-gcc6.1-compat.patch
new file mode 100644
index 000000000000..8479557b61bb
--- /dev/null
+++ b/sci-mathematics/gfan/files/gfan-0.5-gcc6.1-compat.patch
@@ -0,0 +1,70 @@
+--- a/app_fiberpolytope.cpp
++++ b/app_fiberpolytope.cpp
+@@ -63,7 +63,7 @@
+
+ /* If the vector configuration B does not have full rank then
+ change coordinates. */
+- if(rank(B)!=B.getHeight())
++ if(rank_(B)!=B.getHeight())
+ {
+ FieldMatrix M=integerMatrixToFieldMatrix(B,Q);
+ M.reduce(false,true);//force integer operations - preserving volume
+@@ -83,7 +83,7 @@
+ log1 debug<<"Done computing restricting cone\n";
+
+ debug<<B.getRows();
+- debug<<int(rank(B));
++ debug<<int(rank_(B));
+
+ Triangulation2 t(B);
+ log1 debug<<"Computing initial triangulation\n";
+@@ -143,7 +143,7 @@
+ */
+ /* If the vector configuration A does not have full rank then
+ change coordinates. */
+-/* if(rank(A)!=A.getHeight())
++/* if(rank_(A)!=A.getHeight())
+ {
+ FieldMatrix M=integerMatrixToFieldMatrix(A,Q);
+ M.reduce(false,true);//force integer operations - preserving volume
+--- a/app_secondaryfan.cpp
++++ b/app_secondaryfan.cpp
+@@ -307,7 +307,7 @@
+
+ if(scaleOption.getValue())
+ {
+- if(rank(A)!=A.getHeight())
++ if(rank_(A)!=A.getHeight())
+ {
+ cerr << "The vector configuration must have full rank in order to use the scale option.\n";
+ assert(0);
+@@ -342,7 +342,7 @@
+
+ /* If the vector configuration A does not have full rank then
+ change coordinates. */
+- if(rank(A)!=A.getHeight())
++ if(rank_(A)!=A.getHeight())
+ {
+ FieldMatrix M=integerMatrixToFieldMatrix(A,Q);
+ M.reduce(false,true);//force integer operations - preserving volume
+--- a/matrix.cpp
++++ b/matrix.cpp
+@@ -61,7 +61,7 @@
+
+ #include "linalg.h"
+
+-int rank(IntegerMatrix const &m)
++int rank_(IntegerMatrix const &m)
+ {
+ return integerMatrixToFieldMatrix(m,Q).rank();
+ }
+--- a/matrix.h
++++ b/matrix.h
+@@ -147,6 +147,6 @@
+
+ FloatMatrix integerToFloatMatrix(IntegerMatrix const &m);
+ IntegerVector flattenMatrix(IntegerMatrix const &m);
+-int rank(IntegerMatrix const &m);
++int rank_(IntegerMatrix const &m);
+
+ #endif
diff --git a/sci-mathematics/gfan/gfan-0.5-r1.ebuild b/sci-mathematics/gfan/gfan-0.5-r1.ebuild
new file mode 100644
index 000000000000..aaf03c9d7ab9
--- /dev/null
+++ b/sci-mathematics/gfan/gfan-0.5-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="computes Groebner fans and tropical varities"
+HOMEPAGE="http://www.math.tu-berlin.de/~jensen/software/gfan/gfan.html"
+SRC_URI="http://www.math.tu-berlin.de/~jensen/software/gfan/${PN}${PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+DEPEND="dev-libs/gmp[cxx]
+ sci-libs/cddlib"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}${PV}/"
+
+PATCHES=(
+ "${FILESDIR}/${P}-double-declare-fix.patch"
+ "${FILESDIR}/${P}-gcc6.1-compat.patch"
+ )
+
+src_prepare () {
+ default
+ sed -i -e "s/-O2/${CXXFLAGS}/" \
+ -e "/GPROFFLAG =/d" \
+ -e "s/g++/$(tc-getCXX)/" \
+ -e "s/\$(CCLINKER)/& \$(LDFLAGS)/" Makefile || die
+}
+
+src_install() {
+ emake PREFIX="${ED}/usr" install
+}