summaryrefslogtreecommitdiff
path: root/sci-mathematics/gfan
diff options
context:
space:
mode:
Diffstat (limited to 'sci-mathematics/gfan')
-rw-r--r--sci-mathematics/gfan/Manifest7
-rw-r--r--sci-mathematics/gfan/files/gfan-0.5-double-declare-fix.patch12
-rw-r--r--sci-mathematics/gfan/files/gfan-0.5-gcc6.1-compat.patch70
-rw-r--r--sci-mathematics/gfan/gfan-0.5-r1.ebuild38
-rw-r--r--sci-mathematics/gfan/metadata.xml11
5 files changed, 138 insertions, 0 deletions
diff --git a/sci-mathematics/gfan/Manifest b/sci-mathematics/gfan/Manifest
new file mode 100644
index 000000000000..da9c53936ee1
--- /dev/null
+++ b/sci-mathematics/gfan/Manifest
@@ -0,0 +1,7 @@
+AUX gfan-0.5-double-declare-fix.patch 470 SHA256 3dbd642c4bfb349b89d85ff1eb366b58e9895233c92e4580ba98dfab8a3dca66 SHA512 25f340d5636c1cc719328a00561d9c4e5ab3a67633a9fb0ceb23ca0c771fe579f60678649affdf5be76d189f43a986eecd13a91d9681e847ed8b7c1c4c4ed118 WHIRLPOOL 2bf21ff8abc64d565e96e455a587b3ae6860ad34e4be54d91fe21086f6e7cbc9df22c71e03980e8cfe58fc8262523e1e1e14bace2d8d720135d0b32043f26029
+AUX gfan-0.5-gcc6.1-compat.patch 2000 SHA256 8f6b870a63e58c12af3eb714bf7213b19957ea3a3552452ab8e2c88aa1180447 SHA512 daf9527baf68299063ccdd82b53e92a63584fd5cf432b2d889c4aad08ccff0a31c0a75a7b6defd018021df4f46831ed7727a1bd6ea1b0da1fe9a924f9b208fe9 WHIRLPOOL a12e3799416d6feee4bd36eeb4c0a8e547d0da30d91cd58ebde8d78e78d5741e39d30a0df6004ded89c1cd6b92d60aa7793653bfeb184bf773f416a5d3e4df96
+DIST gfan0.5.tar.gz 1134987 SHA256 d7307c8979220adc0a7ce5acf472178a6c280c963967df6241392ed9954cc1fb SHA512 11a9657adcd5b39f73244450c09b132d8cd19474d0f9151c0127682bc16847537e4096d39e8a0a63b5c6aef6720e54a72bfd361a5271808d5a5595fd2df494fa WHIRLPOOL d01a196972a1b0e87e161b3100fb0ec004fa304f6b9e258321e1bf60724826d4d0fa7b3632c8fb7d5789b6f07a2d934ad35501132a68905f8fed7d4a08bd8ed2
+EBUILD gfan-0.5-r1.ebuild 856 SHA256 5e4c8f5100590c4cd520a7232f8ad9db39475088ad8762d78c03bfaba35e5aeb SHA512 b44f8316297138a2d1c0570b1fbaaa2a26122c28746ddec3bef31319e8ce319bd75084d480dcad61b867988da43d4d632c13a71e3afd732ac7daf0daa3c5509c WHIRLPOOL 27acfea0e08f56626ee1e9be24b132ada2ad34fa34f7c7929b21ebdff64ac8a8f7375da6c408ff8e41ea26bb7709f7379542d1a8fb3e85014752135ce551eec1
+MISC ChangeLog 3063 SHA256 93682d69d05e77aad2e2c78ae3ad728ca9d3480d0511477ff8aad3ba1679c681 SHA512 0bc81e991b5843690af45e232838872dd24a5453590de7c604ac9b98907532375c41acad0e660302c4b5c9ce0d56850e0cfa589558a74faa3329b37d530e4af4 WHIRLPOOL ce757bf7e59e7e7c03d72d91bfb0ab754e17fb8d5e4202f6d542a7e1b7c778ef96b956c1e652939e5a64f1e433b597df77657f460ac77b135c61368271bb98cc
+MISC ChangeLog-2015 1836 SHA256 a8321729d8f1c33da45768da76dcf508fbc5067cac6f4d918631cf56c1ca3b32 SHA512 a849940ed46b2635e4eabace0f9f68f3edad66fe700b56a3503e29e23b8d7b2f1f2bc7028cadf06b7d5ab099873c6cd62aa501a946f19c8d505ea870c5ba0ca8 WHIRLPOOL d233f8327efe8ea93074dc7989a1bb0075c5e476dde55835279b3438be5719226fa49838c95944e7fee2efedba61d48fb84559d425e76bab30263fadbd06109b
+MISC metadata.xml 398 SHA256 b9c457186c0f8142244dfd6816846213388f328a249295f0a38299b2f5421d61 SHA512 ac0668f6b8af01557b5a29a5aab5f6064f77eaed62e3fc080a5c808a62310dedd935271f58035e7c9b340df582922d2a960f67f148d61779a9a64fc1fbf7457e WHIRLPOOL 7c869ccf772dff7c53e3b4f1543f440f49c26c1520d779bc0f6a818ec47623f7d1a962c8ab095cc20a6df2a72e8099e8593faf6225831c6ccade01606e5ee790
diff --git a/sci-mathematics/gfan/files/gfan-0.5-double-declare-fix.patch b/sci-mathematics/gfan/files/gfan-0.5-double-declare-fix.patch
new file mode 100644
index 000000000000..239540884011
--- /dev/null
+++ b/sci-mathematics/gfan/files/gfan-0.5-double-declare-fix.patch
@@ -0,0 +1,12 @@
+diff -U 3 -dHrN gfan0.5/app_minkowski.cpp gfan0.5-new/app_minkowski.cpp
+--- gfan0.5/app_minkowski.cpp 2011-01-23 12:21:47.000000000 -0500
++++ gfan0.5-new/app_minkowski.cpp 2012-06-29 15:23:48.604280985 -0400
+@@ -160,7 +160,7 @@
+ //log0 fprintf(Stderr,"4");
+ f.insert(c);
+ //log0 fprintf(Stderr,"5\n");
+- static int i;
++ // static int i;
+ //log0 fprintf(Stderr,"inserted:%i\n",++i);
+ }
+ log1 fprintf(Stderr,"Resolving symmetries.\n");
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..ec591ee19578
--- /dev/null
+++ b/sci-mathematics/gfan/gfan-0.5-r1.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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
+}
diff --git a/sci-mathematics/gfan/metadata.xml b/sci-mathematics/gfan/metadata.xml
new file mode 100644
index 000000000000..abc08ece6082
--- /dev/null
+++ b/sci-mathematics/gfan/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+ </maintainer>
+<longdescription lang="en">
+ gfan is a computer algebra tool to compute Groebner fans and tropical varieties.
+</longdescription>
+</pkgmetadata>