diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-libs/cddlib |
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-libs/cddlib')
-rw-r--r-- | sci-libs/cddlib/Manifest | 11 | ||||
-rw-r--r-- | sci-libs/cddlib/cddlib-094g.ebuild | 43 | ||||
-rw-r--r-- | sci-libs/cddlib/cddlib-094h.ebuild | 45 | ||||
-rw-r--r-- | sci-libs/cddlib/files/cdd_both_reps.c | 255 | ||||
-rw-r--r-- | sci-libs/cddlib/files/cddlib-094g-add-cdd_both_reps-binary.patch | 41 | ||||
-rw-r--r-- | sci-libs/cddlib/files/cddlib-094h-add-cdd_both_reps-binary.patch | 43 | ||||
-rw-r--r-- | sci-libs/cddlib/files/cddlib-094h-enforce-no-gmp.patch | 37 | ||||
-rw-r--r-- | sci-libs/cddlib/metadata.xml | 29 |
8 files changed, 504 insertions, 0 deletions
diff --git a/sci-libs/cddlib/Manifest b/sci-libs/cddlib/Manifest new file mode 100644 index 000000000000..b952037a9d1c --- /dev/null +++ b/sci-libs/cddlib/Manifest @@ -0,0 +1,11 @@ +AUX cdd_both_reps.c 6439 SHA256 a0a799dfffd38447cf4e513e92780ca89429abf0c2ea6d983811fdf856613e65 SHA512 5aaf99344a823f908ffb54dc5fa153a865f11c7a4fdcde8773627de794a55f376f78f8cc19e40f6e62aceeec2d855aedcf43b0d332dc3c7231356a43b6a6715e WHIRLPOOL 0afc3949188620cdad182528dd4c99e2c1361b31ba0ba8e7070439f470bfc2f9285f53880590ee45354c06f01feeda09ce65e8ed8efa6dfa8c80b1f66a3372c3 +AUX cddlib-094g-add-cdd_both_reps-binary.patch 1210 SHA256 f0a317406ef224f392813e94d2d92615e91c9e2303b812b3c4bdc3e73f22075a SHA512 c69c6d2ebbfbf132a287032ac1470fcce0c0d1e000dd96501f271ff200034567056d3948626023722c83082289f40122b0eacf35d10d2497f36ab226a9316348 WHIRLPOOL 3d7723421b10af94284291ebbd45202522a14cf57316f981081a4fdca5b677f21bef38ae431b2604b20b834f41be11d5de75cd7f581141dc1468948d91706346 +AUX cddlib-094h-add-cdd_both_reps-binary.patch 1601 SHA256 ec750d791829f3124787e2d4a376ff8316e179600505fee5513ca0e3320535d2 SHA512 ccd75d42aa3bb1f753197fd3be7a6561f0bf419396cfbd42a6072b9d27955c5d80eff71622c6b54b26ed6cbe03544ae3bf61e0773c5630f1ce964845e71f7015 WHIRLPOOL a560f34568e3083fbacbddc4919658c9c23dec6defc7037d2cc624ea2d826852a6186f7397574cd8a87a3eac211a829577a761a7afa39dfd77fb0475bb932485 +AUX cddlib-094h-enforce-no-gmp.patch 1155 SHA256 aa45650e4902c8a9afb30c65b8bdb0f942e9a4f10418e09448abc8ab934a978e SHA512 113f4d9cf812c46663a87e1c22c56e41717ac93b1e022f99ad011917cf96cd25ada7670e3270a40f3b9dbdf8e88e6cefe9fcc03971f0cf17488c9a59a1612de6 WHIRLPOOL 7b76bfe4d3615375fd979f40e8feebd3cb4be6040fc0c76cf436f62b172eb5397a144bb68fca53d5c0294e0f864fd5f1449d544c2f85e64d2652216c66be1329 +DIST cddlib-094g.tar.gz 1383388 SHA256 af1b81226514abf731800e2e104def8a7274817d7e645693f8b99fc2b1432155 SHA512 e1053c6e34f79add53b2880c7664f9c20c0a6de636aa5de4c6a9dfc4d1d241221601c37d15e1833bcd5b1162512c3fbaed4046f771bc0a1e5753b713d6840b77 WHIRLPOOL e10d7be9989fee69827c66075be3dea4ef6751c42b7cdd21b3b07b3904387b1609314844dca0395ee7fb0b1d1cdb4fc978b4ebd0ce778f91d526276dd8ab7117 +DIST cddlib-094h.tar.gz 1678116 SHA256 fe6d04d494683cd451be5f6fe785e147f24e8ce3ef7387f048e739ceb4565ab5 SHA512 22160c88832b78dd568b58c1e097e4c6006f82580f1114a3ef03fc10bde98132337d5b555306b58b65aac6fea1534d9e09725907808c969de16c2dfc75f80204 WHIRLPOOL 23058056b1d9d8250ccffb1040d4ab2306f88e00f1b790cd6e38fc7fc634816d0f552fdee88038080172a8f8212d41eefaede1cd00246c82e8a7b88aceb4df15 +EBUILD cddlib-094g.ebuild 1014 SHA256 a57494083b1224ae50d6f15a0043871995624ab6c418ee8aac63717cb3566fa2 SHA512 f59749d1d10d844dfd97eafbbb1a752424f26af88652ff52d6f8a1fac2f1849051184a68c03f6bc82f548d0b550f12623c9ecce6c1e0aea2b1a9683779e57ef9 WHIRLPOOL dac8d36eb80f4e12f9a5c00b1a651a1211bc0dcd457c6532709a25eea17f4bb9b9fc04f3e65babb4de9b814de2ca2bf688ce127ea2f08238a982a656aa5d82db +EBUILD cddlib-094h.ebuild 1133 SHA256 c7909d78667f48464cab483b068005abb9f4cafb1a8192f1dbb259f62a8f6791 SHA512 82955079415a3be974df9393350cf0e58dbf3c5c84dee1460e4db0c6f96049b71798b21e9b4d6f986a3f6e65cbb652da2fccc569a3e34309fd0d1316ff8acc94 WHIRLPOOL 2c464ce9237dd2cff80a579be7fe4d6cacdb9a692cf7d1b860aff15a3b8aac3b9a3f42d828e274ceecb8016c33ee7432ddb5c8ca20d5302cd949b00a230fc6da +MISC ChangeLog 2938 SHA256 8b6efd2b180d598c2d37047f72725e95c67983de942b0806d90ee959bb04a506 SHA512 d05d0fcd1d1a02f11274011251c3a865cfc02090d745aa3ba50b5249887f50052138d627877e1b951cbea52306f2ab0c6341239e8ccfca47b72a7fe5cfc5a86b WHIRLPOOL 387d9204907c0193e5574c40d3e311172a6502767e4de92137f68d2a8eb4f3961696f88918d3c66f921611ab69d8f5e8e35cd53661cfc4a9902a5b568e0659fb +MISC ChangeLog-2015 1622 SHA256 7101ff534e396ecf9712f753a816a50250233ceaea2dd6f08446e471a06208d5 SHA512 d27614a019a40f72d1fa55d9d989b3a1c6f2bd62e687281e36c62bdd93b4c1dcca7f12b4dbc354713b5576cf300a34c727e8876144ca36cb3d5d0ddd945edac2 WHIRLPOOL 9bad11da28535e89323be8a456ba1c925c2bdc1e49f13b21bf6fe7eac00f752e93bce7e753794930eefce3886120b385e4f516320909c0482aafbf469dd2cb1c +MISC metadata.xml 1238 SHA256 9be90eff3a68c0fabe14e2eafdf53f0164533eb076662416665751fd8a438d05 SHA512 f9422c30988d6e2ef87f650906dc500fd3dc8203745c5a8e261dbce3dd2daa307c9e8245deb64dad70a594a92f78ec2add3d77aacc94d2490ac2e9c1bfe1e4b1 WHIRLPOOL 6abcdd244f366ce01e9fbf4b9c29051201052c2c09b7005f6da3aad1063af712f2e23125f8ecfed1597befa2bfce9869c954432d088cc780bdfc59db12049ce9 diff --git a/sci-libs/cddlib/cddlib-094g.ebuild b/sci-libs/cddlib/cddlib-094g.ebuild new file mode 100644 index 000000000000..6a37b6d4ec1e --- /dev/null +++ b/sci-libs/cddlib/cddlib-094g.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +AUTOTOOLS_AUTORECONF=true + +inherit autotools-utils + +DESCRIPTION="C implementation of the Double Description Method of Motzkin et al" +HOMEPAGE="http://www.ifor.math.ethz.ch/~fukuda/cdd_home/" +SRC_URI="ftp://ftp.ifor.math.ethz.ch/pub/fukuda/cdd/${P}.tar.gz" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="amd64 ~arm ppc x86 ~amd64-linux ~x86-linux" +IUSE="doc static-libs" + +DEPEND=">=dev-libs/gmp-4.2.2:0=" +RDEPEND="${DEPEND}" + +AUTOTOOLS_IN_SOURCE_BUILD="1" + +DOCS=( ChangeLog README ) + +PATCHES=( + "${FILESDIR}"/${P}-add-cdd_both_reps-binary.patch +) + +src_prepare() { + autotools-utils_src_prepare + + cp "${FILESDIR}"/cdd_both_reps.c "${S}"/src/ \ + || die "failed to copy source file" + ln -s "${S}"/src/cdd_both_reps.c "${S}"/src-gmp/cdd_both_reps.c \ + || die "failed to make symbolic link to source file" +} + +src_install() { + use doc && DOCS+=( doc/cddlibman.pdf doc/cddlibman.ps ) + + autotools-utils_src_install +} 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/cdd_both_reps.c b/sci-libs/cddlib/files/cdd_both_reps.c new file mode 100644 index 000000000000..3de4247e3016 --- /dev/null +++ b/sci-libs/cddlib/files/cdd_both_reps.c @@ -0,0 +1,255 @@ +/* cdd_both_reps.c: compute reduced H and V representation of polytope + by Volker Braun <vbraun@stp.dias.ie> + + The input is taken from stdin and can be either a + H or V representation, not necessarily reduced. + + based on testcdd1.c, redcheck.c, and of course the cdd library + written by Komei Fukuda, fukuda@ifor.math.ethz.ch + Standard ftp site: ftp.ifor.math.ethz.ch, Directory: pub/fukuda/cdd +*/ + +/* This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "setoper.h" +#include "cdd.h" +#include <stdio.h> +#include <stdlib.h> +#include <time.h> +#include <math.h> +#include <string.h> + + + + + +void compute_adjacency(dd_MatrixPtr Rep, dd_ErrorType* err_ptr) +{ + dd_SetFamilyPtr AdjacencyGraph; + if (*err_ptr != dd_NoError) return; + + switch (Rep->representation) { + case dd_Inequality: + printf("Facet graph\n"); + break; + case dd_Generator: + printf("Vertex graph\n"); + break; + case dd_Unspecified: + printf("unknown representation type!\n"); + default: + printf("This should be unreachable!\n"); + exit(2); + } + + /* Output adjacency of vertices/rays/lines */ + if (Rep->rowsize > 0) { /* workaround for bug with empty polyhedron */ + /* compute adjacent vertices/rays/lines */ + AdjacencyGraph = dd_Matrix2Adjacency(Rep, err_ptr); + if (*err_ptr == dd_NoError) { + dd_WriteSetFamily(stdout,AdjacencyGraph); + dd_FreeSetFamily(AdjacencyGraph); + } + } else { + printf("begin\n"); + printf(" 0 0\n"); + printf("end\n"); + } + + printf("\n"); +} + + +void minimal_Vrep_Hrep(dd_MatrixPtr M, + dd_MatrixPtr* Vrep_ptr, dd_MatrixPtr* Hrep_ptr, + dd_ErrorType* err_ptr) +{ + dd_PolyhedraPtr poly; + dd_rowindex newpos; + dd_rowset impl_linset,redset; + dd_MatrixPtr Vrep, Hrep; + + if (*err_ptr != dd_NoError) return; + + /* compute the second representation */ + poly = dd_DDMatrix2Poly(M, err_ptr); + if (*err_ptr != dd_NoError) return; + + if (*err_ptr == dd_NoError) { + /* compute canonical H-representation */ + Hrep = dd_CopyInequalities(poly); + if (Hrep->rowsize > 0) { /* workaround for bug with empty matrix */ + dd_MatrixCanonicalize(&Hrep, &impl_linset, &redset, &newpos, err_ptr); + if (*err_ptr == dd_NoError) { + set_free(redset); + set_free(impl_linset); + free(newpos); + } + } + if (*err_ptr == dd_NoError) (*Hrep_ptr) = Hrep; + } + + if (*err_ptr == dd_NoError) { + /* compute canonical V-representation */ + Vrep = dd_CopyGenerators(poly); + if (Vrep->rowsize > 0) { /* workaround for bug with empty matrix */ + dd_MatrixCanonicalize(&Vrep, &impl_linset, &redset, &newpos, err_ptr); + if (*err_ptr == dd_NoError) { + set_free(redset); + set_free(impl_linset); + free(newpos); + } + } + if (*err_ptr == dd_NoError) (*Vrep_ptr) = Vrep; + } + + dd_FreePolyhedra(poly); +} + + +void print_both_reps(dd_MatrixPtr Vrep, dd_MatrixPtr Hrep) +{ + /* Output V-representation */ + dd_WriteMatrix(stdout,Vrep); + printf("\n"); + + /* Output H-representation */ + dd_WriteMatrix(stdout,Hrep); + printf("\n"); +} + + +void compute_both_reps(dd_MatrixPtr M, dd_ErrorType* err_ptr) +{ + dd_MatrixPtr Vrep, Hrep; + minimal_Vrep_Hrep(M, &Vrep, &Hrep, err_ptr); + if (*err_ptr != dd_NoError) return; + + print_both_reps(Vrep, Hrep); + dd_FreeMatrix(Hrep); + dd_FreeMatrix(Vrep); +} + + +void compute_all(dd_MatrixPtr M, dd_ErrorType* err_ptr) +{ + dd_MatrixPtr Vrep, Hrep; + minimal_Vrep_Hrep(M, &Vrep, &Hrep, err_ptr); + if (*err_ptr != dd_NoError) return; + + print_both_reps(Vrep, Hrep); + compute_adjacency(Vrep, err_ptr); + compute_adjacency(Hrep, err_ptr); + dd_FreeMatrix(Hrep); + dd_FreeMatrix(Vrep); +} + + + +void usage(char *name) +{ + printf("No known option specified, I don't know what to do!\n" + "Usage:\n" + "%s --option\n" + "where --option is precisely one of the following:\n\n" + " --all: Compute everything.\n" + " This will compute minimal H-,V-representation and vertex and facet graph.\n" + "\n" + " --reps: Compute both a minimal H- and minimal V-representation.\n" + "\n" + " --adjacency: Compute adjacency information only.\n" + " The input is assumed to be a minimal representation, as, for example, computed\n" + " by --reps. Warning, you will not get the correct answer if the input\n" + " representation is not minimal! The output is the vertex or facet graph,\n" + " depending on the input.\n" + "\n" + "The input data is a H- or V-representation in cdd's ine/ext format and\n" + "is in each case read from stdin.\n", + name); +} + + +enum command_line_arguments { ALL, REPS, ADJACENCY }; + + +int parse_arguments(char* arg, enum command_line_arguments* option) +{ + if (strcmp(arg,"--all")==0) { + *option = ALL; + return 0; + } + if (strcmp(arg,"--reps")==0) { + *option = REPS; + return 0; + } + if (strcmp(arg,"--adjacency")==0) { + *option = ADJACENCY; + return 0; + } + printf("Unknown option: %s\n", arg); + return 1; +} + + +int main(int argc, char *argv[]) +{ + dd_ErrorType err=dd_NoError; + dd_MatrixPtr M; + enum command_line_arguments option; + + if (argc!=2 || parse_arguments(argv[1],&option)) { + usage(argv[0]); + return 0; + } + + dd_set_global_constants(); + + /* Read data from stdin */ + M = dd_PolyFile2Matrix(stdin, &err); + if (err != dd_NoError) { + printf("I was unable to parse the input data!\n"); + dd_WriteErrorMessages(stdout,err); + dd_free_global_constants(); + return 1; + } + + switch (option) { + case ALL: + compute_all(M,&err); + break; + case REPS: + compute_both_reps(M,&err); + break; + case ADJACENCY: + compute_adjacency(M,&err); + break; + default: + printf("unreachable option %d\n", option); + exit(3); /* unreachable */ + } + + /* cleanup */ + dd_FreeMatrix(M); + if (err != dd_NoError) { + dd_WriteErrorMessages(stdout,err); + } + + dd_free_global_constants(); + return 0; +} + + + diff --git a/sci-libs/cddlib/files/cddlib-094g-add-cdd_both_reps-binary.patch b/sci-libs/cddlib/files/cddlib-094g-add-cdd_both_reps-binary.patch new file mode 100644 index 000000000000..3aa5912b7460 --- /dev/null +++ b/sci-libs/cddlib/files/cddlib-094g-add-cdd_both_reps-binary.patch @@ -0,0 +1,41 @@ +--- src-gmp/Makefile.am 2009-01-26 09:30:16.000000000 +0000 ++++ src-gmp/Makefile.am 2009-10-04 10:36:17.000000000 +0100 +@@ -11,7 +11,8 @@ + testcdd2_gmp \ + testlp1_gmp \ + testlp2_gmp \ +-testlp3_gmp ++testlp3_gmp \ ++cdd_both_reps_gmp + #cddmathlink + + scdd_gmp_SOURCES = simplecdd.c +@@ -27,6 +28,7 @@ + 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 +--- src/Makefile.am 2009-01-26 09:30:03.000000000 +0000 ++++ src/Makefile.am 2009-10-04 10:36:17.000000000 +0100 +@@ -11,7 +11,8 @@ + testcdd2 \ + testlp1 \ + testlp2 \ +-testlp3 ++testlp3 \ ++cdd_both_reps + #cddmathlink + + scdd_SOURCES = simplecdd.c +@@ -27,6 +28,7 @@ + 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-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 new file mode 100644 index 000000000000..a93a12f9174f --- /dev/null +++ b/sci-libs/cddlib/metadata.xml @@ -0,0 +1,29 @@ +<?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"> + 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 } + + 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> |