# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 106911 2013-06-11 14:40:14Z jmr@macports.org $

PortSystem              1.0
PortGroup               python 1.0

name                    py-astlib
version                 0.7.0
categories              python science
platforms               darwin
maintainers             aronnax
license                 LGPL-2.1
description             python modules for research astronomers
long_description \
    astLib is a set of python modules that provides some tools for research \
    astronomers. It can be used for simple plots, statistics, common \
    calculations, coordinate conversions, and manipulating FITS images with \
    World Coordinate System (WCS) information.

homepage                http://astlib.sourceforge.net
master_sites            sourceforge:astlib
distname                astLib-${version}
checksums               sha1    68e0a0a11ee6cb29fb5a23b8ce4f0550b9949010 \
                        rmd160  05a9be04594755537f97c7fdca855f3909e2c543

python.versions         26 27 32

if {${subport} != ${name}} {

    depends_lib-append  port:py${python.version}-setuptools \
                        port:py${python.version}-pyfits \
                        port:py${python.version}-numpy \
                        port:py${python.version}-scipy \
                        port:py${python.version}-matplotlib

    if {[expr ${python.branch} < 3]} { 
        depends_lib-append \
                        port:py${python.version}-pil
    } else {
        depends_lib-append \
                        port:py${python.version}-pillow
    }

}

if {${name} == ${subport}} {
    # Some version numbers were assigned out of order
    livecheck.regex     {/astlib/0.15/|/astlib/0.17/|/astlib/0.17.1/|/astlib/([a-zA-Z0-9.]+\.[a-zA-Z0-9.]+)/}
} else {
    livecheck.type      none
}
