# -*- 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

PortSystem          1.0
PortGroup           github 1.0

github.setup        astromatic psfex 3.24.2
revision            0
checksums           rmd160  45ce7b703dd5a03f5b73b2d9237c3326ad0698e9 \
                    sha256  e2c94bf60d90e0db52ad4b8baa5d5fceb483eff6a87b35c6fc5a881fccc04af9 \
                    size    2728025

categories          science
maintainers         nomaintainer
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/
github.tarball_from archive

# No configure script in tarball.
use_autoreconf      yes
autoreconf.cmd      ./autogen.sh
autoreconf.args
autoreconf.env      ACLOCAL=${prefix}/bin/aclocal \
                    AUTOCONF=${prefix}/bin/autoconf \
                    AUTORECONF=${prefix}/bin/autoreconf \
                    AUTOMAKE=${prefix}/bin/automake \
                    LIBTOOLIZE=${prefix}/bin/glibtoolize

depends_build-append \
                    port:autoconf \
                    port:automake \
                    port:libtool

depends_lib         port:OpenBLAS \
                    port:fftw-3-single

configure.fc        ${prefix}/bin/no-possible-compiler
configure.args      --disable-plplot \
                    --enable-openblas

post-destroot {
    set docdir ${destroot}${prefix}/share/doc/${subport}
    xinstall -d ${docdir}
    xinstall -m 0644 -W ${worksrcpath} \
        AUTHORS \
        COPYRIGHT \
        LICENSE \
        README.md \
        THANKS \
        ${docdir}
}
