[144522] trunk/dports/science/berkeleygw/Portfile

dstrubbe at macports.org dstrubbe at macports.org
Mon Jan 11 08:30:38 PST 2016


Revision: 144522
          https://trac.macports.org/changeset/144522
Author:   dstrubbe at macports.org
Date:     2016-01-11 08:30:38 -0800 (Mon, 11 Jan 2016)
Log Message:
-----------
berkeleygw: Add variant for fftw3 instead of fftw2. Remove C debug flag from +debug, which writes an excessive amount of output from spglib. Add PARAFLAG for test phase, the lack of which could cause a failed attempt to build something otherwise.

Modified Paths:
--------------
    trunk/dports/science/berkeleygw/Portfile

Modified: trunk/dports/science/berkeleygw/Portfile
===================================================================
--- trunk/dports/science/berkeleygw/Portfile	2016-01-11 16:01:43 UTC (rev 144521)
+++ trunk/dports/science/berkeleygw/Portfile	2016-01-11 16:30:38 UTC (rev 144522)
@@ -55,7 +55,7 @@
 # fftw is not universal
 universal_variant   no
 
-# FIXME: add options for fftw-3, OpenBLAS(-devel)/accelerate; threads
+# FIXME: add options for OpenBLAS(-devel)/accelerate; threads
 
 # FIXME: this unnecessarily enforces scalapack also had same C compiler as we are using.
 if {[mpi_variant_isset]} {
@@ -82,7 +82,7 @@
 
 pre-test {
     if {[mpi_variant_isset]} {
-        test.args-append    TESTSCRIPT="MPIEXEC=${prefix}/bin/${mpi.exec} make check-parallel"
+        test.args-append    TESTSCRIPT="MPIEXEC=${prefix}/bin/${mpi.exec} make check-parallel" PARAFLAG=-DMPI
         test.target         check-jobscript
 
         if {![catch {sysctl hw.ncpu} ncpus]} {
@@ -100,13 +100,20 @@
 
 pre-build {
     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"
+                        LAPACKLIB="-L${prefix}/lib/ -lsatlas"
 
     set mathflag ""
     if {[variant_isset hdf5]} {
         set mathflag "${mathflag} -DHDF5"
     }
     
+    if {[variant_isset fftw3]} {
+        build.args-append  FFTWLIB="-L${prefix}/lib/ -lfftw3"
+        set mathflag "${mathflag} -DUSEFFTW3"
+    } else {
+        build.args-append  FFTWLIB="-L${prefix}/lib/ -ldfftw"
+    }
+
     # +g95 must be working in conjunction with +llvm
     if {[variant_isset g95]} {
         build.args-append COMPFLAG="-DG95" FCPP="${configure.cpp} -P -ansi" \
@@ -131,7 +138,7 @@
 }
 
 variant debug description {Add debug flags for more checking and output, but slower runs.} {
-    build.args-append    DEBUGFLAG="-DDEBUG -DVERBOSE" C_DEBUGFLAG="-DDEBUG"
+    build.args-append    DEBUGFLAG="-DDEBUG -DVERBOSE"
 }
 
 variant hdf5 description {Build with HDF5 support for faster epsmat I/O} {
@@ -140,6 +147,11 @@
     compilers.enforce_fortran   hdf5
 }
 
+variant fftw3 description {Build with FFTW-3 rather than FFTW-2 for better performance} {
+    depends_lib-replace         port:fftw port:fftw-3
+    compilers.enforce_some_fortran  fftw-3
+}
+
 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/20160111/c025799c/attachment.html>


More information about the macports-changes mailing list