# -*- 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 91985 2012-04-14 15:40:25Z cal@macports.org $

PortSystem          1.0
PortGroup           github 1.0

set uname           cubeview
github.setup        paumard yorick-${uname} 1.6 cv_
categories          science
platforms           darwin
maintainers         users.sourceforge.net:paumard openmaintainer
supported_archs     noarch
license             GPL-2+
description         3D FITS data viewer specialized in spectro-imaging
long_description    Cubeview is a viewer for 3D data store in FITS files, a \
                    file format extensively used among astronomers. It is \
                    specialized in displaying spectro-imaging data but can be \
                    used to do basic visualization on any FITS file containing \
                    a 3D array. Cubeview features a stand-alone graphical user \
                    interface which adheres to the GTK+ look-and-feel. Being \
                    written (mostly) in Yorick, it is inherently scriptable. A \
                    system of hooks allows custom actions to be repeated \
                    automatically when certain events occur.
homepage            http://github.com/paumard/yorick-cubeview

checksums           rmd160  76517f5531d4a881a474793424bf751063c48753 \
                    sha256  6b222cb0482c8f869fdf1f0c49f7464f968aa790f0259464d6f568a341a37b67

depends_lib         path:bin/yorick:yorick

depends_run         port:yorick-yutils \
                    port:py27-gtk

post-patch {
    reinplace "s|#!/usr/bin/env python|#!${prefix}/bin/python2.7|" \
        ${worksrcpath}/${uname}.py
}

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

destroot.pre_args-append  BIN_DIR=${prefix}/bin MAN_DIR=${prefix}/share/man
