# -*- 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 67989 2010-05-23 20:34:21Z jmr@macports.org $

PortSystem         1.0

name               sextractor
version            2.8.6
categories         science
platforms          darwin
maintainers        saao.ac.za:tim
license            CeCILL

description        tool to make catalogs of sources from astronomical images

long_description   SExtractor stands for ``Source Extractor'': software \
    for making catalogs of sources from astronomical images. Multi-Extension \
    FITS is now supported. Binary output catalogs are also MEFs. ASCII \
    output catalogs contain detections from all extensions merged together. \
    Use the "EXT_NUMBER" catalog parameter to identify the extension on which \
    a given source was detected. Check-images will also be written as MEFs \
    if the input image is a MEF.

homepage           http://www.astromatic.net/software/sextractor/
master_sites       ftp://ftp.iap.fr/pub/from_users/bertin/sextractor/
checksums          md5 6c2fc529cd89bdd11b1fbafc0866131c \
                   sha1 103ac2d51d9bae9fcbc5dda3031d82cd127f8250 \
                   rmd160 98319c54ab3af0d4a91c3ffa70e7d5148b06d67a

depends_lib        port:fftw-3 \
                   port:atlas

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

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
