Ignore:
Timestamp:
Jan 5, 2016, 5:32:49 PM (4 years ago)
Author:
dstrubbe@…
Message:

blitz, blitz-devel: Use compilers portgroup for Fortran variants. Add conflict between them as they try to install common files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/math/blitz-devel/Portfile

    r143117 r144255  
    33
    44PortSystem          1.0
     5PortGroup           compilers 1.0
    56
    67name                blitz-devel
     
    1011license             {LGPL-3+ BSD Artistic-2}
    1112maintainers         nomaintainer
     13conflicts           blitz
    1214
    1315fetch.type          hg
     
    5355}
    5456
    55 set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9}
    56 set default_fortran_variant +gcc49
    57 set g95_conflicts {}
    58 
    59 foreach ver ${gcc_versions} {
    60     set ver_no_dot [join [split ${ver} "."] ""]
    61 
    62     set variant_line {variant gcc${ver_no_dot} description "build with gfortran from gcc${ver_no_dot}" conflicts g95}
    63 
    64     foreach over ${gcc_versions} {
    65         if {${ver} == ${over}} {
    66             continue
    67         }
    68 
    69         set over_no_dot [join [split ${over} "."] ""]
    70         append variant_line " conflicts gcc${over_no_dot}"
    71     }
    72     append variant_line { {}}
    73 
    74     eval $variant_line
    75 
    76     append g95_conflicts " conflicts gcc${ver_no_dot}"
    77 
    78     if {[variant_isset gcc${ver_no_dot}]} {
    79         if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
    80             set default_fortran_variant ""
    81         }
    82     }
    83 }
    84 
    85 eval [concat {variant g95 description {build with g95}} $g95_conflicts {{}}]
    86 
    87 if {[variant_isset g95]} {
    88     if {${default_fortran_variant} != "+g95"} {
    89         set default_fortran_variant ""
    90     }
    91 }
    92 
    93 if {${default_fortran_variant} != ""} {
    94     default_variants "${default_fortran_variant}"
    95 }
    96 
    97 foreach ver ${gcc_versions} {
    98     set ver_no_dot [join [split ${ver} "."] ""]
    99 
    100     if {[variant_isset gcc${ver_no_dot}]} {
    101         depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
    102         depends_build-append port:gcc${ver_no_dot}
    103 
    104         configure.fc  ${prefix}/bin/gfortran-mp-${ver}
    105         configure.f77 ${prefix}/bin/gfortran-mp-${ver}
    106         configure.f90 ${prefix}/bin/gfortran-mp-${ver}
    107     }
    108 }
    109 
    110 if {[variant_isset g95]} {
    111     depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
    112     depends_build-append port:g95
    113 
    114     configure.fc ${prefix}/bin/g95
    115     configure.f77 ${prefix}/bin/g95
    116     configure.f90 ${prefix}/bin/g95
    117 }
     57compilers.choose    fc f77 f90
     58compilers.setup     require_fortran
    11859
    11960# does not do any live check
Note: See TracChangeset for help on using the changeset viewer.