Changeset 144255 for trunk/dports/math


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.

Location:
trunk/dports/math
Files:
2 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
  • trunk/dports/math/blitz/Portfile

    r143116 r144255  
    44PortSystem          1.0
    55PortGroup           muniversal 1.0
     6PortGroup           compilers 1.0
    67
    78name                blitz
     
    1213platforms           darwin
    1314maintainers         nomaintainer
     15conflicts           blitz-devel
    1416
    1517description         a C++ class library for scientific computing
     
    2830                    sha256  804ef0e6911d43642a2ea1894e47c6007e4c185c866a7d68bad1e4c8ac4e6f94
    2931
     32compilers.choose    fc f77 f90
     33compilers.setup     require_fortran
     34
    3035configure.args      --enable-shared \
    3136                    --disable-doxygen \
     
    3641destroot.args       docdir=${prefix}/share/doc/${name}
    3742
    38 set gcc_versions {4.3 4.4 4.5 4.6 4.7 4.8 4.9}
    39 set default_fortran_variant +gcc49
    40 set g95_conflicts {}
    41 
    42 foreach ver ${gcc_versions} {
    43     set ver_no_dot [join [split ${ver} "."] ""]
    44 
    45     set variant_line {variant gcc${ver_no_dot} description "build with gfortran from gcc${ver_no_dot}" conflicts g95}
    46 
    47     foreach over ${gcc_versions} {
    48         if {${ver} == ${over}} {
    49             continue
    50         }
    51 
    52         set over_no_dot [join [split ${over} "."] ""]
    53         append variant_line " conflicts gcc${over_no_dot}"
    54     }
    55     append variant_line { {}}
    56 
    57     eval $variant_line
    58 
    59     append g95_conflicts " conflicts gcc${ver_no_dot}"
    60 
    61     if {[variant_isset gcc${ver_no_dot}]} {
    62         if {${default_fortran_variant} != "+gcc${ver_no_dot}"} {
    63             set default_fortran_variant ""
    64         }
    65     }
    66 }
    67 
    68 eval [concat {variant g95 description {build with g95}} $g95_conflicts {{}}]
    69 
    70 if {[variant_isset g95]} {
    71     if {${default_fortran_variant} != "+g95"} {
    72         set default_fortran_variant ""
    73     }
    74 }
    75 
    76 if {${default_fortran_variant} != ""} {
    77     default_variants "${default_fortran_variant}"
    78 }
    79 
    80 foreach ver ${gcc_versions} {
    81     set ver_no_dot [join [split ${ver} "."] ""]
    82 
    83     if {[variant_isset gcc${ver_no_dot}]} {
    84         depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
    85         depends_build-append port:gcc${ver_no_dot}
    86 
    87         configure.fc  ${prefix}/bin/gfortran-mp-${ver}
    88         configure.f77 ${prefix}/bin/gfortran-mp-${ver}
    89         configure.f90 ${prefix}/bin/gfortran-mp-${ver}
    90     }
    91 }
    92 
    93 if {[variant_isset g95]} {
    94     depends_lib-append path:lib/libgcc/libgcc_s.1.dylib:libgcc
    95     depends_build-append port:g95
    96 
    97     configure.fc ${prefix}/bin/g95
    98     configure.f77 ${prefix}/bin/g95
    99     configure.f90 ${prefix}/bin/g95
    100 }
    101 
    10243livecheck.regex     /${name}-(\[0-9.\]+)${extract.suffix}
Note: See TracChangeset for help on using the changeset viewer.