summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Fabbro <bicatali@gentoo.org>2017-07-29 23:25:17 +0000
committerSébastien Fabbro <bicatali@gentoo.org>2017-07-31 18:12:20 +0000
commit78e3a61a68c916450aa4e5ceecd20041583af901 (patch)
treeff1d47542b3cf80f6d2b832ad601db7a8c856442 /sci-libs/cddlib
parentsci-mathematics/normaliz: version bump (diff)
downloadgentoo-78e3a61a68c916450aa4e5ceecd20041583af901.tar.gz
gentoo-78e3a61a68c916450aa4e5ceecd20041583af901.tar.bz2
gentoo-78e3a61a68c916450aa4e5ceecd20041583af901.zip
sci-libs/cddlib: version bump
Package-Manager: Portage-2.3.6, Repoman-2.3.3
Diffstat (limited to 'sci-libs/cddlib')
-rw-r--r--sci-libs/cddlib/Manifest1
-rw-r--r--sci-libs/cddlib/cddlib-094h.ebuild45
-rw-r--r--sci-libs/cddlib/files/cddlib-094h-add-cdd_both_reps-binary.patch43
-rw-r--r--sci-libs/cddlib/files/cddlib-094h-enforce-no-gmp.patch37
-rw-r--r--sci-libs/cddlib/metadata.xml39
5 files changed, 147 insertions, 18 deletions
diff --git a/sci-libs/cddlib/Manifest b/sci-libs/cddlib/Manifest
index 47a43eccb909..1dc9cd9d3a3b 100644
--- a/sci-libs/cddlib/Manifest
+++ b/sci-libs/cddlib/Manifest
@@ -1 +1,2 @@
DIST cddlib-094g.tar.gz 1383388 SHA256 af1b81226514abf731800e2e104def8a7274817d7e645693f8b99fc2b1432155 SHA512 e1053c6e34f79add53b2880c7664f9c20c0a6de636aa5de4c6a9dfc4d1d241221601c37d15e1833bcd5b1162512c3fbaed4046f771bc0a1e5753b713d6840b77 WHIRLPOOL e10d7be9989fee69827c66075be3dea4ef6751c42b7cdd21b3b07b3904387b1609314844dca0395ee7fb0b1d1cdb4fc978b4ebd0ce778f91d526276dd8ab7117
+DIST cddlib-094h.tar.gz 1678116 SHA256 fe6d04d494683cd451be5f6fe785e147f24e8ce3ef7387f048e739ceb4565ab5 SHA512 22160c88832b78dd568b58c1e097e4c6006f82580f1114a3ef03fc10bde98132337d5b555306b58b65aac6fea1534d9e09725907808c969de16c2dfc75f80204 WHIRLPOOL 23058056b1d9d8250ccffb1040d4ab2306f88e00f1b790cd6e38fc7fc634816d0f552fdee88038080172a8f8212d41eefaede1cd00246c82e8a7b88aceb4df15
diff --git a/sci-libs/cddlib/cddlib-094h.ebuild b/sci-libs/cddlib/cddlib-094h.ebuild
new file mode 100644
index 000000000000..d9dd28bdddb4
--- /dev/null
+++ b/sci-libs/cddlib/cddlib-094h.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils
+
+DESCRIPTION="C implementation of the Double Description Method of Motzkin et al"
+HOMEPAGE="https://www.inf.ethz.ch/personal/fukudak/cdd_home/"
+SRC_URI="ftp://ftp.math.ethz.ch/users/fukudak/cdd/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc static-libs tools"
+
+DEPEND="dev-libs/gmp:0="
+RDEPEND="${DEPEND}"
+
+DOCS=( ChangeLog README )
+
+PATCHES=(
+ "${FILESDIR}"/${P}-add-cdd_both_reps-binary.patch
+ "${FILESDIR}"/${P}-enforce-no-gmp.patch
+)
+
+src_prepare() {
+ default
+ sed -e 's|localdebug=dd_TRUE|localdebug=dd_FALSE|g' \
+ -i lib-src/cddlp.c -i lib-src-gmp/cddlp.c -i lib-src-gmp/cddlp_f.c || die
+ cp "${FILESDIR}"/cdd_both_reps.c src || die
+ ln -s "${S}"/src/cdd_both_reps.c "${S}"/src-gmp/cdd_both_reps.c || die
+ eautoreconf
+}
+
+src_configure() {
+ econf $(use_enable static-libs static)
+}
+
+src_install() {
+ default
+ use tools || rm "${ED}"/usr/bin/*
+ use static-libs || prune_libtool_files --all
+ use doc && dodoc doc/cddlibman.pdf
+}
diff --git a/sci-libs/cddlib/files/cddlib-094h-add-cdd_both_reps-binary.patch b/sci-libs/cddlib/files/cddlib-094h-add-cdd_both_reps-binary.patch
new file mode 100644
index 000000000000..ba9a909abb19
--- /dev/null
+++ b/sci-libs/cddlib/files/cddlib-094h-add-cdd_both_reps-binary.patch
@@ -0,0 +1,43 @@
+diff -up cddlib-094g/src-gmp/Makefile.am.orig cddlib-094g/src-gmp/Makefile.am
+--- cddlib-094g/src-gmp/Makefile.am.orig 2012-07-05 13:30:30.982562213 -0400
++++ cddlib-094g/src-gmp/Makefile.am 2012-07-05 13:31:14.576563881 -0400
+@@ -11,7 +11,8 @@ testcdd1_gmp \
+ testcdd2_gmp \
+ testlp1_gmp \
+ testlp2_gmp \
+-testlp3_gmp
++testlp3_gmp \
++cdd_both_reps_gmp
+ #cddmathlink
+
+ scdd_gmp_SOURCES = simplecdd.c
+@@ -27,6 +28,7 @@ testcdd2_gmp_SOURCES = tes
+ testlp1_gmp_SOURCES = testlp1.c
+ testlp2_gmp_SOURCES = testlp2.c
+ testlp3_gmp_SOURCES = testlp3.c
++cdd_both_reps_gmp_SOURCES = cdd_both_reps.c
+ # cddmathlink_SOURCES = cddmathlink.c cddmlio.h cddmlio.c
+
+ LDADD = ../lib-src-gmp/libcddgmp.la
+diff -up cddlib-094g/src-gmp/Makefile.in.orig cddlib-094g/src-gmp/Makefile.in
+diff -up cddlib-094g/src/Makefile.am.orig cddlib-094g/src/Makefile.am
+--- cddlib-094g/src/Makefile.am.orig 2012-07-05 13:34:07.449570501 -0400
++++ cddlib-094g/src/Makefile.am 2012-07-05 13:34:32.128571446 -0400
+@@ -11,7 +11,8 @@ testshoot \
+ testcdd2 \
+ testlp1 \
+ testlp2 \
+-testlp3
++testlp3 \
++cdd_both_reps
+ #cddmathlink
+
+ scdd_SOURCES = simplecdd.c
+@@ -27,6 +28,7 @@ testcdd2_SOURCES = testcdd
+ testlp1_SOURCES = testlp1.c
+ testlp2_SOURCES = testlp2.c
+ testlp3_SOURCES = testlp3.c
++cdd_both_reps_SOURCES = cdd_both_reps.c
+ # cddmathlink_SOURCES = cddmathlink.c cddmlio.h cddmlio.c
+
+ LDADD = ../lib-src/libcdd.la
diff --git a/sci-libs/cddlib/files/cddlib-094h-enforce-no-gmp.patch b/sci-libs/cddlib/files/cddlib-094h-enforce-no-gmp.patch
new file mode 100644
index 000000000000..bab20025a793
--- /dev/null
+++ b/sci-libs/cddlib/files/cddlib-094h-enforce-no-gmp.patch
@@ -0,0 +1,37 @@
+Description: Don't link against gmp in the non-gmp version
+ Using AC_CHECK_LIB will add -lgmp to all children, but we don't want this
+ for the non-gmp variants. Instead, add -lgmp explicitly in gmp variants.
+Author: Ximin Luo <infinity0@debian.org>
+Forwarded: TBD
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/configure.in
++++ b/configure.in
+@@ -14,8 +14,6 @@
+ dnl AC_CHECK_LIB(g, main)
+ dnl Replace `main' with a function in -lstdc:
+ dnl AC_CHECK_LIB(stdc, main)
+-dnl look for gmp:
+-AC_CHECK_LIB(gmp, main)
+
+ dnl Checks for header files.
+ AC_HEADER_STDC
+--- a/lib-src-gmp/Makefile.am
++++ b/lib-src-gmp/Makefile.am
+@@ -25,4 +25,4 @@
+ setoper.h
+
+ AM_CPPFLAGS = -I$(gmpincludedir) -DGMPRATIONAL
+-AM_LDFLAGS = -version-info 0:0:0
++AM_LDFLAGS = -lgmp -version-info 0:0:0
+--- a/src-gmp/Makefile.am
++++ b/src-gmp/Makefile.am
+@@ -32,7 +32,7 @@
+ # cddmathlink_SOURCES = cddmathlink.c cddmlio.h cddmlio.c
+
+ LDADD = ../lib-src-gmp/libcddgmp.la
+-AM_LDFLAGS = -L$(gmplibdir)
++AM_LDFLAGS = -lgmp -L$(gmplibdir)
+ INCLUDES = -I../lib-src-gmp
+ INCLUDES += -I$(gmpincludedir)
+ AM_CPPFLAGS = -DGMPRATIONAL
diff --git a/sci-libs/cddlib/metadata.xml b/sci-libs/cddlib/metadata.xml
index 816c168dca97..a93a12f9174f 100644
--- a/sci-libs/cddlib/metadata.xml
+++ b/sci-libs/cddlib/metadata.xml
@@ -2,25 +2,28 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
- <email>sci@gentoo.org</email>
- <name>Gentoo Science Project</name>
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
</maintainer>
<longdescription lang="en">
-The C-library cddlib 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:
+ The C-library cddlib 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=(x1, ..., xd)^T : b - A x &gt;= 0 }
- P = { x=(x1, ..., xd)^T : b - A x &gt;= 0 }
-
-where A is a given m x d real matrix, b is a given m-vector
-and 0 is the m-vector of all zeros.
-
-The program can be used for the reverse operation (i.e. convex hull
-computation). This means that one can move back and forth between
-an inequality representation and a generator (i.e. vertex and ray)
-representation of a polyhedron with cdd. Also, cdd can solve a linear
-programming problem, i.e. a problem of maximizing and minimizing
-a linear function over P.
-</longdescription>
+ where A is a given m x d real matrix, b is a given m-vector
+ and 0 is the m-vector of all zeros.
+
+ The program can be used for the reverse operation (i.e. convex hull
+ computation). This means that one can move back and forth between
+ an inequality representation and a generator (i.e. vertex and ray)
+ representation of a polyhedron with cdd. Also, cdd can solve a linear
+ programming problem, i.e. a problem of maximizing and minimizing
+ a linear function over P.
+ </longdescription>
+ <use>
+ <flag name="tools">Add a few executables and tests for cddlib</flag>
+ </use>
</pkgmetadata>