[144428] trunk/dports/science/berkeleygw/Portfile
dstrubbe at macports.org
dstrubbe at macports.org
Fri Jan 8 12:48:36 PST 2016
Revision: 144428
https://trac.macports.org/changeset/144428
Author: dstrubbe at macports.org
Date: 2016-01-08 12:48:36 -0800 (Fri, 08 Jan 2016)
Log Message:
-----------
berkeleygw: Add +debug and +hdf5 variants. Better handling of MATHFLAG and use of -append in some places to be sure other options are not being overwritten.
Modified Paths:
--------------
trunk/dports/science/berkeleygw/Portfile
Modified: trunk/dports/science/berkeleygw/Portfile
===================================================================
--- trunk/dports/science/berkeleygw/Portfile 2016-01-08 20:19:55 UTC (rev 144427)
+++ trunk/dports/science/berkeleygw/Portfile 2016-01-08 20:48:36 UTC (rev 144428)
@@ -14,9 +14,10 @@
description GW/Bethe-Salpeter equation
long_description BerkeleyGW is a set of computer codes that calculate the quasiparticle properties \
and the optical responses of a large variety of materials from bulk periodic crystals \
- to nanostructures such as slabs, wires and molecules, using many-body perturbation theory.
+ to nanostructures such as slabs, wires and molecules, using many-body perturbation theory \
+ (the GW approximation and Bethe-Salpeter equation).
homepage http://www.berkeleygw.org
-master_sites http://www.berkeleygw.org/releases
+master_sites ${homepage}/releases
checksums rmd160 7e1ce392da45282ef878ed1a53b34184d96c7ca2 \
sha256 83deea17ccbd50e9e505f69fadf858595793f9b853ec012722659100d5cf8885
@@ -45,6 +46,7 @@
# we only use llvm (if at all) for cpp. it should not be a lib dependency. not sure how exactly to do this generally...
#depends_lib-delete port:llvm-gcc42
#depends_build-append port:llvm-gcc42
+# should only get used in conjunction with +g95 anyway
if {[mpi_variant_isset]} {
depends_lib-append port:scalapack
@@ -53,7 +55,7 @@
# fftw is not universal
universal_variant no
-# FIXME: add options for fftw-3, hdf5, OpenBLAS(-devel)/accelerate; threads; debug
+# FIXME: add options for fftw-3, OpenBLAS(-devel)/accelerate; threads
# FIXME: this unnecessarily enforces scalapack also had same C compiler as we are using.
if {[mpi_variant_isset]} {
@@ -63,7 +65,9 @@
configure {
system -W ${worksrcpath} "sed 's|/opt/local|${prefix}|' < config/generic.serial.macos.mk > arch.mk"
reinplace -W ${worksrcpath} "s|MATHFLAG += -DHDF5||" arch.mk
- system -W ${worksrcpath} "echo 'HDF5LIB=' >> arch.mk"
+ if {![variant_isset hdf5]} {
+ system -W ${worksrcpath} "echo 'HDF5LIB=' >> arch.mk"
+ }
}
build.target all-flavors
@@ -73,9 +77,6 @@
test.run yes
-# refrain from trying to build anything as might be enabled by extra stuff in MATHFLAG
-test.args MATHFLAG=""
-
# known problems to be fixed: Graphene incorrectly has kernel_k_interpolation.
# Si2-SAPO/sapo.inp has pointer being freed was not allocated
@@ -98,17 +99,22 @@
}
pre-build {
- build.args LINK="${configure.fc}" CC_COMP=${configure.cxx} C_COMP=${configure.cc} C_LINK=${configure.cxx} \
- LAPACKLIB="-L${prefix}/lib/ -lsatlas" MATHFLAG="" FFTWLIB="-L${prefix}/lib/ -ldfftw"
+ build.args-append LINK="${configure.fc}" CC_COMP=${configure.cxx} C_COMP=${configure.cc} C_LINK=${configure.cxx} \
+ LAPACKLIB="-L${prefix}/lib/ -lsatlas" FFTWLIB="-L${prefix}/lib/ -ldfftw"
+ set mathflag ""
+ if {[variant_isset hdf5]} {
+ set mathflag "${mathflag} -DHDF5"
+ }
+
# +g95 must be working in conjunction with +llvm
if {[variant_isset g95]} {
- build.args-append COMPFLAG="-DG95" FCPP="${configure.cpp} -P -ansi" \
- F90free="${prefix}/bin/g95 -ffree-form -ffree-line-length-huge -fno-second-underscore" \
- MOD_OPT="-fmod="
+ build.args-append COMPFLAG="-DG95" FCPP="${configure.cpp} -P -ansi" \
+ F90free="${prefix}/bin/g95 -ffree-form -ffree-line-length-huge -fno-second-underscore" \
+ MOD_OPT="-fmod="
# test, destroot args needed just to avoid trying to build in the test/openmp directory unnecessarily
- test.args COMPFLAG="-DG95"
- destroot.args COMPFLAG="-DG95"
+ test.args-append COMPFLAG="-DG95"
+ destroot.args-append COMPFLAG="-DG95"
} else {
# gcc is default in arch.mk so most things do not need to be modified
build.args-append FCPP="${configure.cpp} -ansi" \
@@ -116,11 +122,24 @@
}
if {[mpi_variant_isset]} {
- build.args-append PARAFLAG="-DMPI" MATHFLAG="-DUSESCALAPACK" C_PARAFLAG="-DPARA" \
- SCALAPACKLIB="-L${prefix}/lib/ -lscalapack"
+ set mathflag "${mathflag} -DUSESCALAPACK"
+ build.args-append PARAFLAG="-DMPI" C_PARAFLAG="-DPARA" SCALAPACKLIB="-L${prefix}/lib/ -lscalapack"
}
+
+ build.args-append MATHFLAG="${mathflag}"
+ test.args-append MATHFLAG="${mathflag}"
}
+variant debug description {Add debug flags for more checking and output, but slower runs.} {
+ build.args-append DEBUGFLAG="-DDEBUG -DVERBOSE" C_DEBUGFLAG="-DDEBUG"
+}
+
+variant hdf5 description {Build with HDF5 support for faster epsmat I/O} {
+ depends_lib-append port:hdf5
+ require_active_variants port:hdf5 hl
+ compilers.enforce_fortran hdf5
+}
+
livecheck.type none
# This is broken currently due to changes in the settings to the code's webpage.
#livecheck.type regex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160108/5d18d11b/attachment.html>
More information about the macports-changes
mailing list