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

dstrubbe at macports.org dstrubbe at macports.org
Thu Mar 17 12:35:44 PDT 2016


Revision: 146787
          https://trac.macports.org/changeset/146787
Author:   dstrubbe at macports.org
Date:     2016-03-17 12:35:44 -0700 (Thu, 17 Mar 2016)
Log Message:
-----------
berkeleygw: Add variants for linear algebra: OpenBLAS(-devel)/ATLAS/Accelerate, and make Accelerate the default (hence revbump).

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

Modified: trunk/dports/science/berkeleygw/Portfile
===================================================================
--- trunk/dports/science/berkeleygw/Portfile	2016-03-17 19:28:13 UTC (rev 146786)
+++ trunk/dports/science/berkeleygw/Portfile	2016-03-17 19:35:44 UTC (rev 146787)
@@ -6,6 +6,7 @@
 
 name                berkeleygw
 version             1.1-beta2
+revision            1
 categories          science
 platforms           darwin
 license             BSD
@@ -24,8 +25,7 @@
 
 distfiles           BGW-${version}.tar.gz
 
-depends_lib         port:atlas \
-                    port:fftw
+depends_lib         port:fftw
 # fftw port always has a Fortran variant
 
 # WHAT DO WE DO WHEN meaning of 'gfortran' is updated? No record... Must rename to gfortran5 etc.
@@ -52,7 +52,7 @@
 # fftw is not universal
 universal_variant   no
 
-# FIXME: add options for OpenBLAS(-devel)/accelerate; threads
+# FIXME: add options for threads
 
 # FIXME: this unnecessarily enforces scalapack also had same C compiler as we are using.
 if {[mpi_variant_isset]} {
@@ -95,9 +95,32 @@
     For the purposes of record-keeping and support, please register an account at www.berkeleygw.org.
 }
 
+set lapacklib ""
+# choose one of the following for serial linear algebra
+if {![variant_isset accelerate] && ![variant_isset atlas] && ![variant_isset openblas]} {
+    default_variants-append +accelerate
+}
+
+variant accelerate conflicts atlas openblas description {Build with linear algebra from built-in Accelerate framework} {
+    depends_lib-append      port:veclibfort
+    set lapacklib           -lveclibfort
+}
+
+variant atlas conflicts accelerate openblas description {Build with linear algebra from ATLAS} {
+    depends_lib-append      port:atlas
+    set lapacklib           -lsatlas
+}
+
+variant openblas conflicts accelerate atlas description {Build with linear algebra from OpenBLAS} {
+    # allow OpenBLAS-devel too
+    depends_lib-append      path:lib/libopenblas.dylib:OpenBLAS
+    require_active_variants path:lib/libopenblas.dylib:OpenBLAS lapack
+    set lapacklib           -lopenblas
+}
+
 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"
+                        LAPACKLIB="-L${prefix}/lib/ ${lapacklib}"
 
     set mathflag ""
     if {[variant_isset hdf5]} {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160317/fc23fe13/attachment.html>


More information about the macports-changes mailing list