summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Kahle <tomka@gentoo.org>2010-11-12 15:04:32 +0000
committerThomas Kahle <tomka@gentoo.org>2010-11-12 15:04:32 +0000
commit9328ed9c5691c4dcc5b3cffa15d8ff441e93a068 (patch)
tree1d13bd26c8619bde74eddbee9bd5fc3026b84a96 /sci-libs/cdd+
parentNew package: sci-mathematics/gfan imported from science overlay. (diff)
downloadgentoo-2-9328ed9c5691c4dcc5b3cffa15d8ff441e93a068.tar.gz
gentoo-2-9328ed9c5691c4dcc5b3cffa15d8ff441e93a068.tar.bz2
gentoo-2-9328ed9c5691c4dcc5b3cffa15d8ff441e93a068.zip
New package: sci-libs/cdd+ imported from science overlay.
Fixes bug 301567. (Portage version: 2.1.9.24/cvs/Linux i686)
Diffstat (limited to 'sci-libs/cdd+')
-rw-r--r--sci-libs/cdd+/ChangeLog11
-rw-r--r--sci-libs/cdd+/cdd+-077a.ebuild38
-rw-r--r--sci-libs/cdd+/files/cdd+-077a-gentoo.patch43
-rw-r--r--sci-libs/cdd+/files/cdd+-077a-headers.patch69
-rw-r--r--sci-libs/cdd+/metadata.xml10
5 files changed, 171 insertions, 0 deletions
diff --git a/sci-libs/cdd+/ChangeLog b/sci-libs/cdd+/ChangeLog
new file mode 100644
index 000000000000..965377885f9a
--- /dev/null
+++ b/sci-libs/cdd+/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for sci-libs/cdd+
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/cdd+/ChangeLog,v 1.1 2010/11/12 15:04:32 tomka Exp $
+
+*cdd+-077a (12 Nov 2010)
+
+ 12 Nov 2010; Thomas Kahle <tomka@gentoo.org> +cdd+-077a.ebuild,
+ +files/cdd+-077a-gentoo.patch, +files/cdd+-077a-headers.patch,
+ +metadata.xml:
+ initial import from science overlay. Fixes bug #301567.
+
diff --git a/sci-libs/cdd+/cdd+-077a.ebuild b/sci-libs/cdd+/cdd+-077a.ebuild
new file mode 100644
index 000000000000..a8ca25b9433f
--- /dev/null
+++ b/sci-libs/cdd+/cdd+-077a.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/cdd+/cdd+-077a.ebuild,v 1.1 2010/11/12 15:04:32 tomka Exp $
+
+EAPI="3"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Another implementation of the double description method"
+HOMEPAGE="http://www.ifor.math.ethz.ch/~fukuda/cdd_home/"
+SRC_URI="ftp://ftp.ifor.math.ethz.ch/pub/fukuda/cdd/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-libs/gmp"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-headers.patch"
+ epatch "${FILESDIR}/${P}-gentoo.patch"
+}
+
+src_compile() {
+ emake \
+ CC="$(tc-getCC)" \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ GMPLIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ GMPINCLUDE="${EPREFIX}/usr/include" \
+ all || die
+
+}
+
+src_install() {
+ dobin cddr+ cddf+ || die
+}
diff --git a/sci-libs/cdd+/files/cdd+-077a-gentoo.patch b/sci-libs/cdd+/files/cdd+-077a-gentoo.patch
new file mode 100644
index 000000000000..efe6d7035e99
--- /dev/null
+++ b/sci-libs/cdd+/files/cdd+-077a-gentoo.patch
@@ -0,0 +1,43 @@
+--- makefile.orig 2010-01-19 20:22:59.000000000 +0100
++++ makefile 2010-01-19 20:52:01.000000000 +0100
+@@ -6,21 +6,21 @@
+ #CC = /bin/cc
+
+ # Location of gnu c++ library.
+-#LIBDIR = /usr/lib
+-LIBDIR = /usr/local/lib
++LIBDIR = /usr/lib
++#LIBDIR = /usr/local/lib
+
+ # Location of gnu gmp library libgmp.a
+-#GMPLIBDIR = /usr/lib
+-GMPLIBDIR = /usr/local/lib
++GMPLIBDIR = /usr/lib
++#GMPLIBDIR = /usr/local/lib
+
+ # Location of gnu gmp-library include file gmp.h
+-#GMPINCLUDEDIR = /usr/include
+-GMPINCLUDEDIR = /usr/local/include
++GMPINCLUDEDIR = /usr/include
++#GMPINCLUDEDIR = /usr/local/include
+
+ # Compiler optimization/debug options
+ #OPTFLAGS = -g -static -O
+ #OPTFLAGS = -g -static -pg -O
+-OPTFLAGS = -O3
++#OPTFLAGS = -O3
+
+ ########## You shouldn't have to change anything after this point ##########
+
+@@ -29,9 +29,8 @@
+ RATOBJ = gmp_init.o Integer.o Rational.o
+ RATEXE = cddr+
+
+-CFLAGS = $(OPTFLAGS) -I$(INCLUDEDIR) -I$(GMPINCLUDEDIR) -I. $(GMPFLAG)
+-
+-LDFLAGS = -L$(LIBDIR) -L$(GMPLIBDIR)
++CFLAGS += -I$(INCLUDEDIR) -I$(GMPINCLUDEDIR) -I. $(GMPFLAG)
++LDFLAGS += -L$(LIBDIR) -L$(GMPLIBDIR)
+
+ LIBS = -lstdc++ -l$(RATLIB)
+
diff --git a/sci-libs/cdd+/files/cdd+-077a-headers.patch b/sci-libs/cdd+/files/cdd+-077a-headers.patch
new file mode 100644
index 000000000000..1d95414a929d
--- /dev/null
+++ b/sci-libs/cdd+/files/cdd+-077a-headers.patch
@@ -0,0 +1,69 @@
+Index: Integer.h
+===================================================================
+RCS file: /home/imocvs/cdd+/Integer.h,v
+retrieving revision 1.1.1.1
+diff -u -p -r1.1.1.1 Integer.h
+--- Integer.h 2008/12/15 01:19:52 1.1.1.1
++++ Integer.h 2008/12/15 01:24:04
+@@ -23,6 +23,7 @@
+ #include <gmp_init.h>
+ #include <cctype>
+ #include <limits>
++#include <climits>
+
+ class Integer; class Rational;
+
+Index: Rational.cc
+===================================================================
+RCS file: /home/imocvs/cdd+/Rational.cc,v
+retrieving revision 1.1.1.1
+diff -u -p -r1.1.1.1 Rational.cc
+--- Rational.cc 2008/12/15 01:19:52 1.1.1.1
++++ Rational.cc 2008/12/15 01:25:14
+@@ -17,6 +17,7 @@
+
+ #include <cctype>
+ #include "Rational.h"
++#include <cstring>
+
+ Rational& Rational::set(const char* s) throw (gmp_error)
+ {
+Index: Rational.h
+===================================================================
+RCS file: /home/imocvs/cdd+/Rational.h,v
+retrieving revision 1.1.1.1
+diff -u -p -r1.1.1.1 Rational.h
+--- Rational.h 2008/12/15 01:19:52 1.1.1.1
++++ Rational.h 2008/12/15 01:27:08
+@@ -17,6 +17,7 @@
+ #define _POLYMAKE_GMP_RATIONAL_H "$Project: polymake $$Id: cdd+-077a-headers.patch,v 1.1 2010/11/12 15:04:32 tomka Exp $"
+
+ #include <Integer.h>
++#include <cstring>
+
+ #if __GNU_MP_VERSION < 4
+ #define _tmp_little_Integer(x) \
+@@ -1178,7 +1179,7 @@ std::basic_ostream<char, Traits>& operat
+ Integer::little_buffer buf(s);
+ numerator(a).putstr(os.flags(), buf);
+ if (show_den) {
+- char *den_buf=buf+strlen(buf);
++ char *den_buf=buf+std::strlen(buf);
+ *den_buf++ = '/';
+ denominator(a).putstr(os.flags(), den_buf);
+ }
+Index: gmp_init.cc
+===================================================================
+RCS file: /home/imocvs/cdd+/gmp_init.cc,v
+retrieving revision 1.1.1.1
+diff -u -p -r1.1.1.1 gmp_init.cc
+--- gmp_init.cc 2008/12/15 01:19:52 1.1.1.1
++++ gmp_init.cc 2008/12/15 01:23:45
+@@ -16,6 +16,7 @@
+ #ident "$Project: polymake $$Id: cdd+-077a-headers.patch,v 1.1 2010/11/12 15:04:32 tomka Exp $"
+
+ #include <memory>
++#include <cstring>
+ #include "gmp_init.h"
+
+ #if defined(__GNUC__)
diff --git a/sci-libs/cdd+/metadata.xml b/sci-libs/cdd+/metadata.xml
new file mode 100644
index 000000000000..3444aa87b903
--- /dev/null
+++ b/sci-libs/cdd+/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-mathematics</herd>
+ <longdescription>
+ The program cdd+ is a C++ implementation of the Double Description Method of Motzkin et al. for generating all
+ vertices (i.e. extreme points) and extreme rays of a general convex polyhedron in R^d given by a system of linear
+ inequalities: P = { x : A x &lt;= b } where A is an m x d real matrix and b is a real m dimensional vector.
+ </longdescription>
+</pkgmetadata>