[127654] trunk/dports/science/etsf_io/Portfile

dstrubbe at macports.org dstrubbe at macports.org
Fri Oct 31 09:46:20 PDT 2014


Revision: 127654
          https://trac.macports.org/changeset/127654
Author:   dstrubbe at macports.org
Date:     2014-10-31 09:46:20 -0700 (Fri, 31 Oct 2014)
Log Message:
-----------
etsf_io: Use compilers PortGroup, enabling dragonegg variants.

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

Modified: trunk/dports/science/etsf_io/Portfile
===================================================================
--- trunk/dports/science/etsf_io/Portfile	2014-10-31 15:52:22 UTC (rev 127653)
+++ trunk/dports/science/etsf_io/Portfile	2014-10-31 16:46:20 UTC (rev 127654)
@@ -2,7 +2,7 @@
 # $Id$
 
 PortSystem          1.0
-PortGroup           active_variants 1.1
+PortGroup           compilers 1.0
 
 name                etsf_io
 version             1.0.4
@@ -20,6 +20,13 @@
 checksums           rmd160  25d311b2952714639f315ae26dd1c25c84b9c0f0 \
                     sha1    8b7c7af083946e03f76b68af69c046d3b127494a
 
+compilers.choose    fc
+compilers.setup     require_fortran
+
+if {![fortran_variant_isset]} {
+    default_variants-append +gcc48
+}
+
 depends_lib         port:netcdf-fortran
 
 # https://trac.macports.org/ticket/39319
@@ -39,71 +46,10 @@
 test.run            yes
 test.cmd            make
 test.target         check
+# Warning: a few tests will fail with g95.
 
-# Fortran recipe
-set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9}
-set default_fortran_variant +gcc48
-set g95_conflicts {}
+compilers.enforce_fortran netcdf-fortran
 
-foreach ver ${gcc_versions} {
-    set ver_no_dot [join [split ${ver} "."] ""]
-
-    set variant_line {variant gcc${ver_no_dot} description "build with gfortran from gcc${ver_no_dot}" conflicts g95}
-
-    foreach over ${gcc_versions} {
-        if {${ver} == ${over}} {
-            continue
-        }
-
-        set over_no_dot [join [split ${over} "."] ""]
-        append variant_line " conflicts gcc${over_no_dot}"
-    }
-    append variant_line { {}}
-
-    eval $variant_line
-
-    append g95_conflicts " conflicts gcc${ver_no_dot}"
-
-    if {[variant_isset gcc${ver_no_dot}]} {
-        if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
-            set default_fortran_variant ""
-        }
-    }
-}
-
-eval [concat {variant g95 description {build with g95}} $g95_conflicts {{}}]
-
-if {[variant_isset g95]} {
-    if {${default_fortran_variant} != "+g95"} {
-        set default_fortran_variant ""
-    }
-}
-
-if {${default_fortran_variant} != ""} {
-    default_variants-append "${default_fortran_variant}"
-}
-
-foreach ver ${gcc_versions} {
-    set ver_no_dot [join [split ${ver} "."] ""]
-
-    if {[variant_isset gcc${ver_no_dot}]} {
-        depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
-        depends_build-append port:gcc${ver_no_dot}
-
-        configure.fc              gfortran-mp-${ver}
-        require_active_variants   netcdf-fortran gcc${ver_no_dot}
-    }
-}
-
-if {[variant_isset g95]} {
-    depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
-    depends_build-append port:g95
-
-    configure.fc              ${prefix}/bin/g95
-    require_active_variants   netcdf-fortran g95
-    # Warning: a few tests will fail with g95.
-}
-
 livecheck.url       ${homepage}
 livecheck.type      regex
 livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141031/470169eb/attachment.html>


More information about the macports-changes mailing list