Ticket #25562: miriad-4.diff

File miriad-4.diff, 3.1 KB (added by pkgw (Peter Williams), 14 years ago)

Implement default telescope choice as default +ata variant

  • ports/science/miriad/Portfile

    diff --git a/ports/science/miriad/Portfile b/ports/science/miriad/Portfile
    index 9f4132d..16a532f 100644
    a b license unknown 
    3434master_sites http://astro.berkeley.edu/~pkwill/miriad-macport/
    3535checksums    sha1 5aa26e678efbdb0c893517cf0a9d1f4d20eb66bd
    3636
     37# Telescope/buffer size selection.
     38
     39variant ata conflicts carma description {use buffer sizes appropriate to ATA data} {}
     40variant carma conflicts ata description {use buffer sizes appropriate to CARMA data} {}
     41
     42if {[variant_isset carma]} {
     43    set thescope carma
     44} else {
     45    set thescope ata
     46}
     47
    3748# We need Fortran support, which the Apple version of GCC doesn't offer.
    3849# So we force the use of a specified MacPorts-built GCC.
    3950
    4051variant gcc43 conflicts gcc44 description {build with gcc 4.3} {}
    4152variant gcc44 conflicts gcc43 description {build with gcc 4.4} {}
    4253
     54default_variants +gcc44 +ata
     55
    4356if {[variant_isset gcc43]} {
    4457    set compilerport  gcc43
    4558    set compilerident macports-gcc-4.3
    4659} else {
    4760    set compilerport  gcc44
    4861    set compilerident macports-gcc-4.4
    49     default_variants +gcc44
    5062}
    5163
    5264universal_variant    no
    minimum_xcodeversions {9 3.1} 
    7385
    7486worksrcdir      ${name}-${relver}
    7587
    76 # I'm writing the Portfile and I use the ATA, so the default telescope
    77 # is the ATA too. Privileges of maintainership.
    78 
    79 set defaultscope ata
    80 set thescope ${defaultscope}
    81 
    8288# Configure settings. Keep the binaries out of ${prefix}/bin to avoid
    8389# possible conflicts. The automiriad scripts will deal with this correctly.
    8490
    8591configure.args  --bindir=${prefix}/libexec/miriad \
    86                 --with-telescope=${defaultscope} \
     92                --with-telescope=${thescope} \
    8793                --disable-docs
    8894configure.compiler ${compilerident}
    8995
    configure.compiler ${compilerident} 
    9298
    9399pre-configure {
    94100    ui_msg "Configuring MIRIAD with telescope parameter of \"${thescope}\"."
    95     ui_msg "Consult the port variants to use a different setting. The default"
    96     ui_msg "is \"${defaultscope}\". If there's no variant for your desired"
    97     ui_msg "telescope, contact the port maintainer and one will be quickly added."
     101    ui_msg "Consult the port variants to use a different setting. If there's"
     102    ui_msg "no variant for your desired telescope, contact the port maintainer"
     103    ui_msg "and one will be quickly added."
    98104}
    99105
    100106# Little helpful message. We could consider adding a patch to install
    notes "MIRIAD programs are not in your \$PATH by default." \ 
    109115      "You can put this command in your .profile or other shell initialization " \
    110116      "files to have your shells automatically set up to use MIRIAD."
    111117
    112 # Variants. We can easily add more telescope variants as requested.
    113 
    114 variant carma description {Use buffer sizes appropriate to CARMA data} {
    115     set thescope carma
    116     configure.args-delete --with-telescope=${defaultscope}
    117     configure.args-append --with-telescope=${thescope}
    118 }
     118# Miscellaneous variants.
    119119
    120120variant debug description {Build with debugging support -- tasks will be very slow} {
    121121    configure.optflags -g -O0