# $Id: Portfile 115019 2013-12-22 09:29:46Z ryandesign@macports.org $

PortSystem 1.0

name            enblend
version         4.1.2
revision        1
set branch      [join [lrange [split ${version} .] 0 1] .]
categories      graphics
maintainers     gmail.com:hvdwolf
license         GPL-2+

description     a tool to composite images
long_description    Enblend is a tool to composite overlapping images \
                with invisible (or very difficult to see) seams. Enfuse is a \
                tool for automatic exposure and contrast blending.
homepage        http://enblend.sourceforge.net/
master_sites    sourceforge:project/enblend/enblend-enfuse/enblend-enfuse-${branch}
platforms       darwin
distname        enblend-enfuse-${version}

checksums       rmd160  cd739a63cb937e447e673e9a19b43205a22d9448 \
                sha256  6dc2682d366776ff771fd6c9ae709bcfef0b7b00cac9e620b56d13bf81faaf6e

depends_build   port:pkgconfig port:help2man

depends_lib     port:boost \
                port:glew \
                port:gnuplot \
                port:gsl \
                port:jpeg \
                port:lcms2 \
                port:libpng \
                port:libxmi \
                port:mesa \
                port:openexr \
                port:freefont-ttf \
                port:vigra

patchfiles      patch-configure.diff

configure.args  --disable-split-doc \
                --enable-image-cache \
                --with-boost-filesystem \
                --with-gnuplot=${prefix}/bin/gnuplot \
                --with-openexr

# The build uses vast amounts of memory per job.
use_parallel_build  no

post-destroot {
    xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} AUTHORS ChangeLog COPYING \
        NEWS README \
        ${destroot}${prefix}/share/doc/${name}
}

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