forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Package-Manager: Portage-2.3.6, Repoman-2.3.3
- Loading branch information
Showing
5 changed files
with
147 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
} |
43 changes: 43 additions & 0 deletions
43
sci-libs/cddlib/files/cddlib-094h-add-cdd_both_reps-binary.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,25 +2,28 @@ | |
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<maintainer type="project"> | ||
<email>[email protected]</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 >= 0 } | ||
|
||
P = { x=(x1, ..., xd)^T : b - A x >= 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> |