[144694] trunk/dports/python/py-pymc/Portfile

dstrubbe at macports.org dstrubbe at macports.org
Fri Jan 15 10:56:34 PST 2016


Revision: 144694
          https://trac.macports.org/changeset/144694
Author:   dstrubbe at macports.org
Date:     2016-01-15 10:56:34 -0800 (Fri, 15 Jan 2016)
Log Message:
-----------
py-pymc: Use compilers portgroup for Fortran variants rather than the obsolete recipe. Also, it allows a simple way to enforce the same Fortran compiler was used for numpy, as was reported to be necessary to avoid a test failure (ticket #49747). Maintainer timeout, ticket #50230.

Modified Paths:
--------------
    trunk/dports/python/py-pymc/Portfile

Modified: trunk/dports/python/py-pymc/Portfile
===================================================================
--- trunk/dports/python/py-pymc/Portfile	2016-01-15 18:54:46 UTC (rev 144693)
+++ trunk/dports/python/py-pymc/Portfile	2016-01-15 18:56:34 UTC (rev 144694)
@@ -1,9 +1,10 @@
-# -*- coding: utf-8; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
+# -*- coding: utf-8;  mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
 # $Id$
 
 PortSystem          1.0
 PortGroup           python 1.0
 PortGroup           github 1.0
+PortGroup           compilers 1.0
 
 github.setup        pymc-devs pymc 2.3.6 v
 name                py-pymc
@@ -24,76 +25,18 @@
 
 if {${name} ne ${subport}} {
     depends_lib-append  port:py${python.version}-numpy
+    compilers.enforce_fortran  port:py${python.version}-numpy
 
     checksums       rmd160  b4eac13ae502bb3e8ec3f314deb73750edcb6a8a \
                     sha256  9c33a3430e8d55dbe0beaa79394e866f9115c4ec84615e24dabc154334538a6a
 
-    set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9 5}
-    set default_fortran_variant +gcc5
-    set g95_conflicts {}
+    compilers.choose   fc f77 f90
+    compilers.setup    require_fortran -dragonegg
 
-    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}
-
-            build.cmd "${build.cmd} config_fc --fcompiler gfortran"
-
-            configure.fc  ${prefix}/bin/gfortran-mp-${ver}
-            configure.f77 ${prefix}/bin/gfortran-mp-${ver}
-            configure.f90 ${prefix}/bin/gfortran-mp-${ver}
-        }
-    }
-
-    if {[variant_isset g95]} {
-        depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
-        depends_build-append port:g95
-
+    if {[gcc_variant_isset]} {
+        build.cmd "${build.cmd} config_fc --fcompiler gfortran"
+    } elseif {[variant_isset g95]} {
         build.cmd "${build.cmd} config_fc --fcompiler g95"
-
-        configure.fc ${prefix}/bin/g95
-        configure.f77 ${prefix}/bin/g95
-        configure.f90 ${prefix}/bin/g95
     }
 
     # Insert my own archflags, so I can edit LDFLAGS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160115/f4dc6ad2/attachment.html>


More information about the macports-changes mailing list