# -*- 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 108644 2013-07-29 09:27:34Z thibaut@macports.org $

PortSystem          1.0
PortGroup           github 1.0

github.setup        gyoto Gyoto 0.1.0
license             GPL-3+
categories          science yorick
platforms           darwin
maintainers         thibaut openmaintainer
description         General relativistic geodesic integration and ray-tracing
long_description    Gyoto aims at providing a framework for computing orbits \
                    and ray-traced images in General relativity. It consists \
                    in a C++ shared library (libgyoto), utility programs \
                    (gyoto, gyotoy), and a plug-in for the Yorick programming \
                    language. Gyoto can be extended with plug-ins.
homepage            http://gyoto.obspm.fr

checksums           rmd160  f80ab4181f1807e23859492b18401e362ca785fa \
                    sha256  6c1c7da1ac77975917063b1db3cf28f696b0f44573e6bc115a4ee0f6379b52f7

depends_lib         port:cfitsio \
                    port:xercesc3 \
                    port:udunits2 \
                    path:bin/yorick:yorick

depends_run         port:yorick-yutils \
                    port:yorick-gy

# yorick is not universal
universal_variant   no

configure.args      --with-yorick=${prefix}/bin/yorick --without-lorene --with-xerces --disable-doc --with-cfitsio \
                    --with-udunits-inc=${prefix}/include/udunits2/ --with-udunits-lib=-L${prefix}/lib/

# parallel builds fail
use_parallel_build  no

build.args-append    Y_CFLAGS="${configure.cxxflags}" Y_CPPFLAGS="${configure.cppflags}" CC="${configure.cc}" COPT_DEFAULT="" Y_LDFLAGS="${configure.ldflags}"

test.target          check
test.run             yes
