[142274] trunk/dports/science/octopus

dstrubbe at macports.org dstrubbe at macports.org
Sat Dec 12 05:03:58 PST 2015


Revision: 142274
          https://trac.macports.org/changeset/142274
Author:   dstrubbe at macports.org
Date:     2015-11-08 18:47:32 -0800 (Sun, 08 Nov 2015)
Log Message:
-----------
octopus: Add variants for berkeleygw, and to include all optional dependencies. Update patch to configure so GSL 2.0.0 can be used and so BerkeleyGW can be used. Update comments.

Modified Paths:
--------------
    trunk/dports/science/octopus/Portfile
    trunk/dports/science/octopus/files/patch-configure.diff

Modified: trunk/dports/science/octopus/Portfile
===================================================================
--- trunk/dports/science/octopus/Portfile	2015-11-09 02:34:16 UTC (rev 142273)
+++ trunk/dports/science/octopus/Portfile	2015-11-09 02:47:32 UTC (rev 142274)
@@ -31,10 +31,11 @@
 # clang versions are unnecessary
 # dragonegg34-gcc46 segfaults on varia.c
 mpi.setup           require_fortran -dragonegg34 -gcc5 -gcc6 -clang
+
+# this incorrectly passes if libxc +gcc5, octopus +mpich, mpich-default +gcc49
 compilers.enforce_fortran libxc
 
 depends_lib         port:libxc port:fftw-3 port:gsl
-# openblas or accelerate/veclibfort instead of atlas?
 
 configure.args      --with-libxc-prefix=${prefix} --with-fft-lib="-L${prefix}/lib -lfftw3" \
                     --disable-gdlib --without-sparskit --with-netcdf-prefix=no \
@@ -74,7 +75,7 @@
 }
 
 # More options that could be added:
-# variants: berkeleygw, openmp, threads (for fftw, atlas?), (p)arpack, maxdim4, metis, parmetis
+# variants: openmp, threads (for fftw, atlas?), maxdim4
 # no way to turn off PAPI, but there is no port for this anyway.
 
 # libxc does not have universal variant, so octopus cannot either
@@ -135,7 +136,7 @@
     depends_lib-append      port:gd2
 }
 
-variant scalapack description {Build with ScaLAPACK} {
+variant scalapack description {Build with ScaLAPACK for parallel linear algebra} {
     configure.args-delete   --with-blacs=no
     configure.args-delete   --with-scalapack=no
     configure.args-append   --with-blacs=${prefix}/lib/libscalapack.dylib
@@ -217,6 +218,21 @@
     mpi.enforce_variant     parmetis
 }
 
+variant berkeleygw description {Build with BerkeleyGW output support} {
+    depends_lib-append      port:berkeleygw
+    configure.args-delete   --with-berkeleygw-prefix=no
+    configure.args-append   --with-berkeleygw-prefix=${prefix}
+    compilers.enforce_fortran berkeleygw
+    # FIXME: actually, it is ok if berkeleygw does not have MPI and Octopus does
+    mpi.enforce_variant     berkeleygw
+}
+
+variant everything_serial requires arpack etsf_io netcdf sparskit gdlib berkeleygw \
+    description {Build with all available serial optional dependencies} { }
+
+variant everything requires everything_serial parpack scalapack parmetis pfft \
+    description {Build with all available optional dependencies} { }
+
 livecheck.type      regex
 livecheck.url       ${homepage}/wiki/index.php/Main_Page
 livecheck.regex     ${name} (\[0-9.\]+)

Modified: trunk/dports/science/octopus/files/patch-configure.diff
===================================================================
--- trunk/dports/science/octopus/files/patch-configure.diff	2015-11-09 02:34:16 UTC (rev 142273)
+++ trunk/dports/science/octopus/files/patch-configure.diff	2015-11-09 02:47:32 UTC (rev 142274)
@@ -1,7 +1,70 @@
---- configure	2015-10-09 12:11:54.000000000 -0400
-+++ configure.new	2015-10-09 12:11:38.000000000 -0400
-@@ -12674,6 +12674,10 @@
+--- configure	2015-11-08 13:28:49.000000000 -0500
++++ configure.newer	2015-11-08 13:25:15.000000000 -0500
+@@ -10214,7 +10214,8 @@
  
+     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gsl_major_version.$gsl_minor_version.$gsl_micro_version" >&5
+ $as_echo "$gsl_major_version.$gsl_minor_version.$gsl_micro_version" >&6; }
+-    if test $gsl_major_version -lt $min_gsl_major_version -o $gsl_minor_version -lt $min_gsl_minor_version; then
++    if test $gsl_major_version -lt $min_gsl_major_version -o \
++            $gsl_major_version -eq $min_gsl_major_version -a $gsl_minor_version -lt $min_gsl_minor_version; then
+       as_fn_error $? "could not find required GSL library" "$LINENO" 5
+     fi
+ 
+@@ -11167,11 +11168,9 @@
+   withval=$with_berkeleygw_prefix;
+ fi
+ 
+-case $with_berkeleygw_prefix in
+-  no ) acx_berkeleygw_ok=disabled ;;
+-  *) LIBS_BERKELEYGW="-L$with_berkeleygw_prefix/library -lBGW_wfn";
+-     FCFLAGS_BERKELEYGW="$ax_cv_f90_modflag$with_berkeleygw_prefix/library" ;;
+-esac
++if test "x$with_berkeleygw_prefix" = xno; then
++  acx_berkeleygw_ok=disabled
++fi
+ 
+ acx_berkeleygw_save_LIBS="$LIBS"
+ acx_berkeleygw_save_FCFLAGS="$FCFLAGS"
+@@ -11179,21 +11177,31 @@
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BerkeleyGW" >&5
+ $as_echo_n "checking for BerkeleyGW... " >&6; }
+ if test "$acx_berkeleygw_ok" != disabled; then
+-  FCFLAGS="$FCFLAGS_BERKELEYGW $acx_berkeleygw_save_FCFLAGS"
+-  LIBS="$LIBS_BERKELEYGW $acx_berkeleygw_save_LIBS"
+-  cat > conftest.$ac_ext <<_ACEOF
++  for location in "source" "install"; do
++    if test "$location" = "source"; then
++      LIBS_BERKELEYGW="-L$with_berkeleygw_prefix/library -lBGW_wfn";
++      FCFLAGS_BERKELEYGW="$ax_cv_f90_modflag$with_berkeleygw_prefix/library";
++    else
++      LIBS_BERKELEYGW="-L$with_berkeleygw_prefix/lib -lBGW_wfn";
++      FCFLAGS_BERKELEYGW="$ax_cv_f90_modflag$with_berkeleygw_prefix/include";
++    fi
++
++    FCFLAGS="$FCFLAGS_BERKELEYGW $acx_berkeleygw_save_FCFLAGS"
++    LIBS="$LIBS_BERKELEYGW $acx_berkeleygw_save_LIBS"
++    cat > conftest.$ac_ext <<_ACEOF
+       program main
+ 
+-    use wfn_rho_vxc_io_m
+-    call bgw_conf_test()
++      use wfn_rho_vxc_io_m
++      call bgw_conf_test()
+ 
+       end
+ _ACEOF
+ if ac_fn_fc_try_link "$LINENO"; then :
+-  acx_berkeleygw_ok=yes
++  acx_berkeleygw_ok=yes; break
+ fi
+ rm -f core conftest.err conftest.$ac_objext \
+     conftest$ac_exeext conftest.$ac_ext
++  done
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_berkeleygw_ok ($FCFLAGS_BERKELEYGW $LIBS_BERKELEYGW)" >&5
+ $as_echo "$acx_berkeleygw_ok ($FCFLAGS_BERKELEYGW $LIBS_BERKELEYGW)" >&6; }
+@@ -12655,6 +12664,10 @@
+ 
      CFLAGS="$acx_metis_save_CFLAGS"
      LIBS="$acx_metis_save_LIBS"
 +  else
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151212/be24404f/attachment.html>


More information about the macports-changes mailing list