Ignore:
Timestamp:
Jul 16, 2010, 7:19:53 AM (7 years ago)
Author:
ryandesign@…
Message:

miriad: add gcc_select variant; see discussion at #25562

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/science/miriad/Portfile

    r69573 r69773  
    4949
    5050# We need Fortran support, which the Apple version of GCC doesn't offer.
    51 # So we force the use of a specified MacPorts-built GCC.
     51# So we force the use of a specified MacPorts-built GCC. Some users want
     52# to build with better-optimizing proprietary compilers, which we allow
     53# via the gcc_select mechanism.
    5254
    53 variant gcc43 conflicts gcc44 description {build with gcc 4.3} {}
    54 variant gcc44 conflicts gcc43 description {build with gcc 4.4} {}
     55variant gcc43 conflicts gcc44 gcc_select description {Build with gcc 4.3} {
     56    configure.compiler  macports-gcc-4.3
     57    depends_lib-append  port:gcc43
     58}
    5559
    56 if {[variant_isset gcc43]} {
    57     set compilerport  gcc43
    58     set compilerident macports-gcc-4.3
    59 } else {
    60     set compilerport  gcc44
    61     set compilerident macports-gcc-4.4
     60variant gcc44 conflicts gcc43 gcc_select description {Build with gcc 4.4} {
     61    configure.compiler  macports-gcc-4.4
     62    depends_lib-append  port:gcc44
     63}
     64
     65variant gcc_select conflicts gcc43 gcc44 description {Build with compilers chosen via gcc_select -- experts only} {
     66    # Setting the compiler to vanilla "gcc" prevents MacPorts from
     67    # trying to get fancy with the flags, which probably won't work
     68    # with the user's special compiler.
     69    configure.compiler  gcc
     70    configure.cc        ${prefix}/bin/gcc
     71    configure.cpp       ${prefix}/bin/cpp
     72    configure.cxx       ${prefix}/bin/g++
     73    configure.f77       ${prefix}/bin/gfortran
     74    configure.f90       ${prefix}/bin/gfortran
     75    configure.fc        ${prefix}/bin/gfortran
     76    depends_lib-append  port:gcc_select
     77}
     78
     79if {![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc_select]} {
    6280    default_variants +gcc44
    6381}
     
    6583universal_variant    no
    6684
    67 depends_build-append port:${compilerport}
    6885depends_lib-append   port:libpng \
    6986                     port:readline \
     
    93110                --with-telescope=${thescope} \
    94111                --disable-docs
    95 configure.compiler ${compilerident}
    96112
    97113# The telescope configuration is important, so make sure the user is
Note: See TracChangeset for help on using the changeset viewer.