Gentoo Archives: gentoo-commits

From: "Honza Macháček" <Hloupy.Honza@×××××××.cz>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: sci-physics/atompaw/, sci-physics/abinit/files/, sci-physics/abinit/, ...
Date: Fri, 20 Apr 2012 11:40:02
Message-Id: 1334921979.e5021743306a42e0f90557907dcc58aac185790b.honza_machacek@gentoo
1 commit: e5021743306a42e0f90557907dcc58aac185790b
2 Author: Honza Macháček <Hloupy.Honza <AT> centrum <DOT> cz>
3 AuthorDate: Fri Apr 20 11:39:39 2012 +0000
4 Commit: Honza Macháček <Hloupy.Honza <AT> centrum <DOT> cz>
5 CommitDate: Fri Apr 20 11:39:39 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=e5021743
7
8 sci-physics/abinit-6.12.* improved to find uudecode, a patch created for that by mistake removed once more. Several packages related to Abinit, including sci-physics/elk, version-bumped.
9
10 ---
11 sci-libs/fox/ChangeLog | 9 ++-
12 sci-libs/fox/fox-4.1.2.ebuild | 61 +++++++++++++
13 sci-libs/fox/metadata.xml | 11 ++-
14 sci-physics/abinit/ChangeLog | 4 +
15 sci-physics/abinit/abinit-6.12.2.ebuild | 8 +--
16 sci-physics/abinit/abinit-6.12.3.ebuild | 8 +--
17 sci-physics/abinit/files/6.12.1-gui-conf.patch | 12 ---
18 sci-physics/atompaw/ChangeLog | 8 ++-
19 sci-physics/atompaw/atompaw-3.0.1-r1.ebuild | 68 --------------
20 sci-physics/atompaw/atompaw-3.0.1.4.ebuild | 70 ++++++++++++++
21 sci-physics/atompaw/atompaw-3.0.1.ebuild | 66 --------------
22 sci-physics/elk/ChangeLog | 7 ++-
23 sci-physics/elk/elk-1.4.18.ebuild | 115 ++++++++++++++++++++++++
24 13 files changed, 279 insertions(+), 168 deletions(-)
25
26 diff --git a/sci-libs/fox/ChangeLog b/sci-libs/fox/ChangeLog
27 index 791c95e..5ab07b1 100644
28 --- a/sci-libs/fox/ChangeLog
29 +++ b/sci-libs/fox/ChangeLog
30 @@ -1,7 +1,14 @@
31 # ChangeLog for sci-libs/fox
32 -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
33 +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
34 # $Header: $
35
36 +*fox-4.1.2 (19 Apr 2012)
37 +
38 + 19 Apr 2012; Honza Macháček <Hloupy.Honza@×××××××.cz> +fox-4.1.2.ebuild,
39 + metadata.xml:
40 + A version bump to 4.1.2. Not moved to autotools-utils, does not like out of
41 + the tree compilation. Metadata improved.
42 +
43 24 Jun 2011; Justin Lecher <jlec@g.o> fox-4.0.4.ebuild,
44 fox-4.1.0.ebuild:
45 Fix CVS Header , remove LICENSE from installation
46
47 diff --git a/sci-libs/fox/fox-4.1.2.ebuild b/sci-libs/fox/fox-4.1.2.ebuild
48 new file mode 100644
49 index 0000000..de3ba9f
50 --- /dev/null
51 +++ b/sci-libs/fox/fox-4.1.2.ebuild
52 @@ -0,0 +1,61 @@
53 +# Copyright 1999-2012 Gentoo Foundation
54 +# Distributed under the terms of the GNU General Public License v2
55 +# $Header: $
56 +
57 +EAPI=4
58 +
59 +inherit eutils
60 +
61 +MY_PN="FoX"
62 +MY_P="${MY_PN}-${PV}"
63 +
64 +DESCRIPTION="A library designed to allow the easy use of XML from Fortran"
65 +HOMEPAGE="http://www1.gly.bris.ac.uk/~walker/FoX/"
66 +SRC_URI="http://www1.gly.bris.ac.uk/~walker/FoX/source/${MY_P}-full.tar.gz"
67 +
68 +LICENSE="BSD ZLIB"
69 +SLOT="0"
70 +KEYWORDS="~amd64 ~x86"
71 +IUSE="debug doc +dom +fast +sax +wcml +wkml +wxml"
72 +
73 +S="${WORKDIR}/${MY_P}"
74 +
75 +DOCS=( README.FoX.txt Changelog )
76 +
77 +FORTRAN_STANDARD=90
78 +
79 +src_prepare() {
80 + epatch "${FILESDIR}"/4.0.4-install-customizations.patch
81 +}
82 +
83 +src_configure() {
84 + econf --prefix=/usr \
85 + $(use_enable debug) \
86 + $(use_enable dom) \
87 + $(use_enable fast) \
88 + $(use_enable sax) \
89 + $(use_enable wcml) \
90 + $(use_enable wkml) \
91 + $(use_enable wxml) \
92 + FCFLAGS="${FCFLAGS:- ${FFLAGS:- -O2}}"
93 +}
94 +
95 +src_compile() {
96 + emake -j1 || die "make failed"
97 +}
98 +
99 +src_test() {
100 + emake -j1 check || die "make check failed"
101 + einfo "Please look at the last few RESULT lines for a summary."
102 +}
103 +
104 +src_install() {
105 + sed -i -e's%^comp_prefix=.*$%comp_prefix=/usr%' \
106 + -e's%comp_prefix/finclude%comp_prefix/lib/finclude%' \
107 + FoX-config
108 + emake -j1 DESTDIR="${D}" install || die "make install failed"
109 + dodoc README.FoX.txt Changelog || die "dodoc failed"
110 + if use doc; then
111 + dohtml -r DoX/ || die "installing the HTML docs failed"
112 + fi
113 +}
114
115 diff --git a/sci-libs/fox/metadata.xml b/sci-libs/fox/metadata.xml
116 index 0ad2e28..0d10e10 100644
117 --- a/sci-libs/fox/metadata.xml
118 +++ b/sci-libs/fox/metadata.xml
119 @@ -6,10 +6,11 @@
120 <email>sci@g.o</email>
121 </maintainer>
122 <use>
123 - <flag name="dom">Automatically generated description for dom</flag>
124 - <flag name="fast">Automatically generated description for fast</flag>
125 - <flag name="sax">Automatically generated description for sax</flag>
126 - <flag name="wcml">Automatically generated description for wcml</flag>
127 - <flag name="wxml">Automatically generated description for wxml</flag>
128 + <flag name="dom">Compile the W3C document object model module</flag>
129 + <flag name="fast">Compile with best known optimization flags</flag>
130 + <flag name="sax">Compile the streaming, validating parser based on java's Simple API for XML</flag>
131 + <flag name="wcml">Compile the module for a subset of the Chemical Markup Language</flag>
132 + <flag name="wkml">Compile the module for the creation of KML documents used by applications such as Google Earth</flag>
133 + <flag name="wxml">Compile the XML writer used to sequentially create arbitrary XML documents quickly with minimal memory requirements</flag>
134 </use>
135 </pkgmetadata>
136
137 diff --git a/sci-physics/abinit/ChangeLog b/sci-physics/abinit/ChangeLog
138 index 60fb829..23db32a 100644
139 --- a/sci-physics/abinit/ChangeLog
140 +++ b/sci-physics/abinit/ChangeLog
141 @@ -2,6 +2,10 @@
142 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
143 # $Header: $
144
145 + 19 Apr 2012; Honza Macháček <Hloupy.Honza@×××××××.cz>
146 + -files/6.12.1-gui-conf.patch, abinit-6.12.2.ebuild, abinit-6.12.3.ebuild:
147 + GUI configuration corrected (to find uudecode).
148 +
149 *abinit-6.12.3 (13 Apr 2012)
150
151 13 Apr 2012; Honza Macháček <Hloupy.Honza@×××××××.cz>
152
153 diff --git a/sci-physics/abinit/abinit-6.12.2.ebuild b/sci-physics/abinit/abinit-6.12.2.ebuild
154 index ddb4355..5fa4e8c 100644
155 --- a/sci-physics/abinit/abinit-6.12.2.ebuild
156 +++ b/sci-physics/abinit/abinit-6.12.2.ebuild
157 @@ -114,12 +114,6 @@ src_prepare() {
158 epatch "${FILESDIR}"/6.12.1-libabinit_options.patch
159 eautoreconf
160
161 - if use gui; then
162 - epatch "${FILESDIR}"/6.12.1-gui-conf.patch
163 - pushd "${S}"/gui > /dev/null
164 - ./autogen.sh
165 - popd
166 - fi
167 }
168
169 src_configure() {
170 @@ -218,7 +212,7 @@ src_configure() {
171 pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
172 mkdir -p gui
173 cd gui
174 - ECONF_SOURCE="${S}"/gui econf
175 + ECONF_SOURCE="${S}"/gui econf UUDECODE="uudecode"
176 fi
177 }
178
179
180 diff --git a/sci-physics/abinit/abinit-6.12.3.ebuild b/sci-physics/abinit/abinit-6.12.3.ebuild
181 index d18f5ff..aacc90a 100644
182 --- a/sci-physics/abinit/abinit-6.12.3.ebuild
183 +++ b/sci-physics/abinit/abinit-6.12.3.ebuild
184 @@ -114,12 +114,6 @@ src_prepare() {
185 epatch "${FILESDIR}"/6.12.1-libabinit_options.patch
186 eautoreconf
187
188 - if use gui; then
189 - epatch "${FILESDIR}"/6.12.1-gui-conf.patch
190 - pushd "${S}"/gui > /dev/null
191 - ./autogen.sh
192 - popd
193 - fi
194 }
195
196 src_configure() {
197 @@ -218,7 +212,7 @@ src_configure() {
198 pushd "${AUTOTOOLS_BUILD_DIR}" > /dev/null
199 mkdir -p gui
200 cd gui
201 - ECONF_SOURCE="${S}"/gui econf
202 + ECONF_SOURCE="${S}"/gui econf UUDECODE="uudecode"
203 fi
204 }
205
206
207 diff --git a/sci-physics/abinit/files/6.12.1-gui-conf.patch b/sci-physics/abinit/files/6.12.1-gui-conf.patch
208 deleted file mode 100644
209 index 95c12b3..0000000
210 --- a/sci-physics/abinit/files/6.12.1-gui-conf.patch
211 +++ /dev/null
212 @@ -1,12 +0,0 @@
213 -diff -Naur abinit-6.12.1_orig/gui/configure abinit-6.12.1/gui/configure
214 ---- gui/configure 2012-01-30 19:42:26.000000000 +0000
215 -+++ gui/configure 2012-03-16 13:38:54.000000000 +0000
216 -@@ -3143,7 +3143,7 @@
217 - test -z "$as_dir" && as_dir=.
218 - for ac_exec_ext in '' $ac_executable_extensions; do
219 - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
220 -- ac_cv_prog_UUDECODE="no"
221 -+ ac_cv_prog_UUDECODE="$as_dir/$ac_word$ac_exec_ext"
222 - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
223 - break 2
224 - fi
225
226 diff --git a/sci-physics/atompaw/ChangeLog b/sci-physics/atompaw/ChangeLog
227 index 4687ce8..4b4190a 100644
228 --- a/sci-physics/atompaw/ChangeLog
229 +++ b/sci-physics/atompaw/ChangeLog
230 @@ -1,7 +1,13 @@
231 # ChangeLog for sci-physics/atompaw
232 -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
233 +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
234 # $Header: $
235
236 +*atompaw-3.0.1.4 (18 Apr 2012)
237 +
238 + 18 Apr 2012; Honza Macháček <Hloupy.Honza@×××××××.cz>
239 + -atompaw-3.0.1.ebuild, -atompaw-3.0.1-r1.ebuild, +atompaw-3.0.1.4.ebuild:
240 + A version bump to 3.0.1.4 with transition to autotools-utils.
241 +
242 *atompaw-3.0.1.3 (09 Nov 2011)
243
244 09 Nov 2011; Honza Macháček <Hloupy.Honza@×××××××.cz>
245
246 diff --git a/sci-physics/atompaw/atompaw-3.0.1-r1.ebuild b/sci-physics/atompaw/atompaw-3.0.1-r1.ebuild
247 deleted file mode 100644
248 index 1b26df1..0000000
249 --- a/sci-physics/atompaw/atompaw-3.0.1-r1.ebuild
250 +++ /dev/null
251 @@ -1,68 +0,0 @@
252 -# Copyright 1999-2011 Gentoo Foundation
253 -# Distributed under the terms of the GNU General Public License v2
254 -# $Header: $
255 -
256 -EAPI=3
257 -
258 -inherit eutils fortran-2 multilib toolchain-funcs
259 -
260 -DESCRIPTION="PAW atomic data generator"
261 -HOMEPAGE="http://www.wfu.edu/~natalie/papers/pwpaw/man.html"
262 -SRC_URI="http://www.wfu.edu/~natalie/papers/pwpaw/${P}.tar.gz
263 - doc? ( http://www.wfu.edu/~natalie/papers/pwpaw/atompaw.pdf
264 - http://www.wfu.edu/~natalie/papers/pwpaw/atompaw-usersguide.pdf
265 - http://www.wfu.edu/~natalie/papers/pwpaw/notes/atompaw/atompawEqns.pdf )"
266 -
267 -LICENSE="GPL-2"
268 -SLOT="0"
269 -KEYWORDS="~amd64 ~x86"
270 -IUSE="doc libxc"
271 -
272 -RDEPEND="virtual/lapack
273 - virtual/blas
274 - libxc? ( sci-libs/libxc[fortran] )"
275 -DEPEND="${RDEPEND}
276 - dev-util/pkgconfig"
277 -
278 -src_unpack() {
279 - unpack ${P}.tar.gz
280 - if use doc; then
281 - cp "${DISTDIR}"/atompaw.pdf "${S}"/
282 - cp "${DISTDIR}"/atompaw-usersguide.pdf "${S}"/
283 - cp "${DISTDIR}"/atompawEqns.pdf "${S}"/
284 - fi
285 -}
286 -
287 -src_prepare() {
288 - cd ${S}
289 - epatch ${FILESDIR}/3.0.1-longplot.patch
290 -}
291 -
292 -src_configure() {
293 - local modules="-I/usr/$(get_libdir)/finclude"
294 - econf $(use_enable libxc) \
295 - --with-linalg-flavor=atlas \
296 - --with-linalg-libs="$(pkg-config --libs lapack)" \
297 - --with-libxc-incs="${modules}" \
298 - --with-libxc-libs="${libs} -lxc" \
299 - FC="$(tc-getFC)" FCFLAGS="${FCFLAGS:- ${FFLAGS:- -O2}}" \
300 - CC="$(tc-getCC)" LDFLAGS="${LDFLAGS:- ${CFLAGS:- -O2}}"
301 -}
302 -
303 -src_compile() {
304 - emake -j1 || die "Make failed"
305 -}
306 -
307 -src_test() {
308 - emake check || die "Test failed"
309 -}
310 -
311 -src_install() {
312 - emake DESTDIR="${D}" install || die "make install failed"
313 -
314 - dodoc README || die "dodoc failed"
315 -
316 - if use doc; then
317 - dodoc atompaw.pdf atompaw-usersguide.pdf atompawEqns.pdf || die "PDF doc failed"
318 - fi
319 -}
320
321 diff --git a/sci-physics/atompaw/atompaw-3.0.1.4.ebuild b/sci-physics/atompaw/atompaw-3.0.1.4.ebuild
322 new file mode 100644
323 index 0000000..3e7a2d9
324 --- /dev/null
325 +++ b/sci-physics/atompaw/atompaw-3.0.1.4.ebuild
326 @@ -0,0 +1,70 @@
327 +# Copyright 1999-2012 Gentoo Foundation
328 +# Distributed under the terms of the GNU General Public License v2
329 +# $Header: $
330 +
331 +EAPI=4
332 +
333 +inherit autotools-utils fortran-2 multilib toolchain-funcs
334 +
335 +DESCRIPTION="PAW atomic data generator"
336 +HOMEPAGE="http://www.wfu.edu/~natalie/papers/pwpaw/man.html"
337 +SRC_URI="http://www.wfu.edu/~natalie/papers/pwpaw/${P}.tar.gz
338 + doc? ( http://www.wfu.edu/~natalie/papers/pwpaw/atompaw.pdf
339 + http://www.wfu.edu/~natalie/papers/pwpaw/notes/atompaw/atompawEqns.pdf )"
340 +
341 +LICENSE="GPL-2"
342 +SLOT="0"
343 +KEYWORDS="~amd64 ~x86"
344 +IUSE="doc libxc"
345 +
346 +RDEPEND="virtual/lapack
347 + virtual/blas
348 + libxc? ( sci-libs/libxc[fortran] )"
349 +DEPEND="${RDEPEND}
350 + dev-util/pkgconfig"
351 +
352 +DOCS=( README )
353 +
354 +FORTRAN_STANDARD=90
355 +
356 +src_unpack() {
357 + unpack ${P}.tar.gz
358 + if use doc; then
359 + cp "${DISTDIR}"/atompaw.pdf "${S}"/doc/
360 + cp "${DISTDIR}"/atompawEqns.pdf "${S}"/doc/
361 + fi
362 +}
363 +
364 +src_prepare() {
365 + epatch ${FILESDIR}/3.0.1-longplot.patch
366 +}
367 +
368 +src_configure() {
369 + local modules="-I/usr/$(get_libdir)/finclude"
370 + local myeconfargs=(
371 + $(use_enable libxc)
372 + --with-linalg-flavor=atlas
373 + --with-linalg-libs="$(pkg-config --libs lapack)"
374 + --with-libxc-incs="-I/usr/include ${modules}"
375 + --with-libxc-libs="${libs} -lxc"
376 + FC="$(tc-getFC)" FCFLAGS="${FCFLAGS:- ${FFLAGS:- -O2}}"
377 + CC="$(tc-getCC)" LDFLAGS="${LDFLAGS:- ${CFLAGS:- -O2}}"
378 + )
379 + autotools-utils_src_configure
380 +}
381 +
382 +src_compile() {
383 + autotools-utils_src_compile -j1
384 +}
385 +
386 +src_test() {
387 + use test && autotools-utils_src_test
388 +}
389 +
390 +src_install() {
391 + autotools-utils_src_install
392 +
393 + if use doc; then
394 + dodoc doc/atompaw.pdf doc/atompawEqns.pdf || die "PDF doc failed"
395 + fi
396 +}
397
398 diff --git a/sci-physics/atompaw/atompaw-3.0.1.ebuild b/sci-physics/atompaw/atompaw-3.0.1.ebuild
399 deleted file mode 100644
400 index 41a0bcf..0000000
401 --- a/sci-physics/atompaw/atompaw-3.0.1.ebuild
402 +++ /dev/null
403 @@ -1,66 +0,0 @@
404 -# Copyright 1999-2011 Gentoo Foundation
405 -# Distributed under the terms of the GNU General Public License v2
406 -# $Header: $
407 -
408 -EAPI=3
409 -
410 -inherit eutils fortran-2 multilib toolchain-funcs
411 -
412 -DESCRIPTION="PAW atomic data generator"
413 -HOMEPAGE="http://www.wfu.edu/~natalie/papers/pwpaw/man.html"
414 -SRC_URI="
415 - http://www.wfu.edu/~natalie/papers/pwpaw/${P}.tar.gz
416 - doc? (
417 - http://www.wfu.edu/~natalie/papers/pwpaw/atompaw.pdf
418 - http://www.wfu.edu/~natalie/papers/pwpaw/atompaw-usersguide.pdf
419 - http://www.wfu.edu/~natalie/papers/pwpaw/notes/atompaw/atompawEqns.pdf )"
420 -
421 -LICENSE="GPL-2"
422 -SLOT="0"
423 -KEYWORDS="~amd64 ~x86"
424 -IUSE="doc libxc"
425 -
426 -RDEPEND="
427 - virtual/lapack
428 - virtual/blas
429 - libxc? ( sci-libs/libxc[fortran] )"
430 -DEPEND="${RDEPEND}
431 - dev-util/pkgconfig"
432 -
433 -src_unpack() {
434 - unpack ${P}.tar.gz
435 - if use doc; then
436 - cp "${DISTDIR}"/atompaw.pdf "${S}"/
437 - cp "${DISTDIR}"/atompaw-usersguide.pdf "${S}"/
438 - cp "${DISTDIR}"/atompawEqns.pdf "${S}"/
439 - fi
440 -}
441 -
442 -src_configure() {
443 - local modules="-I/usr/$(get_libdir)/finclude"
444 - econf $(use_enable libxc) \
445 - --with-linalg-flavor=atlas \
446 - --with-linalg-libs="$(pkg-config --libs lapack)" \
447 - --with-libxc-incs="${modules}" \
448 - --with-libxc-libs="${libs} -lxc" \
449 - FC="$(tc-getFC)" FCFLAGS="${FCFLAGS:- ${FFLAGS:- -O2}}" \
450 - CC="$(tc-getCC)" LDFLAGS="${LDFLAGS:- ${CFLAGS:- -O2}}"
451 -}
452 -
453 -src_compile() {
454 - emake -j1 || die "Make failed"
455 -}
456 -
457 -src_test() {
458 - emake check || die "Test failed"
459 -}
460 -
461 -src_install() {
462 - emake DESTDIR="${D}" install || die "make install failed"
463 -
464 - dodoc README || die "dodoc failed"
465 -
466 - if use doc; then
467 - dodoc atompaw.pdf atompaw-usersguide.pdf atompawEqns.pdf || die "PDF doc failed"
468 - fi
469 -}
470
471 diff --git a/sci-physics/elk/ChangeLog b/sci-physics/elk/ChangeLog
472 index 34c82fc..b184d1c 100644
473 --- a/sci-physics/elk/ChangeLog
474 +++ b/sci-physics/elk/ChangeLog
475 @@ -1,7 +1,12 @@
476 # ChangeLog for sci-physics/elk
477 -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
478 +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
479 # $Header: $
480
481 +*elk-1.4.18 (18 Apr 2012)
482 +
483 + 18 Apr 2012; Honza Macháček <Hloupy.Honza@×××××××.cz> +elk-1.4.18.ebuild:
484 + A version bump to 1.4.18.
485 +
486 *elk-1.4.5 (14 Dec 2011)
487
488 14 Dec 2011; Honza Macháček <Hloupy.Honza@×××××××.cz> elk-1.3.15.ebuild,
489
490 diff --git a/sci-physics/elk/elk-1.4.18.ebuild b/sci-physics/elk/elk-1.4.18.ebuild
491 new file mode 100644
492 index 0000000..27b3f3a
493 --- /dev/null
494 +++ b/sci-physics/elk/elk-1.4.18.ebuild
495 @@ -0,0 +1,115 @@
496 +# Copyright 1999-2012 Gentoo Foundation
497 +# Distributed under the terms of the GNU General Public License v2
498 +# $Header: $
499 +
500 +EAPI="4"
501 +
502 +inherit eutils fortran-2 multilib toolchain-funcs
503 +
504 +DESCRIPTION="All-electron full-potential linearised augmented-plane wave (FP-LAPW) code with advanced features."
505 +HOMEPAGE="http://elk.sourceforge.net/"
506 +SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
507 +
508 +LICENSE="GPL-3"
509 +SLOT="0"
510 +KEYWORDS="~amd64 ~x86"
511 +IUSE="-debug lapack libxc mpi openmp perl test"
512 +
513 +RDEPEND="lapack? ( virtual/blas
514 + virtual/lapack )
515 + libxc? ( =sci-libs/libxc-1*[fortran] )
516 + mpi? ( virtual/mpi )"
517 +DEPEND="${RDEPEND}
518 + perl? ( dev-lang/perl )
519 + dev-util/pkgconfig"
520 +
521 +DOCS=( README )
522 +
523 +FORTRAN_STANDARD=90
524 +
525 +pkg_setup() {
526 + # fortran-2.eclass does not handle mpi wrappers
527 + if use mpi; then
528 + export FC="mpif90"
529 + export F77="mpif77"
530 + export CC="mpicc"
531 + export CXX="mpic++"
532 + else
533 + tc-export FC F77 CC CXX
534 + fi
535 +
536 + if use openmp; then
537 + FORTRAN_NEED_OPENMP=1
538 + fi
539 +
540 + fortran-2_pkg_setup
541 +
542 + if use openmp; then
543 + export FC="${FC} -fopenmp"
544 + export F77="${F77} -fopenmp"
545 + export CC="${CC} -fopenmp"
546 + export CXX="${CXX} -fopenmp"
547 + fi
548 +}
549 +
550 +src_prepare() {
551 + if use libxc; then
552 + sed -i -e's/^\(SRC_libxc =\)/#\1/' "${S}/src/Makefile"
553 + fi
554 + if use mpi; then
555 + sed -i -e's/^\(SRC_mpi =\)/#\1/' "${S}/src/Makefile"
556 + fi
557 +}
558 +
559 +src_configure() {
560 + FCFLAGS="${FCFLAGS:- ${FFLAGS:- -O3 -funroll-loops -ffast-math}}"
561 + FCFLAGS="${FCFLAGS} -I/usr/include -I/usr/$(get_libdir)/finclude"
562 + CFLAGS="${CFLAGS:- -O3 -funroll-loops -ffast-math}"
563 + CXXFLAGS="${CXXFLAGS:- ${CFLAGS}}"
564 + export FCFLAGS CFLAGS CXXFLAGS
565 + echo "MAKE = make" > make.inc
566 + echo "F90 = $FC" >> make.inc
567 + echo "F90_OPTS = $FCFLAGS" >> make.inc
568 + echo "F77 = $FC" >> make.inc
569 + echo "F77_OPTS = $FCFLAGS" >> make.inc
570 + echo "CC = ${CC}" >> make.inc
571 + echo "CXX = ${CXX}" >> make.inc
572 + echo "CFLAGS = ${CFLAGS}" >> make.inc
573 + echo "CXXFLAGS = ${CXXFLAGS}" >> make.inc
574 + echo "LD = $(tc-getLD)" >> make.inc
575 + echo "AR = ar" >> make.inc
576 + echo "LIB_SYS = " >> make.inc
577 + if use lapack; then
578 + echo "LIB_LPK = $(pkg-config --libs lapack)" >> make.inc
579 + else
580 + echo "LIB_LPK = lapack.a blas.a" >> make.inc
581 + fi
582 + echo "LIB_FFT = fftlib.a" >> make.inc
583 + if use libxc; then
584 + echo "LIB_XC = -L/usr/$(get_libdir) -lxc" >> make.inc
585 + echo "SRC_libxc = libxc_funcs.f90 libxc.f90 libxcifc.f90" >>make.inc
586 + fi
587 +}
588 +
589 +src_compile() {
590 + emake -j1 || die "make failed"
591 +}
592 +
593 +src_test() {
594 + emake test
595 +}
596 +
597 +src_install() {
598 + dobin src/elk src/protex src/eos/eos src/spacegroup/spacegroup
599 + dobin utilities/elk-bands
600 + use perl && dobin utilities/xps_exc.pl utilities/se.pl
601 + dodoc README
602 + for doc in docs/*; do
603 + dodoc $doc
604 + done
605 + insinto /usr/share/${P}
606 + doins -r species
607 + doins -r utilities
608 + doins -r examples
609 + doins -r tests
610 +}