# -*- 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 89304 2012-01-24 08:33:29Z ryandesign@macports.org $

PortSystem          1.0

name                gmic
version             1.5.0.8
license             CeCILL
categories          science
platforms           darwin
maintainers         cim.mcgill.ca:assemlal

description         G'MIC is an interpreter of image processing macros \
                    (stand-alone binary and GIMP plug-in).

long_description    G'MIC stands for GREYC's Magic Image Converter. It is \
                    focused on the design of possibly complex pipelines for \
                    converting, manipulating, filtering and visualizing \
                    generic 1d/2d/3d multi-spectral image datasets. This \
                    includes classical color images, but also more complex \
                    data as image sequences or 3D volumetric images. G'MIC \
                    has been designed with portability in mind and runs on \
                    different platforms (Windows, Unix, Mac OS X).

homepage            http://gmic.sourceforge.net/
master_sites        sourceforge:project/gmic/old

distfiles           ${name}_${version}${extract.suffix}

worksrcdir          ${worksrcdir}/src

checksums           rmd160  99532589dab47f0e1b493e8b07853eac8543ae70 \
                    sha256  ded93e9b45513359d51512d547237bedfbc3f26a2e042b62e8ac8b44d0e5f2aa

depends_build       port:pkgconfig

depends_lib         port:opencv \
                    path:lib/libavcodec.dylib:ffmpeg \
                    port:GraphicsMagick \
                    port:libpng \
                    port:jpeg \
                    port:tiff \
                    port:zlib \
                    port:openexr \
                    port:ilmbase \
                    port:fftw-3 \
                    port:xorg-libXext \
                    port:gimp2

patchfiles          patch-Makefile.diff

if {${configure.compiler} == "clang"} {
    configure.compiler llvm-gcc-4.2
}

use_configure       no

# opencv is not universal
universal_variant   no

# build uses far more memory per job than MacPorts expects
use_parallel_build  no

build.args          CC="${configure.cxx} [get_canonical_archflags]" \
                    IS_GCC=yes \
                    USR=${prefix}

destroot.args       USR=${prefix}

livecheck.regex     /${name}_(\[0-9.\]+)${extract.suffix}
