# -*- 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 119787 2014-05-06 20:48:28Z mf2k@macports.org $

PortSystem         1.0

name               psfex
version            3.17.1
categories         science
platforms          darwin
maintainers        gmail.com:Deil.Christoph openmaintainer
license            GPL-3+

description        tool to extract the point spread function from astronomical images

long_description   PSFEx  (“PSF Extractor”) extracts models of the \
    Point Spread Function (PSF) from FITS images processed with SExtractor, \
    and measures the quality of images. \
    The generated PSF models can be used for model-fitting photometry \
    or morphological analyses.

homepage           http://www.astromatic.net/software/psfex/
master_sites       http://www.astromatic.net/download/psfex/
checksums          rmd160  0cebd0f364f3cbe359cf91d35f9e37d9978cbd2b \
                   sha256  53f1b449ab7da7e6e0a989c41b82885f52c8f08270ceb4378bb1ec7ef754af89

depends_lib        port:atlas \
                   port:fftw-3-single \
                   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
