1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name berkeleygw |
---|
7 | version 1.0.5 |
---|
8 | categories science |
---|
9 | platforms darwin |
---|
10 | license BSD |
---|
11 | maintainers gmail.com:dstrubbe |
---|
12 | |
---|
13 | description GW/Bethe-Salpeter equation |
---|
14 | long_description BerkeleyGW is a set of computer codes that calculate the quasiparticle properties \ |
---|
15 | and the optical responses of a large variety of materials from bulk periodic crystals \ |
---|
16 | to nanostructures such as slabs, wires and molecules, using many-body perturbation theory. |
---|
17 | homepage http://www.berkeleygw.org |
---|
18 | master_sites http://www.berkeleygw.org/releases |
---|
19 | |
---|
20 | checksums rmd160 308826cb7157d368f4d113ae694a9fbc8c46044e \ |
---|
21 | sha256 f5706b2daab66bdc22328695c0fb71f6e62577947db1f7d5706e4e9fd64bf9de |
---|
22 | |
---|
23 | depends_lib port:fftw \ |
---|
24 | port:atlas |
---|
25 | |
---|
26 | distfiles BGW-${version}.tar.gz |
---|
27 | |
---|
28 | configure { |
---|
29 | system -W ${worksrcpath} "sed 's|/opt/local|${prefix}|' < config/generic.serial.macos.mk > arch.mk" |
---|
30 | } |
---|
31 | |
---|
32 | build.target all-flavors |
---|
33 | use_parallel_build yes |
---|
34 | |
---|
35 | destroot.post_args INSTDIR=${destroot}${prefix} |
---|
36 | |
---|
37 | test.run yes |
---|
38 | test.cmd make |
---|
39 | test.target check |
---|
40 | |
---|
41 | # more options that could be added: threads, openmpi, mpich |
---|
42 | |
---|
43 | # This is from the Fortran recipe, but with some customization |
---|
44 | set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9} |
---|
45 | set default_fortran_variant +gcc48 |
---|
46 | set g95_conflicts {} |
---|
47 | |
---|
48 | foreach ver ${gcc_versions} { |
---|
49 | set ver_no_dot [join [split ${ver} "."] ""] |
---|
50 | |
---|
51 | set variant_line {variant gcc${ver_no_dot} description "build with gcc${ver_no_dot}" conflicts g95} |
---|
52 | |
---|
53 | foreach over ${gcc_versions} { |
---|
54 | if {${ver} == ${over}} { |
---|
55 | continue |
---|
56 | } |
---|
57 | |
---|
58 | set over_no_dot [join [split ${over} "."] ""] |
---|
59 | append variant_line " conflicts gcc${over_no_dot}" |
---|
60 | } |
---|
61 | append variant_line { {}} |
---|
62 | |
---|
63 | eval $variant_line |
---|
64 | |
---|
65 | append g95_conflicts " conflicts gcc${ver_no_dot}" |
---|
66 | |
---|
67 | if {[variant_isset gcc${ver_no_dot}]} { |
---|
68 | if {${default_fortran_variant} != "+gcc${ver_no_dot}"} { |
---|
69 | set default_fortran_variant "" |
---|
70 | } |
---|
71 | } |
---|
72 | } |
---|
73 | |
---|
74 | eval [concat {variant g95 description {build with clang/g95}} $g95_conflicts {{}}] |
---|
75 | |
---|
76 | if {[variant_isset g95]} { |
---|
77 | if {${default_fortran_variant} != "+g95"} { |
---|
78 | set default_fortran_variant "" |
---|
79 | } |
---|
80 | } |
---|
81 | |
---|
82 | if {${default_fortran_variant} != ""} { |
---|
83 | default_variants-append "${default_fortran_variant}" |
---|
84 | } |
---|
85 | |
---|
86 | foreach ver ${gcc_versions} { |
---|
87 | set ver_no_dot [join [split ${ver} "."] ""] |
---|
88 | |
---|
89 | if {[variant_isset gcc${ver_no_dot}]} { |
---|
90 | depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc |
---|
91 | depends_build-append port:gcc${ver_no_dot} |
---|
92 | |
---|
93 | build.args VERSION=-mp-${ver} |
---|
94 | } |
---|
95 | } |
---|
96 | |
---|
97 | if {[variant_isset g95]} { |
---|
98 | depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc |
---|
99 | depends_build-append port:g95 |
---|
100 | |
---|
101 | build.args COMPFLAG="-DG95" FCPP="${configure.cc} -P -E -ansi" LINK="${prefix}/bin/g95" \ |
---|
102 | F90free="${prefix}/bin/g95 -ffree-form -ffree-line-length-huge -fno-second-underscore" \ |
---|
103 | MOD_OPT="-fmod=" CC_COMP=${configure.cxx} C_COMP=${configure.cc} C_LINK=${configure.cxx} \ |
---|
104 | LAPACKLIB="-L${prefix}/lib/ -lsatlas" |
---|
105 | # test, destroot args needed just to avoid trying to build in the test/openmp directory unnecessarily |
---|
106 | test.args COMPFLAG="-DG95" |
---|
107 | destroot.args COMPFLAG="-DG95" |
---|
108 | patchfiles-append patch-Common-common-rules.mk.diff |
---|
109 | } |
---|
110 | |
---|
111 | livecheck.type regex |
---|
112 | livecheck.url ${master_sites} |
---|
113 | livecheck.regex BGW-(\[0-9.\]+).tar |
---|