# $Id: Portfile 102943 2013-02-11 02:46:38Z jeremyhu@macports.org $

PortSystem          1.0

name                exact-image
version             0.8.7
categories          graphics
license             GPL-2
maintainers         tobias-elze.de:macports openmaintainer
description         a fast, modern and generic image processing library
long_description \
   ExactImage is ${description}.

platforms           darwin

homepage            http://www.exactcode.de/site/open_source/exactimage/
master_sites        http://dl.exactcode.de/oss/exact-image/

use_bzip2           yes

checksums           rmd160  8e3f11a94688cc276ca4c29021e4b9231da25629 \
                    sha256  b1b5d00e98903b7f87019920b200c600c8cbfe574ec158729566fa37f2641dfd

depends_build       port:pkgconfig
depends_lib         port:antigraingeometry \
                    port:libpng \
                    port:jasper \
                    port:evas \
                    port:expat \
                    port:openexr \
                    port:lcms

# Undefined symbols: "BarDecode::code25i_t::tol", referenced from: __ZN9BarDecode9code25i_t3tolE$non_lazy_ptr in bardecode.o
compiler.blacklist-append gcc-4.0

# TODO: This project has buggy C++ which clang rejects
# error: variable length array of non-POD element type
# http://trac.macports.org/ticket/34201
compiler.blacklist-append  clang macports-clang-2.9 macports-clang-3.0 macports-clang-3.1 macports-clang-3.2

patchfiles          codecs_png.cc.diff

configure.args      --with-freetype \
                    --with-libjpeg \
                    --with-libtiff \
                    --with-libpng \
                    --with-jasper \
                    --with-evas \
                    --with-expat \
                    --with-openexr \
                    --with-lcms \
                    --without-bardecode \
                    --without-libungif \
                    --without-lua \
                    --without-swig \
                    --without-perl \
                    --without-python \
                    --without-php \
                    --without-ruby

configure.universal_args-delete --disable-dependency-tracking

# gcc-4.2: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
universal_variant   no

build.args          CC="${configure.cc} [get_canonical_archflags cc]" \
                    CXX="${configure.cxx} [get_canonical_archflags cxx]" \
                    Q=

eval destroot.args  ${build.args}

livecheck.type      regex
livecheck.url       [lindex ${master_sites} 0]
livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}
