# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 83385 2011-08-31 01:52:26Z dports@macports.org $

PortSystem         1.0

name               funtools
version            1.4.0
categories         science
platforms          darwin
maintainers        saao.ac.za:tim
license            LGPL-2.1

description        a minimal buy-in FITS library and utility package

long_description    Funtools is a \"minimal buy-in\" FITS library and \
    utility package developed at the the High Energy Astrophysics Division \
    of SAO. The Funtools library provides simplified access to a \
    wide array of file types: standard astronomical FITS images and binary \
    tables, raw arrays and binary event lists, and even tables of ASCII \
    column data. A sophisticated region filtering library (compatible with \
    ds9) filters images and tables using boolean operations between geometric \
    shapes, support world coordinates, etc. Funtools also supports advanced \
    capabilities such as optimized data searching using index files.\
    The main goal of the Funtools project has been to develop a minimal \
    buy-in FITS library for researchers who are occasional (but serious) \
    coders. In this case, minimal buy-in means easy to learn, easy to \
    use, and easy to re-learn next month.

homepage           http://www.cfa.harvard.edu/~john/funtools/
master_sites       ${homepage}
checksums          md5 8079d723e1424141c3f2bc4ea9b323db \
                   sha1 cf24c89acd4a4e6815336e0cbc4d445998d89db3 \
                   rmd160 f566ac1dfd5724171f46507ccbdec6f80a168f5b

depends_run        port:xpa

patch.pre_args     -p1
patchfiles         patch-funtools

destroot.destdir   INSTALL_ROOT=${destroot}

post-destroot {
    set docdir ${destroot}${prefix}/share/doc/${name}
    xinstall -d ${docdir}
    xinstall -m 644 -W ${worksrcpath} \
        COPYING \
        README \
        ${docdir}
    xinstall -m 644 -W ${worksrcpath}/doc \
        funtools.pdf \
        ${docdir}
}

livecheck.type     regex
livecheck.url      [lindex ${master_sites} 0]
livecheck.regex    ${name}-(\[0-9.\]+)\\.tar
