[110912] trunk/dports/science/root/Portfile

macsforever2000 at macports.org macsforever2000 at macports.org
Mon Sep 9 15:17:04 PDT 2013


Revision: 110912
          https://trac.macports.org/changeset/110912
Author:   macsforever2000 at macports.org
Date:     2013-09-09 15:17:04 -0700 (Mon, 09 Sep 2013)
Log Message:
-----------
root: Update to version 5.34.10. Use FORTRAN recipe. (#40432)

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

Modified: trunk/dports/science/root/Portfile
===================================================================
--- trunk/dports/science/root/Portfile	2013-09-09 22:00:19 UTC (rev 110911)
+++ trunk/dports/science/root/Portfile	2013-09-09 22:17:04 UTC (rev 110912)
@@ -4,8 +4,8 @@
 PortSystem          1.0
 
 name                root
-version             5.34.09
-revision            1
+version             5.34.10
+
 categories          science
 maintainers         gmail.com:mattiafrancescomoro hep.phy.cam.ac.uk:jonesc
 license             LGPL-2.1+
@@ -19,8 +19,8 @@
 master_sites        http://root.cern.ch/download/ \
                     ftp://root.cern.ch/root/
 
-checksums           rmd160  73a25b1abc5265f658c4da2c9efd7b1df7a5932a \
-                    sha256  a99cd7f34bf25a52e63228f3f7c245afa9e55420bfb4ce7e78d20c6475a4ea86
+checksums           rmd160  cde68d9e96d62d3adc3b6044e167ec5578f22edd \
+                    sha256  a70c46f382e6557765c4741a367bded9b4041f669e9c313c4201ef66f1ae5d9d
 
 worksrcdir          root
 
@@ -50,13 +50,8 @@
     configure.args-append \
         --with-cc=${configure.cc} \
         --with-cxx=${configure.cxx} \
-        --with-ld=${configure.cxx}
-    if { ${configure.f77} != "" } {
-        configure.args-append --with-f77=${configure.f77}
-    } else {
-        # Set something configure will fail to find
-        configure.args-append --with-f77="NONE"
-    }
+        --with-ld=${configure.cxx} \
+        --with-f77=${configure.f77}
     # the build type (32 or 64 bit) -must- be for first argument
     if {${build_arch} == "i386" || ${build_arch} == "ppc"} {
         configure.pre_args macosx --prefix=${prefix}
@@ -273,7 +268,7 @@
 
 variant ruby description {Build with ruby support} {
     configure.args-delete   --disable-ruby
-    configure.args-append   --enable-ruby 
+    configure.args-append   --enable-ruby
     depends_lib-append      port:ruby
 }
 
@@ -359,16 +354,10 @@
 }
 
 variant cocoa description {Enables native OSX graphical backend instead of X11} {
-    # Check we are using a clang compiler
-    pre-fetch {
-        if { ![string match "*clang*" ${configure.compiler}] || [string match "macports-clang-3.3" ${configure.compiler}] } {
-            ui_error "The cocoa variant is experimental and can currently only be built"
-            ui_error "using a clang(<3.3) compiler. Your current compiler is ${configure.compiler}."
-            ui_error "Please try again using either of the clang31 or clang32 variants,"
-            ui_error "or the system clang compiler using configure.compiler=clang"
-            return -code error "Unsupported compiler for cocoa support"
-        }
-    }
+    # Force a compatible clang compiler
+    PortGroup compiler_blacklist_versions 1.0
+    compiler.blacklist-append {clang < 425} *gcc* macports-clang-3.3 macports-clang-2.9 macports-clang-3.0
+    compiler.fallback-append macports-clang-3.2 macports-clang-3.1
     # Enable cocoa support in configure
     configure.args-delete --disable-cocoa
     configure.args-append --enable-cocoa
@@ -376,34 +365,24 @@
     patchfiles-append patch-builtin-afterimage-disabletiff.diff
 }
 
-variant gcc45 conflicts gcc46 gcc47 gcc48 clang31 clang32 clang33 description {Compile using MacPorts gcc 4.5} {
-    configure.compiler      macports-gcc-4.5
+variant clang31 conflicts clang32 clang33 description {Compile using MacPorts clang 3.1} {
+    configure.compiler      macports-clang-3.1
 }
-
-variant gcc46 conflicts gcc45 gcc47 gcc48 clang31 clang32 clang33 description {Compile using MacPorts gcc 4.6} {
-    configure.compiler      macports-gcc-4.6
-}
-
-variant gcc47 conflicts gcc45 gcc46 gcc48 clang31 clang32 clang33 description {Compile using MacPorts gcc 4.7} {
-    configure.compiler      macports-gcc-4.7
-}
-
-variant gcc48 conflicts gcc45 gcc46 gcc47 clang31 clang32 clang33 description {Compile using MacPorts gcc 4.8} {
-    configure.compiler      macports-gcc-4.8
-}
-
-variant clang31 conflicts gcc45 gcc46 gcc47 gcc48 clang32 clang33 description {Compile using MacPorts clang 3.1} {
-    configure.compiler      macports-clang-3.1
+if {[string match macports-clang-3.1 ${configure.compiler}]} {
     configure.args-append   --with-llvm-config="${prefix}/bin/llvm-config-mp-3.1"
 }
 
-variant clang32 conflicts gcc45 gcc46 gcc47 gcc48 clang31 clang33 description {Compile using MacPorts clang 3.2} {
+variant clang32 conflicts clang31 clang33 description {Compile using MacPorts clang 3.2} {
     configure.compiler      macports-clang-3.2
+}
+if {[string match macports-clang-3.2 ${configure.compiler}]} {
     configure.args-append   --with-llvm-config="${prefix}/bin/llvm-config-mp-3.2"
 }
 
-variant clang33 conflicts gcc45 gcc46 gcc47 gcc48 clang31 clang32 description {Compile using MacPorts clang 3.3} {
+variant clang33 conflicts clang31 clang32 description {Compile using MacPorts clang 3.3} {
     configure.compiler      macports-clang-3.3
+}
+if {[string match macports-clang-3.3 ${configure.compiler}]} {
     configure.args-append   --with-llvm-config="${prefix}/bin/llvm-config-mp-3.3"
 }
 
@@ -442,6 +421,59 @@
     }
 }
 
+# ========================================================================================
+# Following is for fortran support
+# Might eventually move to a portgroup, or similar, so could be simplified.
+# Based on recipe from https://trac.macports.org/wiki/PortfileRecipes#fortran
+# Note that g95 does not work here, so that variant is removed
+# ========================================================================================
+
+set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9}
+set default_fortran_variant +gcc48
+
+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}"}
+
+    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
+
+    if {[variant_isset gcc${ver_no_dot}]} {
+        if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
+            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  ${prefix}/bin/gfortran-mp-${ver}
+        configure.f77 ${prefix}/bin/gfortran-mp-${ver}
+        configure.f90 ${prefix}/bin/gfortran-mp-${ver}
+    }
+}
+
+# ========================================================================================
+
 livecheck.type              regex
 livecheck.url               [lindex ${master_sites} 0]
 livecheck.regex             ${name}_v(\[0-9a-z.\]+)\\.source
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130909/f8c091c4/attachment-0001.html>


More information about the macports-changes mailing list