1 |
commit: 7728e30c9b59f5c7f4855d8fc7aa9240cda567ba |
2 |
Author: Sébastien Fabbro <bicatali <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Mar 7 20:58:31 2016 +0000 |
4 |
Commit: Sebastien Fabbro <bicatali <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Mar 7 21:02:18 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7728e30c |
7 |
|
8 |
sci-libs/atlas: initial import |
9 |
|
10 |
Required for other packages which use the pure clapack API. |
11 |
Best not used for pure blas/lapack, see science overlay instead for now. |
12 |
|
13 |
Package-Manager: portage-2.2.27 |
14 |
|
15 |
sci-libs/atlas/Manifest | 2 + |
16 |
sci-libs/atlas/atlas-3.10.2.ebuild | 221 +++++++++++++++++++++ |
17 |
.../atlas/files/atlas-3.10.2-format-security.patch | 198 ++++++++++++++++++ |
18 |
.../atlas/files/atlas-3.10.2-x32-support.patch | 93 +++++++++ |
19 |
sci-libs/atlas/metadata.xml | 22 ++ |
20 |
5 files changed, 536 insertions(+) |
21 |
|
22 |
diff --git a/sci-libs/atlas/Manifest b/sci-libs/atlas/Manifest |
23 |
new file mode 100644 |
24 |
index 0000000..caffa2c |
25 |
--- /dev/null |
26 |
+++ b/sci-libs/atlas/Manifest |
27 |
@@ -0,0 +1,2 @@ |
28 |
+DIST atlas3.10.2.tar.bz2 4904923 SHA256 3aab139b118bf3fcdb4956fbd71676158d713ab0d3bccb2ae1dc3769db22102f SHA512 9fe04cfa1f89449db047d1a4659a656964d13117c783cbbe43344eb32555736f037d9cd30c5ae1514c08ad5b8949a3982d7fe102d707ddb62288e76b2607fbb1 WHIRLPOOL e56936da713b0a1eb560d993bd29da0ac65923bdd2298c0a240a933fbf8961cd151020756ab550e716eae153d97c96d713512cda208a9c1a7c34467bd591fcd5 |
29 |
+DIST lapack-3.6.0.tgz 6792324 SHA256 a9a0082c918fe14e377bbd570057616768dca76cbdc713457d8199aaa233ffc3 SHA512 bc50441d415ef8896dd7626d77c6104184b996e758704366288089f03d4c99d068e33153b0d13305310886017e5d2e716130f812a95cfcad36ef37fe20417ab8 WHIRLPOOL 5576d0a81b2645fe95ef7011cc398f31142b8dcd01cdf5945e3db0e73ae1768766ea54254b40f4c6a581a6fb77b911595fccd597be0536833118af5877bb0c64 |
30 |
|
31 |
diff --git a/sci-libs/atlas/atlas-3.10.2.ebuild b/sci-libs/atlas/atlas-3.10.2.ebuild |
32 |
new file mode 100644 |
33 |
index 0000000..7e80dd9 |
34 |
--- /dev/null |
35 |
+++ b/sci-libs/atlas/atlas-3.10.2.ebuild |
36 |
@@ -0,0 +1,221 @@ |
37 |
+# Copyright 1999-2016 Gentoo Foundation |
38 |
+# Distributed under the terms of the GNU General Public License v2 |
39 |
+# $Id$ |
40 |
+ |
41 |
+EAPI=6 |
42 |
+ |
43 |
+FORTRAN_NEEDED=fortran |
44 |
+ |
45 |
+inherit fortran-2 toolchain-funcs versionator |
46 |
+ |
47 |
+LAPACKP=lapack-3.6.0.tgz |
48 |
+ |
49 |
+DESCRIPTION="Automatically Tuned Linear Algebra Software" |
50 |
+HOMEPAGE="http://math-atlas.sourceforge.net/" |
51 |
+SRC_URI="mirror://sourceforge/math-atlas/${PN}${PV}.tar.bz2 |
52 |
+ fortran? ( lapack? ( http://www.netlib.org/lapack/${LAPACKP} ) )" |
53 |
+ |
54 |
+LICENSE="BSD" |
55 |
+SLOT="0" |
56 |
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" |
57 |
+IUSE="doc fortran generic lapack static-libs threads" |
58 |
+ |
59 |
+RDEPEND="" |
60 |
+DEPEND="${RDEPEND}" |
61 |
+ |
62 |
+S="${WORKDIR}/ATLAS" |
63 |
+ |
64 |
+PATCHES=( |
65 |
+ "${FILESDIR}/${P}-x32-support.patch" |
66 |
+ "${FILESDIR}/${P}-format-security.patch" |
67 |
+) |
68 |
+ |
69 |
+pkg_setup() { |
70 |
+ local _cpufreq |
71 |
+ for _cpufreq in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do |
72 |
+ if [ -f ${_cpufreq} ]; then |
73 |
+ if ! grep -q performance ${_cpufreq}; then |
74 |
+ echo 2> /dev/null performance > ${_cpufreq} || \ |
75 |
+ die "${PN} needs all cpu set to performance" |
76 |
+ fi |
77 |
+ fi |
78 |
+ done |
79 |
+ use fortran && fortran-2_pkg_setup |
80 |
+} |
81 |
+ |
82 |
+src_configure() { |
83 |
+ # hack needed to trick the flaky gcc detection |
84 |
+ local mycc="$(type -P $(tc-getCC))" |
85 |
+ [[ ${mycc} == *gcc* ]] && mycc=gcc |
86 |
+ atlas_configure() { |
87 |
+ local myconf=( |
88 |
+ --prefix="${ED}/usr" |
89 |
+ --libdir="${ED}/usr/$(get_libdir)" |
90 |
+ --incdir="${ED}/usr/include" |
91 |
+ --cc="$(tc-getCC)" |
92 |
+ "-D c -DWALL" |
93 |
+ "-C acg '${mycc}'" |
94 |
+ "-F acg '${CFLAGS}'" |
95 |
+ "-Ss pmake '\$(MAKE) ${MAKEOPTS}'" |
96 |
+ ) |
97 |
+ |
98 |
+ # OpenMP shown to decreased performance over POSIX threads |
99 |
+ # (at least in 3.9.x, see atlas-dev mailing list) |
100 |
+ if use threads; then |
101 |
+ if use generic; then # 2 threads is most generic |
102 |
+ myconf+=( "-t 2" "-Si omp 0" ) |
103 |
+ else |
104 |
+ myconf+=( "-t -1" "-Si omp 0" ) |
105 |
+ fi |
106 |
+ else |
107 |
+ myconf+=( "-t 0" "-Si omp 0" ) |
108 |
+ fi |
109 |
+ |
110 |
+ if use amd64 || use ppc64 || use sparc; then |
111 |
+ if [ ${ABI} = amd64 ] || [ ${ABI} = ppc64 ] || [ ${ABI} = sparc64 ] ; then |
112 |
+ myconf+=( "-b 64" ) |
113 |
+ elif [ ${ABI} = x86 ] || [ ${ABI} = ppc ] || [ ${ABI} = sparc32 ] ; then |
114 |
+ myconf+=( "-b 32" ) |
115 |
+ elif [ ${ABI} = x32 ] ; then |
116 |
+ myconf+=( "-b 48" ) |
117 |
+ else |
118 |
+ myconf+=( "-b 64" ) |
119 |
+ fi |
120 |
+ elif use ppc || use x86; then |
121 |
+ myconf+=( "-b 32" ) |
122 |
+ elif use ia64; then |
123 |
+ myconf+=( "-b 64" ) |
124 |
+ fi |
125 |
+ if use fortran; then |
126 |
+ myconf+=( |
127 |
+ "-C if '$(type -P $(tc-getFC))'" |
128 |
+ "-F if '${FFLAGS}'" |
129 |
+ ) |
130 |
+ if use lapack; then |
131 |
+ myconf+=( |
132 |
+ "-Si latune 1" |
133 |
+ "--with-netlib-lapack-tarfile=${DISTDIR}/${LAPACKP}" |
134 |
+ ) |
135 |
+ else |
136 |
+ myconf+=( "-Si latune 0" ) |
137 |
+ fi |
138 |
+ else |
139 |
+ myconf+=( "-Si latune 0" "--nof77" ) |
140 |
+ fi |
141 |
+ # generic stuff found by make make xprint_enums in atlas build dir |
142 |
+ # basically assuming sse2+sse1 and 2 threads max |
143 |
+ use generic && use x86 && myconf+=( "-V 384 -A 13") |
144 |
+ use generic && use amd64 && myconf+=( "-V 384 -A 24") |
145 |
+ |
146 |
+ local confdir="${S}_${1}"; shift |
147 |
+ myconf+=( $@ ) |
148 |
+ mkdir "${confdir}" && cd "${confdir}" |
149 |
+ # for debugging |
150 |
+ echo ${myconf[@]} > myconf.out |
151 |
+ "${S}"/configure ${myconf[@]} || die "configure in ${confdir} failed" |
152 |
+ } |
153 |
+ |
154 |
+ atlas_configure shared "-Fa alg -fPIC" ${EXTRA_ECONF} |
155 |
+ use static-libs && atlas_configure static ${EXTRA_ECONF} |
156 |
+} |
157 |
+ |
158 |
+src_compile() { |
159 |
+ atlas_compile() { |
160 |
+ pushd "${S}_${1}" > /dev/null |
161 |
+ # atlas does its own parallel builds |
162 |
+ emake -j1 build |
163 |
+ cd lib |
164 |
+ emake libclapack.a |
165 |
+ [[ -e libptcblas.a ]] && emake libptclapack.a |
166 |
+ popd > /dev/null |
167 |
+ } |
168 |
+ |
169 |
+ atlas_compile shared |
170 |
+ use static-libs && atlas_compile static |
171 |
+} |
172 |
+ |
173 |
+src_test() { |
174 |
+ cd "${S}_shared" |
175 |
+ emake -j1 check time |
176 |
+} |
177 |
+ |
178 |
+# transform a static archive into a shared library and install them |
179 |
+# atlas_install_libs <mylib.a> [extra link flags] |
180 |
+atlas_install_libs() { |
181 |
+ local libname=$(basename ${1%.*}) |
182 |
+ einfo "Installing ${libname}" |
183 |
+ local soname=${libname}.so.$(get_major_version) |
184 |
+ shift |
185 |
+ pushd "${S}_shared"/lib > /dev/null |
186 |
+ ${LINK:-$(tc-getCC)} ${LDFLAGS} -shared -Wl,-soname=${soname} \ |
187 |
+ -Wl,--whole-archive ${libname}.a -Wl,--no-whole-archive \ |
188 |
+ "$@" -o ${soname} || die "Creating ${soname} failed" |
189 |
+ dolib.so ${soname} |
190 |
+ ln -s ${soname} ${soname%.*} |
191 |
+ dosym ${soname} /usr/$(get_libdir)/${soname%.*} |
192 |
+ popd > /dev/null |
193 |
+ use static-libs && dolib.a "${S}_static"/lib/${libname}.a |
194 |
+} |
195 |
+ |
196 |
+src_install() { |
197 |
+ cd "${S}_shared/lib" |
198 |
+ # rename to avoid collision with other packages |
199 |
+ local l |
200 |
+ for l in {,c}{blas,lapack}; do |
201 |
+ if [[ -e lib${l}.a ]]; then |
202 |
+ mv lib{,atl}${l}.a |
203 |
+ use static-libs && mv "${S}"_static/lib/lib{,atl}${l}.a |
204 |
+ fi |
205 |
+ done |
206 |
+ |
207 |
+ [[ -e libptcblas.a ]] && PTLIBS="-lpthread" |
208 |
+ |
209 |
+ # atlas |
210 |
+ atlas_install_libs libatlas.a -lm ${PTLIBS} |
211 |
+ |
212 |
+ # cblas |
213 |
+ atlas_install_libs libatlcblas.a -lm -L. -latlas |
214 |
+ |
215 |
+ # cblas threaded |
216 |
+ [[ -e libptcblas.a ]] && \ |
217 |
+ atlas_install_libs libptcblas.a -lm -L. -latlas ${PTLIBS} |
218 |
+ |
219 |
+ if use lapack; then |
220 |
+ # clapack |
221 |
+ atlas_install_libs libatlclapack.a -lm -L. -latlas -latlcblas |
222 |
+ |
223 |
+ # clapack threaded |
224 |
+ [[ -e libptclapack.a ]] && \ |
225 |
+ atlas_install_libs libptclapack.a -lm -L. -latlas -lptcblas ${PTLIBS} |
226 |
+ fi |
227 |
+ |
228 |
+ if use fortran; then |
229 |
+ LINK=$(tc-getF77) |
230 |
+ |
231 |
+ # blas |
232 |
+ atlas_install_libs libf77blas.a -lm -L. -latlas |
233 |
+ |
234 |
+ # blas threaded |
235 |
+ [[ -e libptf77blas.a ]] && \ |
236 |
+ atlas_install_libs libptf77blas.a -lm -L. -latlas ${PTLIBS} |
237 |
+ |
238 |
+ if use lapack; then |
239 |
+ # lapack |
240 |
+ atlas_install_libs libatllapack.a \ |
241 |
+ -lm -L. -latlas -latlcblas -lf77blas |
242 |
+ # lapack threaded |
243 |
+ [[ -e libptlapack.a ]] && \ |
244 |
+ atlas_install_libs libptlapack.a -lm -L. -latlas -lptcblas -lptf77blas ${PTLIBS} |
245 |
+ fi |
246 |
+ fi |
247 |
+ |
248 |
+ cd "${S}" |
249 |
+ insinto /usr/include/${PN} |
250 |
+ doins include/*.h |
251 |
+ |
252 |
+ cd "${S}/doc" |
253 |
+ dodoc INDEX.txt AtlasCredits.txt ChangeLog |
254 |
+ use doc && dodoc atlas*pdf cblas.pdf cblasqref.pdf |
255 |
+ use doc && use fortran && dodoc f77blas*pdf |
256 |
+ use doc && use fortran && use lapack && dodoc *lapack*pdf |
257 |
+} |
258 |
|
259 |
diff --git a/sci-libs/atlas/files/atlas-3.10.2-format-security.patch b/sci-libs/atlas/files/atlas-3.10.2-format-security.patch |
260 |
new file mode 100644 |
261 |
index 0000000..f3f45d7 |
262 |
--- /dev/null |
263 |
+++ b/sci-libs/atlas/files/atlas-3.10.2-format-security.patch |
264 |
@@ -0,0 +1,198 @@ |
265 |
+ bin/atlas_install.c | 46 +++++++++++++++++++++++----------------------- |
266 |
+ 1 file changed, 23 insertions(+), 23 deletions(-) |
267 |
+ |
268 |
+diff --git a/bin/atlas_install.c b/bin/atlas_install.c |
269 |
+index 2753cbf..21b716d 100644 |
270 |
+--- a/bin/atlas_install.c |
271 |
++++ b/bin/atlas_install.c |
272 |
+@@ -483,9 +483,9 @@ void PrintStartStop(FILE *fp0, FILE *fp1, int nspc, int START, int sec, |
273 |
+ fprintf(fp1, "\n\n"); |
274 |
+ } |
275 |
+ if (fp0) |
276 |
+- fprintf(fp0, ln); |
277 |
++ fprintf(fp0, "%s", ln); |
278 |
+ if (fp1) |
279 |
+- fprintf(fp1, ln); |
280 |
++ fprintf(fp1, "%s", ln); |
281 |
+ } |
282 |
+ |
283 |
+ int LnIsCont(char *ln) |
284 |
+@@ -776,11 +776,11 @@ void GoToTown(int ARCHDEF, int L1DEF, int TuneLA) |
285 |
+ if (DefInstall) |
286 |
+ { |
287 |
+ sprintf(ln, "%s IRunMMDef pre=%c %s %s\n", fmake, pre, redir, ln2); |
288 |
+- fprintf(stdout, ln); |
289 |
++ fprintf(stdout, "%s", ln); |
290 |
+ ATL_Cassert(system(ln)==0, "BUILDING BLOCK MATMUL TUNE", ln2); |
291 |
+ } |
292 |
+ sprintf(ln, "%s %s pre=%c %s %s\n", fmake, fnam, pre, redir, ln2); |
293 |
+- fprintf(stdout, ln); |
294 |
++ fprintf(stdout, "%s", ln); |
295 |
+ ATL_Cassert(system(ln)==0, "BUILDING BLOCK MATMUL TUNE", ln2); |
296 |
+ PrintBanner(ln2, 0, 2, ip+1, 1); |
297 |
+ } |
298 |
+@@ -836,7 +836,7 @@ void GoToTown(int ARCHDEF, int L1DEF, int TuneLA) |
299 |
+ if (!FileExists(fnam)) |
300 |
+ { |
301 |
+ sprintf(ln, "%s %s pre=%c %s %s", fmake, fnam, pre, redir, ln2); |
302 |
+- fprintf(stdout, ln); |
303 |
++ fprintf(stdout, "%s", ln); |
304 |
+ ATL_Cassert(system(ln)==0, "BUILDING BLOCK MATMUL TUNE", ln2); |
305 |
+ } |
306 |
+ fp = fopen(fnam, "r"); |
307 |
+@@ -854,7 +854,7 @@ void GoToTown(int ARCHDEF, int L1DEF, int TuneLA) |
308 |
+ { |
309 |
+ sprintf(ln, "%s %s pre=%c nb=%d %s %s", |
310 |
+ fmake, fnam, pre, ncnb, redir, ln2); |
311 |
+- fprintf(stdout, ln); |
312 |
++ fprintf(stdout, "%s", ln); |
313 |
+ ATL_Cassert(system(ln)==0, "BUILDING BLOCK MATMUL TUNE", ln2); |
314 |
+ } |
315 |
+ GetInstLogFile(fnam, pre, &muladd, &pf, &lat, &nb, &mu, &nu, &ku, |
316 |
+@@ -881,7 +881,7 @@ void GoToTown(int ARCHDEF, int L1DEF, int TuneLA) |
317 |
+ } |
318 |
+ |
319 |
+ sprintf(ln, "%s MMinstall pre=%c %s %s\n", fmake, pre, redir, ln2); |
320 |
+- fprintf(stdout, ln); |
321 |
++ fprintf(stdout, "%s", ln); |
322 |
+ ATL_Cassert(system(ln)==0, "BUILDING BLOCK MATMUL TUNE", ln2); |
323 |
+ |
324 |
+ fprintf(fpsum, "\n"); |
325 |
+@@ -896,7 +896,7 @@ void GoToTown(int ARCHDEF, int L1DEF, int TuneLA) |
326 |
+ PrintBanner(ln2, 1, 2, ip+1, 2); |
327 |
+ sprintf(ln, "%s INSTALL_LOG/atlas_cacheedge.h pre=%c %s %s\n", |
328 |
+ fmake, pre, redir, ln2); |
329 |
+- fprintf(stdout, ln); |
330 |
++ fprintf(stdout, "%s", ln); |
331 |
+ ATL_Cassert(system(ln)==0, "CACHEEDGE DETECTION", ln2); |
332 |
+ PrintBanner(ln2, 0, 2, ip+1, 2); |
333 |
+ } |
334 |
+@@ -922,7 +922,7 @@ void GoToTown(int ARCHDEF, int L1DEF, int TuneLA) |
335 |
+ { |
336 |
+ sprintf(ln, "%s %s pre=%c %s %s\n", |
337 |
+ fmake, ln3, pre, redir, ln2); |
338 |
+- fprintf(stdout, ln); |
339 |
++ fprintf(stdout, "%s", ln); |
340 |
+ ATL_Cassert(system(ln)==0, "CACHEEDGE DETECTION", ln2); |
341 |
+ } |
342 |
+ fp = fopen(ln3, "r"); |
343 |
+@@ -955,7 +955,7 @@ void GoToTown(int ARCHDEF, int L1DEF, int TuneLA) |
344 |
+ "\n\n STAGE 2-%d-3: COPY/NO-COPY CROSSOVER DETECTION\n", ip+1); |
345 |
+ |
346 |
+ sprintf(ln, "%s %s pre=%c %s %s\n", fmake, fnam, pre, redir, ln2); |
347 |
+- fprintf(stdout, ln); |
348 |
++ fprintf(stdout, "%s", ln); |
349 |
+ ATL_Cassert(system(ln)==0, "COPY/NO-COPY CROSSOVER DETECTION", ln2); |
350 |
+ PrintBanner(ln2, 0, 2, ip+1, 3); |
351 |
+ fprintf(stdout, " done.\n"); |
352 |
+@@ -970,17 +970,17 @@ void GoToTown(int ARCHDEF, int L1DEF, int TuneLA) |
353 |
+ { |
354 |
+ sprintf(ln, "%s INSTALL_LOG/atlas_%ctrsmXover.h pre=%c %s %s\n", |
355 |
+ fmake, pre, pre, redir, ln2); |
356 |
+- fprintf(stdout, ln); |
357 |
++ fprintf(stdout, "%s", ln); |
358 |
+ ATL_Cassert(system(ln)==0, "L3BLAS TUNING", ln2); |
359 |
+ } |
360 |
+ else |
361 |
+ { |
362 |
+ sprintf(ln, "%s Il3lib pre=%c %s %s\n", fmake, pre, redir, ln2); |
363 |
+- fprintf(stdout, ln); |
364 |
++ fprintf(stdout, "%s", ln); |
365 |
+ ATL_Cassert(system(ln)==0, "L3BLAS TUNING", ln2); |
366 |
+ } |
367 |
+ sprintf(ln, "%s %ccblaslib %s %s\n", fmake, pre, redir, ln2); /* cblas */ |
368 |
+- fprintf(stdout, ln); |
369 |
++ fprintf(stdout, "%s", ln); |
370 |
+ ATL_Cassert(system(ln)==0, "L3BLAS TUNING", ln2); |
371 |
+ PrintBanner(ln2, 0, 2, ip+1, 5); |
372 |
+ PrintStartStop(stdout, fpsum, 3, 0, 2, ip+1, 4, "L3BLAS TUNE"); |
373 |
+@@ -993,7 +993,7 @@ void GoToTown(int ARCHDEF, int L1DEF, int TuneLA) |
374 |
+ sprintf(ln2, "INSTALL_LOG/%cMVNTUNE.LOG", pre); |
375 |
+ PrintBanner(ln2, 1, 2, ip+1, 7); |
376 |
+ sprintf(ln, "%s %s pre=%c %s %s\n", fmake, fnam, pre, redir, ln2); |
377 |
+- fprintf(stdout, ln); |
378 |
++ fprintf(stdout, "%s", ln); |
379 |
+ ATL_Cassert(system(ln)==0, "MVNTUNE", ln2); |
380 |
+ ATL_Cassert(FileIsThere(fnam), "MVNTUNE", ln2); |
381 |
+ PrintBanner(ln2, 0, 2, ip+1, 7); |
382 |
+@@ -1026,7 +1026,7 @@ void GoToTown(int ARCHDEF, int L1DEF, int TuneLA) |
383 |
+ sprintf(ln2, "INSTALL_LOG/%cMVTTUNE.LOG", pre); |
384 |
+ PrintBanner(ln2, 1, 2, ip+1, 7); |
385 |
+ sprintf(ln, "%s %s pre=%c %s %s\n", fmake, fnam, pre, redir, ln2); |
386 |
+- fprintf(stdout, ln); |
387 |
++ fprintf(stdout, "%s", ln); |
388 |
+ ATL_Cassert(system(ln)==0, "MVTTUNE", ln2); |
389 |
+ ATL_Cassert(FileIsThere(fnam), "MVTTUNE", ln2); |
390 |
+ PrintBanner(ln2, 0, 2, ip+1, 7); |
391 |
+@@ -1061,7 +1061,7 @@ void GoToTown(int ARCHDEF, int L1DEF, int TuneLA) |
392 |
+ sprintf(ln2, "INSTALL_LOG/%cR1TUNE.LOG", pre); |
393 |
+ PrintBanner(ln2, 1, 2, ip+1, 7); |
394 |
+ sprintf(ln, "%s %s pre=%c %s %s\n", fmake, fnam, pre, redir, ln2); |
395 |
+- fprintf(stdout, ln); |
396 |
++ fprintf(stdout, "%s", ln); |
397 |
+ ATL_Cassert(system(ln)==0, "R1TUNE", ln2); |
398 |
+ ATL_Cassert(FileIsThere(fnam), "R1TUNE", ln2); |
399 |
+ PrintBanner(ln2, 0, 2, ip+1, 7); |
400 |
+@@ -1099,7 +1099,7 @@ void GoToTown(int ARCHDEF, int L1DEF, int TuneLA) |
401 |
+ sprintf(ln2, "INSTALL_LOG/LIBBUILD.LOG"); |
402 |
+ PrintBanner(ln2, 1, 3, 1, 1); |
403 |
+ sprintf(ln, "%s IBuildLibs %s %s\n", fmake, redir, ln2); |
404 |
+- fprintf(stdout, ln); |
405 |
++ fprintf(stdout, "%s", ln); |
406 |
+ ATL_Cassert(system(ln)==0, "LIBRARY BUILD", ln2); |
407 |
+ ATL_Cassert(FileIsThere(fnam), "LIBRARY BUILD", ln2); |
408 |
+ PrintBanner(ln2, 0, 3, 1, 1); |
409 |
+@@ -1110,7 +1110,7 @@ void GoToTown(int ARCHDEF, int L1DEF, int TuneLA) |
410 |
+ PrintBanner(ln2, 1, 4, 1, 1); |
411 |
+ PrintStartStop(stdout, fpsum, 3, 1, 4, 1, 1, "TRSM TUNE"); |
412 |
+ sprintf(ln, "%s IPostTune %s %s\n", fmake, redir, ln2); |
413 |
+- fprintf(stdout, ln); |
414 |
++ fprintf(stdout, "%s", ln); |
415 |
+ ATL_Cassert(system(ln)==0, "POST-BUILD TUNE", ln2); |
416 |
+ PrintStartStop(stdout, fpsum, 3, 0, 4, 1, 0, NULL); |
417 |
+ ATL_Cassert(FileIsThere(fnam), "POST-BUILD TUNE", ln2); |
418 |
+@@ -1121,7 +1121,7 @@ void GoToTown(int ARCHDEF, int L1DEF, int TuneLA) |
419 |
+ sprintf(ln2, "INSTALL_LOG/PTTUNE.LOG"); |
420 |
+ PrintBanner(ln2, 1, 4, 2, 0); |
421 |
+ sprintf(ln, "%s IPTtune %s %s\n", fmake, redir, ln2); |
422 |
+- fprintf(stdout, ln); |
423 |
++ fprintf(stdout, "%s", ln); |
424 |
+ ATL_Cassert(system(ln)==0, "THREADING TUNE", ln2); |
425 |
+ PrintStartStop(stdout, fpsum, 3, 0, 4, 2, 0, "THREADING TUNE"); |
426 |
+ |
427 |
+@@ -1129,7 +1129,7 @@ void GoToTown(int ARCHDEF, int L1DEF, int TuneLA) |
428 |
+ sprintf(ln2, "INSTALL_LOG/LIBPTBUILD.LOG"); |
429 |
+ PrintBanner(ln2, 1, 4, 2, 1); |
430 |
+ sprintf(ln, "%s IBuildPtlibs %s %s\n", fmake, redir, ln2); |
431 |
+- fprintf(stdout, ln); |
432 |
++ fprintf(stdout, "%s", ln); |
433 |
+ ATL_Cassert(system(ln)==0, "PTLIBRARY BUILD", ln2); |
434 |
+ PrintBanner(ln2, 0, 4, 2, 1); |
435 |
+ PrintStartStop(stdout, fpsum, 3, 0, 4, 2, 1, "THREADING BUILD"); |
436 |
+@@ -1144,7 +1144,7 @@ void GoToTown(int ARCHDEF, int L1DEF, int TuneLA) |
437 |
+ PrintStartStop(stdout, fpsum, 6, 1, 4, 3, ip+1, ln2); |
438 |
+ sprintf(ln2, "INSTALL_LOG/%cLATUNE.LOG", pre); |
439 |
+ PrintBanner(ln2, 1, 4, 3, ip+1); |
440 |
+- fprintf(stdout, ln); |
441 |
++ fprintf(stdout, "%s", ln); |
442 |
+ sprintf(ln, "%s ILATune pre=%c %s %s\n", fmake, pre, redir, ln2); |
443 |
+ ATL_Cassert(system(ln)==0, "LAPACK TUNE", ln2); |
444 |
+ PrintStartStop(stdout, fpsum, 6, 0, 4, 3, ip+1, NULL); |
445 |
+@@ -1162,7 +1162,7 @@ void GoToTown(int ARCHDEF, int L1DEF, int TuneLA) |
446 |
+ #else |
447 |
+ sprintf(ln, "%s IBuildLibs %s %s\n", fmake, redir, ln2); |
448 |
+ #endif |
449 |
+- fprintf(stdout, ln); |
450 |
++ fprintf(stdout, "%s", ln); |
451 |
+ ATL_Cassert(system(ln)==0, "STATIC LIBRARY UPDATE", ln2); |
452 |
+ PrintBanner(ln2, 0, 5, 1, 1); |
453 |
+ PrintStartStop(stdout, fpsum, 3, 0, 5, 1, 0, "FINAL STATIC LIBRARY UPDATE"); |
454 |
+@@ -1172,7 +1172,7 @@ void GoToTown(int ARCHDEF, int L1DEF, int TuneLA) |
455 |
+ sprintf(ln2, "INSTALL_LOG/LIBDYBUILD.LOG"); |
456 |
+ PrintBanner(ln2, 1, 5, 2, 1); |
457 |
+ sprintf(ln, "%s IBuildDyLibs %s %s\n", fmake, redir, ln2); |
458 |
+- fprintf(stdout, ln); |
459 |
++ fprintf(stdout, "%s", ln); |
460 |
+ ATL_Cassert(system(ln)==0, "DYLIBRARY BUILD", ln2); |
461 |
+ PrintBanner(ln2, 0, 5, 2, 1); |
462 |
+ PrintStartStop(stdout, fpsum, 3, 0, 5, 2, 0, NULL); |
463 |
|
464 |
diff --git a/sci-libs/atlas/files/atlas-3.10.2-x32-support.patch b/sci-libs/atlas/files/atlas-3.10.2-x32-support.patch |
465 |
new file mode 100644 |
466 |
index 0000000..82e6980 |
467 |
--- /dev/null |
468 |
+++ b/sci-libs/atlas/files/atlas-3.10.2-x32-support.patch |
469 |
@@ -0,0 +1,93 @@ |
470 |
+--- ATLAS/CONFIG/src/SpewMakeInc.c.orig 2012-05-24 00:56:27.000000000 +0200 |
471 |
++++ ATLAS/CONFIG/src/SpewMakeInc.c 2012-06-06 15:17:40.000000000 +0200 |
472 |
+@@ -370,7 +370,7 @@ |
473 |
+ } |
474 |
+ *f2cdefs = fdefs; |
475 |
+ *ecdefs = cdefs; |
476 |
+- if (*ptrbits != 32 && *ptrbits != 64) |
477 |
++ if (*ptrbits != 32 && *ptrbits != 64 && *ptrbits != 48) |
478 |
+ *ptrbits = 0; |
479 |
+ } |
480 |
+ char *GetPtrbitsFlag(enum OSTYPE OS, enum MACHTYPE arch, int ptrbits, |
481 |
+@@ -418,6 +418,8 @@ |
482 |
+ sp = "-m64"; |
483 |
+ else if (ptrbits == 32) |
484 |
+ sp = "-m32"; |
485 |
++ else if (ptrbits == 48 && MachIsX86(arch)) |
486 |
++ sp = "-mx32"; |
487 |
+ } |
488 |
+ return(sp); |
489 |
+ } |
490 |
+--- ATLAS/CONFIG/src/gnuccw.c.orig 2012-06-06 15:30:05.000000000 +0200 |
491 |
++++ ATLAS/CONFIG/src/gnuccw.c 2012-06-06 15:33:29.000000000 +0200 |
492 |
+@@ -363,7 +363,7 @@ |
493 |
+ * -m64/32 args get passed to comp, asm & linker |
494 |
+ */ |
495 |
+ else if (at->len == 4 && |
496 |
+- (!strcmp(at->arg, "-m64") || !strcmp(at->arg, "-m32"))) |
497 |
++ (!strcmp(at->arg, "-m64") || !strcmp(at->arg, "-m32") || !strcmp(at->arg, "-mx32"))) |
498 |
+ { |
499 |
+ if (at->arg[2] == '6') |
500 |
+ *BITS = 64; |
501 |
+--- ATLAS/CONFIG/src/gcc3p.c.orig 2012-06-06 15:29:38.000000000 +0200 |
502 |
++++ ATLAS/CONFIG/src/gcc3p.c 2012-06-06 15:31:17.000000000 +0200 |
503 |
+@@ -352,7 +352,7 @@ |
504 |
+ * -m64/32 args get passed to comp, asm & linker |
505 |
+ */ |
506 |
+ else if (at->len == 4 && |
507 |
+- (!strcmp(at->arg, "-m64") || !strcmp(at->arg, "-m32"))) |
508 |
++ (!strcmp(at->arg, "-m64") || !strcmp(at->arg, "-m32") || !strcmp(at->arg, "-mx32"))) |
509 |
+ { |
510 |
+ if (at->arg[2] == '6') |
511 |
+ { |
512 |
+--- ATLAS/CONFIG/src/gnuf90w.c.orig 2012-06-06 15:29:28.000000000 +0200 |
513 |
++++ ATLAS/CONFIG/src/gnuf90w.c 2012-06-06 15:30:36.000000000 +0200 |
514 |
+@@ -363,7 +363,7 @@ |
515 |
+ * -m64/32 args get passed to comp, asm & linker |
516 |
+ */ |
517 |
+ else if (at->len == 4 && |
518 |
+- (!strcmp(at->arg, "-m64") || !strcmp(at->arg, "-m32"))) |
519 |
++ (!strcmp(at->arg, "-m64") || !strcmp(at->arg, "-m32") || !strcmp(at->arg, "-mx32"))) |
520 |
+ { |
521 |
+ if (at->arg[2] == '6') |
522 |
+ *BITS = 64; |
523 |
+--- ATLAS/CONFIG/src/probe_comp.c.orig 2012-06-06 15:29:51.000000000 +0200 |
524 |
++++ ATLAS/CONFIG/src/probe_comp.c 2012-06-06 15:32:50.000000000 +0200 |
525 |
+@@ -614,6 +614,8 @@ |
526 |
+ sp = "-m64"; |
527 |
+ else if (ptrbits == 32) |
528 |
+ sp = "-m32"; |
529 |
++ else if (ptrbits == 48) |
530 |
++ sp = "-mx32"; |
531 |
+ } |
532 |
+ return(sp); |
533 |
+ } |
534 |
+@@ -1691,7 +1693,7 @@ |
535 |
+ } |
536 |
+ } |
537 |
+ } |
538 |
+- if (*ptrbits != 32 && *ptrbits != 64) |
539 |
++ if (*ptrbits != 32 && *ptrbits != 64 && *ptrbits != 48) |
540 |
+ *ptrbits = 0; |
541 |
+ } |
542 |
+ |
543 |
+--- ATLAS/CONFIG/src/config.c.orig 2012-06-06 15:59:53.000000000 +0200 |
544 |
++++ ATLAS/CONFIG/src/config.c 2012-06-06 16:00:07.000000000 +0200 |
545 |
+@@ -183,7 +183,7 @@ |
546 |
+ i = sprintf(ln, "make IRun_comp args=\"-v %d -o atlconf.txt -O %d -A %d -Si nof77 %d -V %d %s %s", |
547 |
+ verb, OS, arch, nof77, vecext, targarg, flags); |
548 |
+ free(flags); |
549 |
+- if (ptrbits == 64 || ptrbits == 32) |
550 |
++ if (ptrbits == 64 || ptrbits == 32 || ptrbits == 48) |
551 |
+ { |
552 |
+ sprintf(stmp, "-b %d", ptrbits); |
553 |
+ ln = NewAppendedString(ln, stmp); |
554 |
+@@ -1272,7 +1272,7 @@ |
555 |
+ } |
556 |
+ *f2cdefs = fdefs; |
557 |
+ *ecdefs = cdefs; |
558 |
+- if (*ptrbits != 32 && *ptrbits != 64) |
559 |
++ if (*ptrbits != 32 && *ptrbits != 64 && *ptrbits != 48) |
560 |
+ *ptrbits = 0; |
561 |
+ } |
562 |
+ |
563 |
|
564 |
diff --git a/sci-libs/atlas/metadata.xml b/sci-libs/atlas/metadata.xml |
565 |
new file mode 100644 |
566 |
index 0000000..ac115a0 |
567 |
--- /dev/null |
568 |
+++ b/sci-libs/atlas/metadata.xml |
569 |
@@ -0,0 +1,22 @@ |
570 |
+<?xml version="1.0" encoding="UTF-8"?> |
571 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
572 |
+<pkgmetadata> |
573 |
+ <maintainer type="project"> |
574 |
+ <email>sci@g.o</email> |
575 |
+ <name>Gentoo Science Project</name> |
576 |
+ </maintainer> |
577 |
+ <longdescription lang="en"> |
578 |
+ ATLAS is an approach for the automatic generation and optimization of |
579 |
+ numerical software. Currently ATLAS supplies optimized versions for the |
580 |
+ complete set of linear algebra kernels known as the Basic Linear Algebra |
581 |
+ Subroutines (BLAS) for both c and F77 interfaces. It can also build |
582 |
+ a subset of the linear algebra routine LAPACK library or the full |
583 |
+ LAPACK using the reference LAPACK from Netlib. |
584 |
+</longdescription> |
585 |
+ <use> |
586 |
+ <flag name="generic">Build atlas assuming a fairly generic architecture (sse2 for x86, core2 for amd64)</flag> |
587 |
+ </use> |
588 |
+ <upstream> |
589 |
+ <remote-id type="sourceforge">math-atlas</remote-id> |
590 |
+ </upstream> |
591 |
+</pkgmetadata> |