Gentoo Archives: gentoo-commits

From: Sebastien Fabbro <bicatali@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/cddlib/files/, sci-libs/cddlib/
Date: Mon, 31 Jul 2017 18:13:01
Message-Id: 1501524740.78e3a61a68c916450aa4e5ceecd20041583af901.bicatali@gentoo
1 commit: 78e3a61a68c916450aa4e5ceecd20041583af901
2 Author: Sébastien Fabbro <bicatali <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 29 23:25:17 2017 +0000
4 Commit: Sebastien Fabbro <bicatali <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 31 18:12:20 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78e3a61a
7
8 sci-libs/cddlib: version bump
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.3
11
12 sci-libs/cddlib/Manifest | 1 +
13 sci-libs/cddlib/cddlib-094h.ebuild | 45 ++++++++++++++++++++++
14 .../cddlib-094h-add-cdd_both_reps-binary.patch | 43 +++++++++++++++++++++
15 .../cddlib/files/cddlib-094h-enforce-no-gmp.patch | 37 ++++++++++++++++++
16 sci-libs/cddlib/metadata.xml | 39 ++++++++++---------
17 5 files changed, 147 insertions(+), 18 deletions(-)
18
19 diff --git a/sci-libs/cddlib/Manifest b/sci-libs/cddlib/Manifest
20 index 47a43eccb90..1dc9cd9d3a3 100644
21 --- a/sci-libs/cddlib/Manifest
22 +++ b/sci-libs/cddlib/Manifest
23 @@ -1 +1,2 @@
24 DIST cddlib-094g.tar.gz 1383388 SHA256 af1b81226514abf731800e2e104def8a7274817d7e645693f8b99fc2b1432155 SHA512 e1053c6e34f79add53b2880c7664f9c20c0a6de636aa5de4c6a9dfc4d1d241221601c37d15e1833bcd5b1162512c3fbaed4046f771bc0a1e5753b713d6840b77 WHIRLPOOL e10d7be9989fee69827c66075be3dea4ef6751c42b7cdd21b3b07b3904387b1609314844dca0395ee7fb0b1d1cdb4fc978b4ebd0ce778f91d526276dd8ab7117
25 +DIST cddlib-094h.tar.gz 1678116 SHA256 fe6d04d494683cd451be5f6fe785e147f24e8ce3ef7387f048e739ceb4565ab5 SHA512 22160c88832b78dd568b58c1e097e4c6006f82580f1114a3ef03fc10bde98132337d5b555306b58b65aac6fea1534d9e09725907808c969de16c2dfc75f80204 WHIRLPOOL 23058056b1d9d8250ccffb1040d4ab2306f88e00f1b790cd6e38fc7fc634816d0f552fdee88038080172a8f8212d41eefaede1cd00246c82e8a7b88aceb4df15
26
27 diff --git a/sci-libs/cddlib/cddlib-094h.ebuild b/sci-libs/cddlib/cddlib-094h.ebuild
28 new file mode 100644
29 index 00000000000..d9dd28bdddb
30 --- /dev/null
31 +++ b/sci-libs/cddlib/cddlib-094h.ebuild
32 @@ -0,0 +1,45 @@
33 +# Copyright 1999-2017 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=6
37 +
38 +inherit autotools eutils
39 +
40 +DESCRIPTION="C implementation of the Double Description Method of Motzkin et al"
41 +HOMEPAGE="https://www.inf.ethz.ch/personal/fukudak/cdd_home/"
42 +SRC_URI="ftp://ftp.math.ethz.ch/users/fukudak/cdd/${P}.tar.gz"
43 +
44 +SLOT="0"
45 +LICENSE="GPL-2"
46 +KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux"
47 +IUSE="doc static-libs tools"
48 +
49 +DEPEND="dev-libs/gmp:0="
50 +RDEPEND="${DEPEND}"
51 +
52 +DOCS=( ChangeLog README )
53 +
54 +PATCHES=(
55 + "${FILESDIR}"/${P}-add-cdd_both_reps-binary.patch
56 + "${FILESDIR}"/${P}-enforce-no-gmp.patch
57 +)
58 +
59 +src_prepare() {
60 + default
61 + sed -e 's|localdebug=dd_TRUE|localdebug=dd_FALSE|g' \
62 + -i lib-src/cddlp.c -i lib-src-gmp/cddlp.c -i lib-src-gmp/cddlp_f.c || die
63 + cp "${FILESDIR}"/cdd_both_reps.c src || die
64 + ln -s "${S}"/src/cdd_both_reps.c "${S}"/src-gmp/cdd_both_reps.c || die
65 + eautoreconf
66 +}
67 +
68 +src_configure() {
69 + econf $(use_enable static-libs static)
70 +}
71 +
72 +src_install() {
73 + default
74 + use tools || rm "${ED}"/usr/bin/*
75 + use static-libs || prune_libtool_files --all
76 + use doc && dodoc doc/cddlibman.pdf
77 +}
78
79 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
80 new file mode 100644
81 index 00000000000..ba9a909abb1
82 --- /dev/null
83 +++ b/sci-libs/cddlib/files/cddlib-094h-add-cdd_both_reps-binary.patch
84 @@ -0,0 +1,43 @@
85 +diff -up cddlib-094g/src-gmp/Makefile.am.orig cddlib-094g/src-gmp/Makefile.am
86 +--- cddlib-094g/src-gmp/Makefile.am.orig 2012-07-05 13:30:30.982562213 -0400
87 ++++ cddlib-094g/src-gmp/Makefile.am 2012-07-05 13:31:14.576563881 -0400
88 +@@ -11,7 +11,8 @@ testcdd1_gmp \
89 + testcdd2_gmp \
90 + testlp1_gmp \
91 + testlp2_gmp \
92 +-testlp3_gmp
93 ++testlp3_gmp \
94 ++cdd_both_reps_gmp
95 + #cddmathlink
96 +
97 + scdd_gmp_SOURCES = simplecdd.c
98 +@@ -27,6 +28,7 @@ testcdd2_gmp_SOURCES = tes
99 + testlp1_gmp_SOURCES = testlp1.c
100 + testlp2_gmp_SOURCES = testlp2.c
101 + testlp3_gmp_SOURCES = testlp3.c
102 ++cdd_both_reps_gmp_SOURCES = cdd_both_reps.c
103 + # cddmathlink_SOURCES = cddmathlink.c cddmlio.h cddmlio.c
104 +
105 + LDADD = ../lib-src-gmp/libcddgmp.la
106 +diff -up cddlib-094g/src-gmp/Makefile.in.orig cddlib-094g/src-gmp/Makefile.in
107 +diff -up cddlib-094g/src/Makefile.am.orig cddlib-094g/src/Makefile.am
108 +--- cddlib-094g/src/Makefile.am.orig 2012-07-05 13:34:07.449570501 -0400
109 ++++ cddlib-094g/src/Makefile.am 2012-07-05 13:34:32.128571446 -0400
110 +@@ -11,7 +11,8 @@ testshoot \
111 + testcdd2 \
112 + testlp1 \
113 + testlp2 \
114 +-testlp3
115 ++testlp3 \
116 ++cdd_both_reps
117 + #cddmathlink
118 +
119 + scdd_SOURCES = simplecdd.c
120 +@@ -27,6 +28,7 @@ testcdd2_SOURCES = testcdd
121 + testlp1_SOURCES = testlp1.c
122 + testlp2_SOURCES = testlp2.c
123 + testlp3_SOURCES = testlp3.c
124 ++cdd_both_reps_SOURCES = cdd_both_reps.c
125 + # cddmathlink_SOURCES = cddmathlink.c cddmlio.h cddmlio.c
126 +
127 + LDADD = ../lib-src/libcdd.la
128
129 diff --git a/sci-libs/cddlib/files/cddlib-094h-enforce-no-gmp.patch b/sci-libs/cddlib/files/cddlib-094h-enforce-no-gmp.patch
130 new file mode 100644
131 index 00000000000..bab20025a79
132 --- /dev/null
133 +++ b/sci-libs/cddlib/files/cddlib-094h-enforce-no-gmp.patch
134 @@ -0,0 +1,37 @@
135 +Description: Don't link against gmp in the non-gmp version
136 + Using AC_CHECK_LIB will add -lgmp to all children, but we don't want this
137 + for the non-gmp variants. Instead, add -lgmp explicitly in gmp variants.
138 +Author: Ximin Luo <infinity0@××××××.org>
139 +Forwarded: TBD
140 +---
141 +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
142 +--- a/configure.in
143 ++++ b/configure.in
144 +@@ -14,8 +14,6 @@
145 + dnl AC_CHECK_LIB(g, main)
146 + dnl Replace `main' with a function in -lstdc:
147 + dnl AC_CHECK_LIB(stdc, main)
148 +-dnl look for gmp:
149 +-AC_CHECK_LIB(gmp, main)
150 +
151 + dnl Checks for header files.
152 + AC_HEADER_STDC
153 +--- a/lib-src-gmp/Makefile.am
154 ++++ b/lib-src-gmp/Makefile.am
155 +@@ -25,4 +25,4 @@
156 + setoper.h
157 +
158 + AM_CPPFLAGS = -I$(gmpincludedir) -DGMPRATIONAL
159 +-AM_LDFLAGS = -version-info 0:0:0
160 ++AM_LDFLAGS = -lgmp -version-info 0:0:0
161 +--- a/src-gmp/Makefile.am
162 ++++ b/src-gmp/Makefile.am
163 +@@ -32,7 +32,7 @@
164 + # cddmathlink_SOURCES = cddmathlink.c cddmlio.h cddmlio.c
165 +
166 + LDADD = ../lib-src-gmp/libcddgmp.la
167 +-AM_LDFLAGS = -L$(gmplibdir)
168 ++AM_LDFLAGS = -lgmp -L$(gmplibdir)
169 + INCLUDES = -I../lib-src-gmp
170 + INCLUDES += -I$(gmpincludedir)
171 + AM_CPPFLAGS = -DGMPRATIONAL
172
173 diff --git a/sci-libs/cddlib/metadata.xml b/sci-libs/cddlib/metadata.xml
174 index 816c168dca9..a93a12f9174 100644
175 --- a/sci-libs/cddlib/metadata.xml
176 +++ b/sci-libs/cddlib/metadata.xml
177 @@ -2,25 +2,28 @@
178 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
179 <pkgmetadata>
180 <maintainer type="project">
181 - <email>sci@g.o</email>
182 - <name>Gentoo Science Project</name>
183 + <email>sci-mathematics@g.o</email>
184 + <name>Gentoo Mathematics Project</name>
185 </maintainer>
186 <longdescription lang="en">
187 -The C-library cddlib is a C implementation of the Double Description
188 -Method of Motzkin et al. for generating all vertices (i.e. extreme points)
189 -and extreme rays of a general convex polyhedron in R^d given by a system
190 -of linear inequalities:
191 + The C-library cddlib is a C implementation of the Double Description
192 + Method of Motzkin et al. for generating all vertices (i.e. extreme points)
193 + and extreme rays of a general convex polyhedron in R^d given by a system
194 + of linear inequalities:
195 +
196 + P = { x=(x1, ..., xd)^T : b - A x &gt;= 0 }
197
198 - P = { x=(x1, ..., xd)^T : b - A x &gt;= 0 }
199 -
200 -where A is a given m x d real matrix, b is a given m-vector
201 -and 0 is the m-vector of all zeros.
202 -
203 -The program can be used for the reverse operation (i.e. convex hull
204 -computation). This means that one can move back and forth between
205 -an inequality representation and a generator (i.e. vertex and ray)
206 -representation of a polyhedron with cdd. Also, cdd can solve a linear
207 -programming problem, i.e. a problem of maximizing and minimizing
208 -a linear function over P.
209 -</longdescription>
210 + where A is a given m x d real matrix, b is a given m-vector
211 + and 0 is the m-vector of all zeros.
212 +
213 + The program can be used for the reverse operation (i.e. convex hull
214 + computation). This means that one can move back and forth between
215 + an inequality representation and a generator (i.e. vertex and ray)
216 + representation of a polyhedron with cdd. Also, cdd can solve a linear
217 + programming problem, i.e. a problem of maximizing and minimizing
218 + a linear function over P.
219 + </longdescription>
220 + <use>
221 + <flag name="tools">Add a few executables and tests for cddlib</flag>
222 + </use>
223 </pkgmetadata>