# -*- 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 67993 2010-05-23 22:05:46Z jmr@macports.org $

PortSystem         1.0

name               scamp
version            1.6.2
categories         science
platforms          darwin
maintainers        saao.ac.za:tim
license            CeCILL

description        computes astrometric and photometric solutions \
                   from SExtractor catalogs

long_description   SCAMP takes catalogs generated by SExtractor and queries \
    online astronomical databases to calibrate astronomical images \
    both photometrically and astrometrically.  It can deal with large \
    numbers of overlapping observations and can provide robust calibrations \
    even with poorly devised survey strategies.

homepage           http://www.astromatic.net/software/scamp/
master_sites       ftp://ftp.iap.fr/pub/from_users/bertin/scamp/
checksums          md5 2eecb2db5e4c8e2249196c0d1e62bbe5 \
                   sha1 3d3cc047ea8b8790efcb6d8c177f88155dd01733 \
                   rmd160 f9fff6ef886db1d345b2b25bc6cc097878321f8a

depends_lib        port:fftw-3 \
                   port:fftw-3-single \
                   port:atlas \
                   port:cdsclient \
                   port:plplot

configure.fc       ${prefix}/bin/no-possible-compiler
eval configure.cflags-append ${configure.cppflags}
configure.args     --with-atlas=${prefix}/lib \
                   --with-atlas-incdir=${prefix}/include \
                   --with-fftw=${prefix}/lib \
                   --with-fftw-incdir=${prefix}/include \
                   --with-plplot=${prefix}/lib \
                   --with-plplot-incdir=${prefix}/include/plplot

post-destroot {
    set docdir ${destroot}${prefix}/share/doc
    xinstall -d ${docdir}
    copy ${worksrcpath}/doc ${docdir}/${name}
    xinstall -m 644 -W ${worksrcpath} \
        README \
        AUTHORS \
        COPYRIGHT \
        ChangeLog \
        BUGS \
        HISTORY \
        THANKS \
        ${docdir}/${name}
}

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