# -*- 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$
PortSystem      1.0

name            esorex
conflicts       esorex-devel
version         3.13.10
revision        4
categories      science
license         GPL-2+
platforms       darwin
maintainers     eso.org:usd-help
description     Execution Tool for European Southern Observatory pipelines
long_description EsoRex is the European Southern Observatory (ESO) Recipe \
                 Execution Tool. It can list, configure and execute CPL-based \
                 recipes from the command line. \
                 One of the features provided by the Common Pipeline Library \
                 (CPL) is the ability to create data-reduction algorithms that \
                 run as plugins (dynamic libraries). \
                 These are called "recipes" and are one of the main aspects of \
                 the CPL data-reduction development environment.
homepage        http://www.eso.org/sci/software/cpl/esorex.html
master_sites    https://ftp.eso.org/pub/dfs/pipelines/libraries/${name}
checksums       sha256 a989f9c6dbd6bbb6a9c7c678da8a3b7ad7a8c7e29c644b97c371579b45957dd6

depends_lib     port:cext port:cpl port:libffi

configure.args  --with-cext=${prefix} \
                --with-cpl=${prefix} \
                --with-libffi-includes=`echo ${prefix}/lib/libffi-*/include` \
                --with-libffi=${prefix}

use_parallel_build  no

post-build {
    system "echo 'This directory should contain standard system wide ESO recipe plugins that will be used by esorex.' > ${workpath}/esopipes_dir_README"
}

post-destroot {
    xinstall -m 755 -d ${destroot}${prefix}/lib/esopipes-plugins
    xinstall -m 755 ${workpath}/esopipes_dir_README ${destroot}${prefix}/lib/esopipes-plugins/README
}

test.run        yes
test.target     installcheck
