<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[143272] trunk/dports/science/abinit/Portfile</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/143272">143272</a></dd>
<dt>Author</dt> <dd>dstrubbe@macports.org</dd>
<dt>Date</dt> <dd>2015-12-09 11:12:22 -0800 (Wed, 09 Dec 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>abinit: Maintainer timeout, ticket #45617.
* Updating to 7.10.5
* Using compilers and mpi portgroups
* Adds support for gcc5 and gcc6, and understanding of +gfortran in dependencies; support for devel MPI ports
* Great simplification of enforcement of Fortran variants etc. in pre-fetch.
* Disabled +atompaw, since it (like the +bigdft variant) downloads some code itself in the build step.
* Fixed livecheck.
* Presence of Fortran variant for fftw-3 and fftw-3-single is checked.
* Apparently OpenMPI would not use MPI2 here before; I expect this is related to a bug in OpenMPI (or its packaging) that I found with octopus, and was fixed some time ago (#39826). Now MPI2 is enabled always.
* +g95 is usable now (though not with threads).
* Removed unnecessary statement &quot;build.cmd make&quot; which is the default.
* cxx compiler is not specified since it does not appear to be used in abinit.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsscienceabinitPortfile">trunk/dports/science/abinit/Portfile</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsscienceabinitPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/science/abinit/Portfile (143271 => 143272)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/science/abinit/Portfile        2015-12-09 19:02:43 UTC (rev 143271)
+++ trunk/dports/science/abinit/Portfile        2015-12-09 19:12:22 UTC (rev 143272)
</span><span class="lines">@@ -2,10 +2,10 @@
</span><span class="cx"> # $Id$
</span><span class="cx"> 
</span><span class="cx"> PortSystem          1.0
</span><del>-PortGroup           active_variants 1.1
</del><ins>+PortGroup           mpi 1.0
</ins><span class="cx"> 
</span><span class="cx"> name                abinit
</span><del>-version             7.10.2
</del><ins>+version             7.10.5
</ins><span class="cx"> revision            2
</span><span class="cx"> categories          science
</span><span class="cx"> platforms           darwin
</span><span class="lines">@@ -32,19 +32,19 @@
</span><span class="cx"> homepage            http://www.abinit.org
</span><span class="cx"> master_sites        http://ftp.abinit.org/
</span><span class="cx"> 
</span><del>-checksums           rmd160  cf4078c1eab2cc3200e084379738939cafda5ba2 \
-                    sha256  cbead80096d97f1c8d08ccb3b9b2851ac1e56accaebe551d9ab29757e9cd531e
</del><ins>+checksums           rmd160  f77a9db5bcd97bcc46ea11a96bbf8f17cb1a19b3 \
+                    sha256  e9376a3e34790bce90992f28e5fa8554b51ba467bf5709c7fd25d300e7c4f56a
</ins><span class="cx"> 
</span><del>-depends_lib         port:atlas
</del><ins>+# or vecLibFort, or OpenBLAS(-devel)
+depends_lib-append  port:atlas
</ins><span class="cx"> 
</span><del>-configure.args      --with-linalg-flavor=&quot;atlas&quot; --enable-gw-dpc
</del><ins>+compilers.choose    cc fc
+# g95 is not compatible with OpenMP
+mpi.setup           default require_fortran -g95
+
+configure.args-append  --with-linalg-flavor=&quot;atlas&quot; --enable-gw-dpc --enable-fox
</ins><span class="cx"> configure.optflags  -O3
</span><span class="cx"> 
</span><del>-# FIXME: not right for g95? would be -ffree-line-length-huge. This is really the configure script's job? Not easy to set this right for MPI g95.
-# If this is not set, there will be some compilation failures, due to inadequate provisions by the code for compilers that don't accept long lines.
-configure.fcflags-append -ffree-line-length-none
-
-build.cmd           make
</del><span class="cx"> use_parallel_build  yes
</span><span class="cx"> 
</span><span class="cx"> # We do not need to use ABINIT's own approach to parallel builds, which only is relevant if
</span><span class="lines">@@ -54,80 +54,19 @@
</span><span class="cx"> 
</span><span class="cx"> default_variants +etsf_io +libxc
</span><span class="cx"> # Do not put +wannier90 since tests fail for wannier90 use.
</span><del>-if { ![variant_isset gcc46] &amp;&amp; ![variant_isset gcc47] &amp;&amp; ![variant_isset gcc48] &amp;&amp; ![variant_isset gcc49] } {
-    if { ![variant_isset openmpi] } {
-        default_variants    +mpich
-    } elseif { ![variant_isset mpich] } {
-        default_variants    +openmpi
-    } else {
-        default_variants    +gcc49
-    }
-}
</del><span class="cx"> 
</span><del>-# FIXME: use compiler and MPI port groups
-
-pre-fetch {
-    set fortran unknown
-    set fortrans { gcc42 gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 gcc49 g95 }
-
-    foreach fc_name ${fortrans} {
-        if { [variant_isset ${fc_name}] } {
-            set fortran ${fc_name}
-        } elseif { [variant_isset openmpi] } {
-            if { [_portnameactive openmpi-default] } {
-                if { [active_variants openmpi-default ${fc_name}] } { set fortran ${fc_name} }
-            } elseif { [_portnameactive openmpi-devel-default] } {
-                if { [active_variants openmpi-devel-default ${fc_name}] } { set fortran ${fc_name} }
-            }
-        } elseif { [variant_isset mpich] } {
-            if { [_portnameactive mpich-default] } {
-                if { [active_variants mpich-default ${fc_name}] } { set fortran ${fc_name} }
-            } elseif { [_portnameactive mpich-devel-default] } {
-                if { [active_variants mpich-devel-default ${fc_name}] } { set fortran ${fc_name} }
-            }
</del><ins>+pre-configure {
+    if {[fortran_variant_name] eq &quot;g95&quot;} {
+        configure.fcflags-append -ffree-line-length-huge
+        if {[variant_isset threads]} {
+            ui_error &quot;You can select only one of +g95 and +threads.&quot;
+            return -code error &quot;+g95 and +threads are not compatible since g95 does not support OpenMP.&quot;
</ins><span class="cx">         }
</span><ins>+    } else {
+        configure.fcflags-append -ffree-line-length-none
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if { ${fortran} eq &quot;unknown&quot; } {
-        if { [variant_isset openmpi] } {
-            ui_error &quot;Variant +openmpi requires openmpi to have been built with Fortran support.&quot;
-            return -code error &quot;Variant +openmpi requires openmpi to have been built with Fortran support.&quot;
-        } elseif { [variant_isset mpich] } {
-            ui_error &quot;Variant +mpich requires mpich-default/mpich-devel-default to have been built with Fortran support.&quot;
-            return -code error &quot;Variant +mpich requires mpich-default/mpich-devel-default to have been built with Fortran support.&quot;
-        } else {
-            ui_error &quot;Internal error: cannot determine Fortran compiler.&quot;
-            return -code error &quot;Internal error: cannot determine Fortran compiler.&quot;
-        }
-    }
-
-    if { [variant_isset libxc] } {
-        if { ![active_variants libxc ${fortran}] } {
-            ui_error &quot;libxc must have been built with +${fortran}.&quot;
-            return -code error &quot;libxc must have been built with +${fortran}.&quot;
-        }
-    }
-
-    if { [variant_isset netcdf] } {
-        if {![active_variants netcdf-fortran ${fortran}] } {
-            ui_error &quot;netcdf-fortran must have been built with +${fortran}.&quot;
-            return -code error &quot;netcdf-fortran must have been built with +${fortran}.&quot;
-        }
-    }
-
</del><span class="cx">     if { [variant_isset etsf_io] } {
</span><del>-        if {![active_variants etsf_io ${fortran}] } {
-            ui_error &quot;etsf_io must have been built with +${fortran}.&quot;
-            return -code error &quot;etsf_io must have been built with +${fortran}.&quot;
-        }
-    }
-
-#   No need to check compiler for wannier90
-#   No need to check compiler for fftw-3
-}
-
-pre-configure {
-    if { [variant_isset etsf_io] } {
</del><span class="cx">             configure.args-append  --with-trio-flavor=&quot;netcdf+etsf_io&quot;
</span><span class="cx">         } elseif { [variant_isset netcdf] } {
</span><span class="cx">             configure.args-append  --with-trio-flavor=&quot;netcdf&quot;
</span><span class="lines">@@ -187,52 +126,21 @@
</span><span class="cx"> test.target         built-in fast
</span><span class="cx"> # wannier90 test will probably fail.
</span><span class="cx"> 
</span><del>-variant gcc46 conflicts gcc47 gcc48 gcc49 openmpi mpich description {Build with GCC 4.6} {
-    configure.compiler  macports-gcc-4.6
-    configure.args-append  FCCPP=&quot;${configure.cpp} -ansi&quot;
-}
-
-variant gcc47 conflicts gcc46 gcc48 gcc49 openmpi mpich description {Build with GCC 4.7} {
-    configure.compiler  macports-gcc-4.7
-    configure.args-append  FCCPP=&quot;${configure.cpp} -ansi&quot;
-}
-
-variant gcc48 conflicts gcc46 gcc47 gcc49 openmpi mpich description {Build with GCC 4.8} {
-    configure.compiler  macports-gcc-4.8
-    configure.args-append  FCCPP=&quot;${configure.cpp} -ansi&quot;
-}
-
-variant gcc49 conflicts gcc46 gcc47 gcc48 openmpi mpich description {Build with GCC 4.9} {
-    configure.compiler  macports-gcc-4.9
-    configure.args-append  FCCPP=&quot;${configure.cpp} -ansi&quot;
-}
-
-variant openmpi conflicts gcc46 gcc47 gcc48 gcc49 mpich description {Build parallel version with OpenMPI} {
-    depends_lib-append     path:bin/mpif90-openmpi-mp:openmpi-default
-    configure.fc           mpif90-openmpi-mp
-    configure.cc           mpicc-openmpi-mp
-    configure.cxx          mpicxx-openmpi-mp
</del><ins>+pre-configure {
</ins><span class="cx">     configure.args-append  FCCPP=&quot;${configure.cc} -E -ansi&quot;
</span><del>-    configure.args-append  --enable-mpi=&quot;yes&quot; --enable-mpi-io=&quot;yes&quot; --with-mpi-level=&quot;1&quot;
-    configure.args-append  MPI_RUNNER=${prefix}/bin/mpiexec-openmpi-mp
-    test.env-append        MPIEXEC=${prefix}/bin/mpiexec-openmpi-mp
</del><ins>+    if {[mpi_variant_isset]} {
+        configure.args-append  MPI_RUNNER=${mpi.exec}
+        test.env-append        MPIEXEC=${mpi.exec}
+        configure.args-append  --enable-mpi=&quot;yes&quot; --enable-mpi-io=&quot;yes&quot;
+    } else {
+        configure.args-append  --enable-mpi=&quot;no&quot;
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-variant mpich conflicts gcc46 gcc47 gcc48 gcc49 openmpi description {Build parallel version with MPICH} {
-    depends_lib-append     path:bin/mpif90-mpich-mp:mpich-default
-    configure.fc           mpif90-mpich-mp
-    configure.cc           mpicc-mpich-mp
-    configure.cxx          mpicxx-mpich-mp
-    configure.args-append  FCCPP=&quot;${configure.cc} -E -ansi&quot;
-    configure.args-append  --enable-mpi=&quot;yes&quot; --enable-mpi-io=&quot;yes&quot;
-    configure.args-append  MPI_RUNNER=${prefix}/bin/mpiexec-mpich-mp
-    test.env-append        MPIEXEC=${prefix}/bin/mpiexec-mpich-mp
-}
-
</del><span class="cx"> variant fftw3 description {Build with support for fftw-3 FFT library} {
</span><del>-    # FIXME: these need to be installed with some Fortran variant
-    depends_lib-append      port:fftw-3
-    depends_lib-append      port:fftw-3-single
</del><ins>+    depends_lib-append      port:fftw-3 port:fftw-3-single
+    compilers.enforce_some_fortran fftw-3 fftw-3-single
+    
</ins><span class="cx">     if { [variant_isset threads] } {
</span><span class="cx">         configure.args-append   --with-fft-flavor=&quot;fftw3-threads&quot;
</span><span class="cx">         configure.args-append   --with-fft-libs=&quot;-lfftw3_threads -lfftw3 -lfftw3f&quot;
</span><span class="lines">@@ -242,7 +150,8 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-variant threads description {Build with support for multi-thread support (openMP)} {
</del><ins>+variant threads description {Build with support for OpenMP threads} {
+    # not compatible with g95. What about threaded FFTW3?
</ins><span class="cx">     configure.args-append   --enable-openmp
</span><span class="cx">     configure.fcflags-append -fopenmp
</span><span class="cx">     configure.args-append   --with-linalg-libs=&quot;-L${prefix}/lib -ltatlas&quot;
</span><span class="lines">@@ -251,17 +160,20 @@
</span><span class="cx"> 
</span><span class="cx"> variant netcdf description {Build with support for NetCDF transferable I/O} {
</span><span class="cx">     depends_lib-append      port:netcdf-fortran
</span><ins>+    compilers.enforce_fortran netcdf-fortran
</ins><span class="cx">     configure.args-append   --with-netcdf-incs=&quot;-I${prefix}/include&quot;
</span><span class="cx">     configure.args-append   --with-netcdf-libs=&quot;-L${prefix}/lib -lnetcdf -lnetcdff&quot;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> variant etsf_io requires netcdf description {Build with support for ETSF_IO transferable I/O} {
</span><span class="cx">     depends_lib-append      port:etsf_io
</span><ins>+    compilers.enforce_fortran etsf_io
</ins><span class="cx">     configure.args-append   --with-etsf-io-incs=&quot;-I${prefix}/include/gcc&quot;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> variant libxc description {Build with support for libXC exchange-correlation library} {
</span><span class="cx">     depends_lib-append      port:libxc
</span><ins>+    compilers.enforce_fortran libxc
</ins><span class="cx">     configure.args-append   --with-libxc-incs=&quot;-I${prefix}/include&quot;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -281,9 +193,10 @@
</span><span class="cx"> #    patchfiles-append       patch-fallbacks-sources-bigdft-1.7.0.93-src-Makefile.in.diff
</span><span class="cx"> #}
</span><span class="cx"> 
</span><del>-variant atompaw description {Build including AtomPAW atomic dataset generator} {
-}
</del><ins>+# FIXME: same problem as for BigDFT, it gets downloaded. Make a separate port.
+#variant atompaw description {Build including AtomPAW atomic dataset generator} {
+#}
</ins><span class="cx">  
</span><span class="cx"> livecheck.type      regex
</span><del>-livecheck.url       ${homepage}/downloads/source-packages/abinit-1/releases/index.html
-livecheck.regex     ABINIT (\[0-9.\]+)
</del><ins>+livecheck.url       ${homepage}/downloads/abinit-packages
+livecheck.regex     ABINIT v (\[0-9.\]+)
</ins></span></pre>
</div>
</div>

</body>
</html>