# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 106633 2013-06-02 20:08:15Z aronnax@macports.org $

PortSystem              1.0

name                    ast
version                 7.3.1
categories              science
platforms               darwin
maintainers             aronnax
license                 GPL-2+
description             StarLink Astrometry Library
long_description \
    AST provides a comprehensive range of facilities for attaching world \
    coordinate systems (such as RA/Dec, frequency, etc) to astronomical data, \
    for retrieving and interpreting that information and for generating \
    graphical output based on it.

homepage                http://starlink.jach.hawaii.edu/starlink/AST
master_sites            http://www.starlink.ac.uk/download/ast/
checksums               sha1    88bb476b3af84303bf3c7aae9ba57cd6ec37ffd4 \
                        rmd160  c7562456adbdb00cab79aa5136ba50ea6f69ed68

variant gcc43 conflicts gcc44 gcc45 gcc46 gcc47 gcc48 description {Compile with gcc 4.3} {
    configure.compiler macports-gcc-4.3
    depends_lib-append port:gcc43
}

variant gcc44 conflicts gcc43 gcc45 gcc46 gcc47 gcc48 description {Compile with gcc 4.4} {
    configure.compiler macports-gcc-4.4
    depends_lib-append port:gcc44
}

variant gcc45 conflicts gcc43 gcc44 gcc46 gcc47 gcc48 description {Compile with gcc 4.5} {
    configure.compiler macports-gcc-4.5
    depends_lib-append port:gcc45
}

variant gcc46 conflicts gcc43 gcc44 gcc45 gcc47 gcc48 description {Compile with gcc 4.6} {
    configure.compiler macports-gcc-4.6
    depends_lib-append port:gcc46
}

variant gcc47 conflicts gcc43 gcc44 gcc45 gcc46 gcc48 description {Compile with gcc 4.7} {
    configure.compiler macports-gcc-4.7
    depends_lib-append port:gcc47
}

variant gcc48 conflicts gcc43 gcc44 gcc45 gcc46 gcc47 description {Compile with gcc 4.8} {
    configure.compiler macports-gcc-4.8
    depends_lib-append port:gcc48
}

if {![variant_isset gcc43] && ![variant_isset gcc44] && ![variant_isset gcc45] &&
    ![variant_isset gcc46] && ![variant_isset gcc48]
} then {
    default_variants +gcc47
}

destroot.args-append    stardocsdir=${prefix}/share/docs \
                        starexamplesdir=${prefix}/share/examples \
                        starfacsdir=${prefix}/share/help \
                        starhelpdir=${prefix}/share/help \
                        starnewsdir=${prefix}/share/news \
                        STAR_MANIFEST_DIR=${prefix}/share/manifests

livecheck.url           [lindex ${master_sites} 0]
livecheck.regex         [quotemeta ${name}]-(\\d+(\\.\\d+)+)[quotemeta ${extract.suffix}]
