summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Kahle <tomka@gentoo.org>2010-11-12 14:50:28 +0000
committerThomas Kahle <tomka@gentoo.org>2010-11-12 14:50:28 +0000
commit52b52e0dcc3986d422e3f855e001c5d229213380 (patch)
tree559663b13f9ebffb440c5bde372ec97cd91774b9 /sci-mathematics/gfan
parentUpdate ebuild to reflect tests change. Fix license specification. Per jkt's r... (diff)
downloadgentoo-2-52b52e0dcc3986d422e3f855e001c5d229213380.tar.gz
gentoo-2-52b52e0dcc3986d422e3f855e001c5d229213380.tar.bz2
gentoo-2-52b52e0dcc3986d422e3f855e001c5d229213380.zip
New package: sci-mathematics/gfan imported from science overlay.
Fixes bug 293381, thanks to sage-on-gentoo people for contributions. (Portage version: 2.1.9.24/cvs/Linux i686)
Diffstat (limited to 'sci-mathematics/gfan')
-rw-r--r--sci-mathematics/gfan/ChangeLog12
-rw-r--r--sci-mathematics/gfan/files/gfan-0.4-fix-polynomial.patch14
-rw-r--r--sci-mathematics/gfan/files/gfan-0.4-gcc45.patch11
-rw-r--r--sci-mathematics/gfan/gfan-0.4-r1.ebuild39
-rw-r--r--sci-mathematics/gfan/metadata.xml12
5 files changed, 88 insertions, 0 deletions
diff --git a/sci-mathematics/gfan/ChangeLog b/sci-mathematics/gfan/ChangeLog
new file mode 100644
index 000000000000..8d930d9977ed
--- /dev/null
+++ b/sci-mathematics/gfan/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for sci-mathematics/gfan
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/gfan/ChangeLog,v 1.1 2010/11/12 14:50:27 tomka Exp $
+
+*gfan-0.4-r1 (12 Nov 2010)
+
+ 12 Nov 2010; Thomas Kahle <tomka@gentoo.org> +gfan-0.4-r1.ebuild,
+ +files/gfan-0.4-fix-polynomial.patch, +files/gfan-0.4-gcc45.patch,
+ +metadata.xml:
+ Initial import from science overlay. Thanks to all contributors, also
+ at sage-on-gentoo. Fixes bug 293381.
+
diff --git a/sci-mathematics/gfan/files/gfan-0.4-fix-polynomial.patch b/sci-mathematics/gfan/files/gfan-0.4-fix-polynomial.patch
new file mode 100644
index 000000000000..37c68fcaa104
--- /dev/null
+++ b/sci-mathematics/gfan/files/gfan-0.4-fix-polynomial.patch
@@ -0,0 +1,14 @@
+--- polynomial.cpp.orig 2010-02-07 08:21:23.494221736 +0000
++++ polynomial.cpp 2010-02-07 08:26:55.077158315 +0000
+@@ -463,10 +463,8 @@
+ if(isMarked())
+ {
+ IntegerVector v=m;
+- if(m.size()+1==newRing.getNumberOfVariables())
++ if(m.size()==newRing.getNumberOfVariables())
+ {
+- v.grow(m.size()+1);
+- v[m.size()]=degree-v.sum();
+ ret.mark(Monomial(newRing,v));
+ }
+ // assert(m.size()==newRing.getNumberOfVariables());
diff --git a/sci-mathematics/gfan/files/gfan-0.4-gcc45.patch b/sci-mathematics/gfan/files/gfan-0.4-gcc45.patch
new file mode 100644
index 000000000000..f60824c2f0e8
--- /dev/null
+++ b/sci-mathematics/gfan/files/gfan-0.4-gcc45.patch
@@ -0,0 +1,11 @@
+--- linalg.cpp
++++ linalg.cpp
+@@ -525,7 +525,7 @@
+ }
+
+
+-FieldMatrix::FieldMatrix FieldMatrix::solver()const
++FieldMatrix FieldMatrix::solver()const
+ {
+ FieldMatrix ret=combineOnTop(*this,theField.zHomomorphism(-1)*identity(theField,getWidth())).transposed();
+
diff --git a/sci-mathematics/gfan/gfan-0.4-r1.ebuild b/sci-mathematics/gfan/gfan-0.4-r1.ebuild
new file mode 100644
index 000000000000..551c447d702c
--- /dev/null
+++ b/sci-mathematics/gfan/gfan-0.4-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/gfan/gfan-0.4-r1.ebuild,v 1.1 2010/11/12 14:50:27 tomka Exp $
+
+EAPI="3"
+
+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}plus.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+
+DEPEND="dev-libs/gmp[-nocxx]
+ sci-libs/cddlib"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}${PV}plus/"
+
+src_prepare () {
+ sed -i -e "s/-O2/${CXXFLAGS}/" \
+ -e "/GPROFFLAG =/d" \
+ -e "s/g++/$(tc-getCXX)/" \
+ -e "s/\$(CCLINKER)/& \$(LDFLAGS)/" Makefile || die
+
+ # http://trac.sagemath.org/sage_trac/ticket/8770
+ epatch "${FILESDIR}"/${P}-gcc45.patch
+
+ # Delivered by upstream, will be applied in next release
+ epatch "${FILESDIR}"/${P}-fix-polynomial.patch
+}
+
+src_install() {
+ emake PREFIX="${ED}/usr" install || die "emake install failed"
+}
diff --git a/sci-mathematics/gfan/metadata.xml b/sci-mathematics/gfan/metadata.xml
new file mode 100644
index 000000000000..9c8024fff3cc
--- /dev/null
+++ b/sci-mathematics/gfan/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>tomka@gentoo.org</email>
+ <name>Thomas Kahle</name>
+</maintainer>
+<herd>sci-mathematics</herd>
+ <longdescription lang="en">
+ gfan is a computer algebra tool to compute Groebner fans and tropical varieties.
+</longdescription>
+</pkgmetadata>