1 |
commit: e6ac91bb5ad49225ec94b692dd4cf0d34956f3fa |
2 |
Author: François Bissey <francois.bissey <AT> canterbury <DOT> ac <DOT> nz> |
3 |
AuthorDate: Wed Apr 4 02:11:27 2012 +0000 |
4 |
Commit: Francois Bissey <f.r.bissey <AT> massey <DOT> ac <DOT> nz> |
5 |
CommitDate: Wed Apr 4 02:11:27 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=e6ac91bb |
7 |
|
8 |
Import dsdp to include a huge number of fixes and improvement |
9 |
|
10 |
--- |
11 |
sci-libs/dsdp/ChangeLog | 38 +++++++++++++ |
12 |
sci-libs/dsdp/dsdp-5.8-r2.ebuild | 75 +++++++++++++++++++++++++ |
13 |
sci-libs/dsdp/files/dsdp-5.8-gold.patch | 13 ++++ |
14 |
sci-libs/dsdp/files/dsdp-5.8-malloc.patch | 10 +++ |
15 |
sci-libs/dsdp/files/dsdp-5.8-readsdpa.patch | 11 ++++ |
16 |
sci-libs/dsdp/files/dsdp-5.8-sharedmake.patch | 36 ++++++++++++ |
17 |
sci-libs/dsdp/metadata.xml | 21 +++++++ |
18 |
7 files changed, 204 insertions(+), 0 deletions(-) |
19 |
|
20 |
diff --git a/sci-libs/dsdp/ChangeLog b/sci-libs/dsdp/ChangeLog |
21 |
new file mode 100644 |
22 |
index 0000000..cf5dbe0 |
23 |
--- /dev/null |
24 |
+++ b/sci-libs/dsdp/ChangeLog |
25 |
@@ -0,0 +1,38 @@ |
26 |
+# ChangeLog for sci-libs/dsdp |
27 |
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
28 |
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/dsdp/ChangeLog,v 1.5 2012/01/17 17:36:56 bicatali Exp $ |
29 |
+ |
30 |
+*dsdp-5.8-r2 (04 Apr 2012) |
31 |
+ |
32 |
+ 04 Apr 2012; François Bissey <francois.bissey@×××××××××××××.nz> |
33 |
+ +dsdp-5.8-r2.ebuild, +files/dsdp-5.8-gold.patch, |
34 |
+ +files/dsdp-5.8-malloc.patch, +files/dsdp-5.8-readsdpa.patch, |
35 |
+ +files/dsdp-5.8-sharedmake.patch, +metadata.xml: |
36 |
+ Massive amount of fixes: work on macos prefix with correct dylib, removal of |
37 |
+ malloc.h, stdlib.h is enough on modern |
38 |
+ systems. Fix parallel make - there was a direct call to make in make.include. |
39 |
+ Fix bug 410735 and link to lapack properly. |
40 |
+ |
41 |
+*dsdp-5.8-r1 (17 Jan 2012) |
42 |
+ |
43 |
+ 17 Jan 2012; Sébastien Fabbro <bicatali@g.o> -dsdp-5.8.ebuild, |
44 |
+ +dsdp-5.8-r1.ebuild: |
45 |
+ Now installs header files as well, bug #399035 |
46 |
+ |
47 |
+ 28 Jun 2011; Justin Lecher <jlec@g.o> dsdp-5.8.ebuild, metadata.xml: |
48 |
+ Fix sed on *FLAGS from : to | |
49 |
+ |
50 |
+ 05 Jun 2011; Justin Lecher <jlec@g.o> dsdp-5.8.ebuild, |
51 |
+ +files/dsdp-5.8-gold.patch: |
52 |
+ Make it gold resistant, #370109 |
53 |
+ |
54 |
+ 14 Mar 2011; Sébastien Fabbro <bicatali@g.o> dsdp-5.8.ebuild, |
55 |
+ +files/dsdp-5.8-readsdpa.patch: |
56 |
+ Fixed leak in one of the examples |
57 |
+ |
58 |
+*dsdp-5.8 (07 Mar 2011) |
59 |
+ |
60 |
+ 07 Mar 2011; Sébastien Fabbro <bicatali@g.o> +dsdp-5.8.ebuild, |
61 |
+ +metadata.xml: |
62 |
+ Initial import |
63 |
+ |
64 |
|
65 |
diff --git a/sci-libs/dsdp/dsdp-5.8-r2.ebuild b/sci-libs/dsdp/dsdp-5.8-r2.ebuild |
66 |
new file mode 100644 |
67 |
index 0000000..c93546b |
68 |
--- /dev/null |
69 |
+++ b/sci-libs/dsdp/dsdp-5.8-r2.ebuild |
70 |
@@ -0,0 +1,75 @@ |
71 |
+# Copyright 1999-2012 Gentoo Foundation |
72 |
+# Distributed under the terms of the GNU General Public License v2 |
73 |
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/dsdp/dsdp-5.8-r1.ebuild,v 1.1 2012/01/17 17:36:56 bicatali Exp $ |
74 |
+ |
75 |
+EAPI=4 |
76 |
+ |
77 |
+inherit eutils toolchain-funcs versionator multilib |
78 |
+ |
79 |
+MYP=DSDP${PV} |
80 |
+ |
81 |
+DESCRIPTION="Software for interior-point for semidefinite programming" |
82 |
+HOMEPAGE="http://www.mcs.anl.gov/hs/software/DSDP/" |
83 |
+SRC_URI="http://www.mcs.anl.gov/hs/software/DSDP//${MYP}.tar.gz" |
84 |
+ |
85 |
+LICENSE="BSD" |
86 |
+SLOT="0" |
87 |
+KEYWORDS="~amd64 ~x86 ~ppc-macos ~x86-macos ~x64-macos" |
88 |
+IUSE="doc examples" |
89 |
+ |
90 |
+RDEPEND="virtual/lapack" |
91 |
+DEPEND="${RDEPEND} |
92 |
+ dev-util/pkgconfig" |
93 |
+ |
94 |
+S="${WORKDIR}/${MYP}" |
95 |
+ |
96 |
+src_prepare() { |
97 |
+ epatch \ |
98 |
+ "${FILESDIR}"/${P}-readsdpa.patch \ |
99 |
+ "${FILESDIR}"/${P}-gold.patch \ |
100 |
+ "${FILESDIR}"/${P}-sharedmake.patch \ |
101 |
+ "${FILESDIR}"/${P}-malloc.patch |
102 |
+ find . -name Makefile -exec \ |
103 |
+ sed -i -e 's:make :$(MAKE) :g' '{}' \; |
104 |
+ |
105 |
+ local sharedlib="-Wl,-soname=lib${PN}$(get_libname $(get_major_version))" |
106 |
+ if [[ ${CHOST} == *-darwin* ]] ; then |
107 |
+ sharedlib="-Wl,-install_name -Wl,${EPREFIX}/usr/$(get_libdir)/lib${PN}$(get_libname $(get_major_version))" |
108 |
+ fi |
109 |
+ |
110 |
+ sed -i \ |
111 |
+ -e "s|#\(DSDPROOT[[:space:]]*=\).*|\1${S}|" \ |
112 |
+ -e "s|\(CC[[:space:]]*=\).*|\1$(tc-getCC)|" \ |
113 |
+ -e "s|\(OPTFLAGS[[:space:]]*=\).*|\1${CFLAGS}|" \ |
114 |
+ -e "s|\(LAPACKBLAS[[:space:]]*=\).*|\1 $(pkg-config --libs blas lapack)|" \ |
115 |
+ -e "s|\(^ARCH[[:space:]]*=\).*|\1$(tc-getAR) cr|" \ |
116 |
+ -e "s|\(^RANLIB[[:space:]]*=\).*|\1$(tc-getRANLIB)|" \ |
117 |
+ -e "s|libdsdp.so|lib${PN}$(get_libname $(get_major_version))|" \ |
118 |
+ make.include |
119 |
+ # separate SH_LD due to weird sed behavior |
120 |
+ sed -i "s:SH_LD =:SH_LD=$(tc-getCC) -shared ${LDFLAGS} ${sharedlib}:g" \ |
121 |
+ make.include |
122 |
+} |
123 |
+ |
124 |
+src_compile() { |
125 |
+ emake OPTFLAGS="${CFLAGS} -fPIC" dsdplibrary |
126 |
+} |
127 |
+ |
128 |
+src_test() { |
129 |
+ emake -j1 example test |
130 |
+} |
131 |
+ |
132 |
+src_install() { |
133 |
+ dolib.so lib/lib${PN}$(get_libname $(get_major_version)) |
134 |
+ dosym lib${PN}$(get_libname $(get_major_version)) /usr/$(get_libdir)/lib${PN}$(get_libname) |
135 |
+ |
136 |
+ insinto /usr/include |
137 |
+ doins include/*.h src/sdp/*.h |
138 |
+ |
139 |
+ use doc && dodoc docs/*.pdf |
140 |
+ |
141 |
+ if use examples; then |
142 |
+ insinto /usr/share/doc/${PF} |
143 |
+ doins -r examples |
144 |
+ fi |
145 |
+} |
146 |
|
147 |
diff --git a/sci-libs/dsdp/files/dsdp-5.8-gold.patch b/sci-libs/dsdp/files/dsdp-5.8-gold.patch |
148 |
new file mode 100644 |
149 |
index 0000000..ae67782 |
150 |
--- /dev/null |
151 |
+++ b/sci-libs/dsdp/files/dsdp-5.8-gold.patch |
152 |
@@ -0,0 +1,13 @@ |
153 |
+diff --git a/examples/Makefile b/examples/Makefile |
154 |
+index 8d7d433..11b9c8c 100644 |
155 |
+--- a/examples/Makefile |
156 |
++++ b/examples/Makefile |
157 |
+@@ -4,7 +4,7 @@ default: |
158 |
+ |
159 |
+ include ../make.include |
160 |
+ |
161 |
+-EXAMPLE_LIBS = ${DSDPLIB} ${LAPACKBLAS} |
162 |
++EXAMPLE_LIBS = ${DSDPLIB} ${LAPACKBLAS} -lm |
163 |
+ |
164 |
+ dsdp: exinfo clean |
165 |
+ ${MEX} -I${DSDPROOT}/include dsdp.c ${DSDPLIB}; |
166 |
|
167 |
diff --git a/sci-libs/dsdp/files/dsdp-5.8-malloc.patch b/sci-libs/dsdp/files/dsdp-5.8-malloc.patch |
168 |
new file mode 100644 |
169 |
index 0000000..48e067d |
170 |
--- /dev/null |
171 |
+++ b/sci-libs/dsdp/files/dsdp-5.8-malloc.patch |
172 |
@@ -0,0 +1,10 @@ |
173 |
+--- src/sys/dsdploginfo.c.orig 2012-04-04 09:59:25.212518434 +1200 |
174 |
++++ src/sys/dsdploginfo.c 2012-04-04 10:00:05.676522161 +1200 |
175 |
+@@ -6,7 +6,6 @@ |
176 |
+ #include <stdarg.h> |
177 |
+ #include <sys/types.h> |
178 |
+ #include <stdlib.h> |
179 |
+-#include <malloc.h> |
180 |
+ #include "dsdpsys.h" |
181 |
+ #include "dsdpbasictypes.h" |
182 |
+ |
183 |
|
184 |
diff --git a/sci-libs/dsdp/files/dsdp-5.8-readsdpa.patch b/sci-libs/dsdp/files/dsdp-5.8-readsdpa.patch |
185 |
new file mode 100644 |
186 |
index 0000000..f555e50 |
187 |
--- /dev/null |
188 |
+++ b/sci-libs/dsdp/files/dsdp-5.8-readsdpa.patch |
189 |
@@ -0,0 +1,11 @@ |
190 |
+--- examples/readsdpa.c.orig 2011-03-14 16:49:10.000000000 +0000 |
191 |
++++ examples/readsdpa.c 2011-03-14 17:05:52.000000000 +0000 |
192 |
+@@ -87,7 +87,7 @@ |
193 |
+ double ddobj,ppobj,scl,dpot; |
194 |
+ char problemname[100],thisline[100], filename[300],savefile[100]; |
195 |
+ char directory[100]="/home/benson/sdpexamples/sdplib/"; |
196 |
+- char outputfile[50]="",suffix[20]=".dat-s", tablename[20]="results-dsdp-5.8"; |
197 |
++ char outputfile[50]="",suffix[20]=".dat-s", tablename[100]="results-dsdp-5.8"; |
198 |
+ char success='s',sformat; |
199 |
+ FILE *fp1=0,*fp2=0,*fout; |
200 |
+ DSDPData dddd; |
201 |
|
202 |
diff --git a/sci-libs/dsdp/files/dsdp-5.8-sharedmake.patch b/sci-libs/dsdp/files/dsdp-5.8-sharedmake.patch |
203 |
new file mode 100644 |
204 |
index 0000000..3a146b9 |
205 |
--- /dev/null |
206 |
+++ b/sci-libs/dsdp/files/dsdp-5.8-sharedmake.patch |
207 |
@@ -0,0 +1,36 @@ |
208 |
+--- Makefile.orig 2005-10-22 08:31:14.000000000 +1300 |
209 |
++++ Makefile 2012-04-03 14:22:10.488043308 +1200 |
210 |
+@@ -10,8 +10,8 @@ |
211 |
+ include make.include |
212 |
+ |
213 |
+ dsdplibrary: chkroot info |
214 |
+- cd ${D1}; make all |
215 |
+- ${RANLIB} ${DSDPLIB} |
216 |
++ make -C ${D1} all |
217 |
++ ${SH_LD} -o ${DSDPLIBSO} lib/*.o ${LAPACKBLAS}; |
218 |
+ |
219 |
+ example: |
220 |
+ cd ${D2}; make most |
221 |
+--- make.include.orig 2005-10-22 08:31:14.000000000 +1300 |
222 |
++++ make.include 2012-04-04 12:48:12.190409224 +1200 |
223 |
+@@ -48,7 +48,7 @@ |
224 |
+ #CLINKER = ${CXX} ${OPTFLAGS} -static |
225 |
+ #CLINKER = link /out:dsdp5.exe |
226 |
+ |
227 |
+-#SH_LD = ${CC} -shared -W1,-soname, |
228 |
++SH_LD = |
229 |
+ |
230 |
+ # STEP 5: |
231 |
+ # Location of BLAS AND LAPACK libraries. |
232 |
+@@ -90,9 +90,8 @@ |
233 |
+ PP = ../ |
234 |
+ |
235 |
+ dsdplib: ${DSDPOBJ} |
236 |
+- ${ARCH} ${DSDPLIB} ${DSDPOBJ} |
237 |
+- ${RANLIB} ${DSDPLIB} |
238 |
+- make clean |
239 |
++ ${CP} ${DSDPOBJ} -t ${DSDPROOT}/lib |
240 |
++ $(MAKE) clean |
241 |
+ |
242 |
+ .c.o: |
243 |
+ ${CC} ${CFLAGS} ${DCFLAGS} -c $*.c |
244 |
|
245 |
diff --git a/sci-libs/dsdp/metadata.xml b/sci-libs/dsdp/metadata.xml |
246 |
new file mode 100644 |
247 |
index 0000000..1b56f87 |
248 |
--- /dev/null |
249 |
+++ b/sci-libs/dsdp/metadata.xml |
250 |
@@ -0,0 +1,21 @@ |
251 |
+<?xml version="1.0" encoding="UTF-8"?> |
252 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
253 |
+<pkgmetadata> |
254 |
+ <herd>sci</herd> |
255 |
+ <longdescription lang="en"> |
256 |
+ The DSDP software is a free open source implementation of an |
257 |
+ interior-point method for semidefinite programming. It provides |
258 |
+ primal and dual solutions, exploits low-rank structure and sparsity |
259 |
+ in the data, and has relatively low memory requirements for an |
260 |
+ interior-point method. It allows feasible and infeasible starting |
261 |
+ points and provides approximate certificates of infeasibility when |
262 |
+ no feasible solution exists. The dual-scaling algorithm implemented |
263 |
+ in this package has a convergence proof and worst-case polynomial |
264 |
+ complexity under mild assumptions on the data. Furthermore, the |
265 |
+ solver offers scalable parallel performance for large problems and a |
266 |
+ well documented interface. Some of the most popular applications of |
267 |
+ semidefinite programming and linear matrix inequalities (LMI) are |
268 |
+ model control, truss topology design, and semidefinite relaxations |
269 |
+ of combinatorial and global optimization problems. |
270 |
+</longdescription> |
271 |
+</pkgmetadata> |