Ticket #49266: patch-r-compilers.diff

File patch-r-compilers.diff, 2.4 KB (added by seanfarley (Sean Farley), 9 years ago)
  • dports/math/R/Portfile

    # HG changeset patch
    # User Sean Farley <sean@farley.io>
    # Date 1444414950 25200
    #      Fri Oct 09 11:22:30 2015 -0700
    # Node ID 606edae6e11214bad07052c2988753e8c34e145a
    # Parent  80f58896dc3dbf34ebb69a3c8e4a6a9ff6d14a84
    r: use compilers portgroup
    
    diff --git a/dports/math/R/Portfile b/dports/math/R/Portfile
    a b  
    11# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
    22# $Id$
    33
    44PortSystem 1.0
    55PortGroup active_variants 1.1
     6PortGroup compilers 1.0
     7
     8compilers.choose            fc f77 f90
     9compilers.setup             require_fortran -g95 -dragonegg
    610
    711name                        R
    812
    913set major 3
    1014set minor 2
    variant cairo description {use cairo and 
    102106
    103107variant debug description {build with debug symbols} {
    104108    configure.optflags-append -g
    105109}
    106110
    107 set gcc_versions {4.5 4.6 4.7 4.8 4.9}
    108 set default_fortran_variant +gfortran48
    109 
    110 foreach ver ${gcc_versions} {
    111     set ver_no_dot [join [split ${ver} "."] ""]
    112 
    113     set variant_line {variant gfortran${ver_no_dot} description "build with gfortran from gcc${ver_no_dot}"}
    114 
    115     foreach over ${gcc_versions} {
    116         if {${ver} == ${over}} {
    117             continue
    118         }
    119 
    120         set over_no_dot [join [split ${over} "."] ""]
    121         append variant_line " conflicts gfortran${over_no_dot}"
    122     }
    123     append variant_line { {}}
    124 
    125     eval $variant_line
    126 
    127     if {[variant_isset gfortran${ver_no_dot}]} {
    128         if {${default_fortran_variant} != "+gfortran${ver_no_dot}"} {
    129             set default_fortran_variant ""
    130         }
    131     }
    132 }
    133 
    134 if {${default_fortran_variant} != ""} {
    135     default_variants-append "${default_fortran_variant}"
    136 }
    137 
    138 foreach ver ${gcc_versions} {
    139     set ver_no_dot [join [split ${ver} "."] ""]
    140 
    141     if {[variant_isset gfortran${ver_no_dot}]} {
    142         depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
    143         depends_build-append port:gcc${ver_no_dot}
    144 
    145         configure.fc  ${prefix}/bin/gfortran-mp-${ver}
    146         configure.f77 ${prefix}/bin/gfortran-mp-${ver}
    147         configure.f90 ${prefix}/bin/gfortran-mp-${ver}
    148     }
    149 }
    150 
    151111variant recommended description {install recommended R packages} {
    152112    configure.args-delete   --without-recommended-packages
    153113    configure.args-append   --with-recommended-packages
    154114}
    155115