# -*- 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 67910 2010-05-21 12:03:36Z ryandesign@macports.org $

PortSystem          1.0

set uname           spydr
name                yorick-${uname}
version             0.8.1
categories          science
platforms           darwin
maintainers         users.sourceforge.net:paumard
description         FITS image display and simple analysis
long_description    Spydr (pronounced like spider) basically is an FITS \
                    image viewer. It can work as a stand-alone \
                    application but is best integrated in a \
                    Yorick-based data-analysis work-flow (Yorick is an \
                    interpreted language specialized in numerical \
                    computations and scientific graphics). It includes \
                    tools to zoom, produce cuts, histograms, \
                    Gaussian/Moffat fits, PSF fits (inc. FWHM and \
                    Strehl). Can work on single images, sequences of \
                    images or data cubes.
homepage            http://maumae.net/yorick/doc/plugins.php
master_sites        http://maumae.net/yorick/packages/src/
distname            ${uname}-${version}-src
extract.suffix      .tgz
worksrcdir          ${name}-${version}

checksums           md5     2f0d44617592cd1f22f29f4159e64fbb \
                    sha1    f6c753476034cb1d80ff758b2469ac4fd5f77440 \
                    rmd160  8e13693fdbd745729e4e1ad5392c0c23d058ea99

depends_lib         port:yorick

depends_run         port:yorick-yao \
                    port:py26-gtk \
                    port:zenity

if {[info exists supported_archs]} {
    supported_archs noarch
} else {
    universal_variant no
}

configure.cmd       ${prefix}/bin/yorick
configure.pre_args
configure.args      -batch make.i

build               {}

post-destroot {
    xinstall -d ${destroot}${prefix}/lib/yorick/packages/installed/
    xinstall -m 644 ${worksrcpath}/${uname}.info \
        ${destroot}${prefix}/lib/yorick/packages/installed/
    xinstall -m 644 ${worksrcpath}/${uname}.1 \
        ${destroot}${prefix}/share/man/man1/
    ln -s ${prefix}/lib/yorick/bin/${uname} ${destroot}${prefix}/bin/
}
