# -*- 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 102673 2013-02-06 18:25:10Z devans@macports.org $

PortSystem      1.0
PortGroup       muniversal 1.0

name            babl
version         0.1.10
license         LGPL-3+
set branch      [join [lrange [split ${version} .] 0 1] .]
categories      graphics
maintainers     devans
platforms       darwin
homepage        http://gegl.org/babl
master_sites    gimp:${name}/${branch}/

use_bzip2       yes

description \
    Babl is a library for dynamically handling pixel formats and managing \
    conversions between them.

long_description \
    ${description}

checksums       sha1    ee60089e8e9d9390e730d3ae5e41074549928b7a \
                rmd160  a18b57be692cf5fec8b6649609d5d8ddb9a97f87

depends_build   port:w3m \
                port:librsvg

patchfiles      clang.patch \
                babl-palette-values-h.patch

configure.args  --disable-silent-rules \
                --disable-introspection

platform darwin {
    foreach arch ${configure.universal_archs} {
        set merger_configure_args(${arch}) --build=${arch}-apple-${os.platform}${os.version}
    }
    if {![variant_isset universal]} {
        configure.args-append --build=${build_arch}-apple-${os.platform}${os.version}
    }
}

livecheck.type  regex
livecheck.url   ftp://ftp.gimp.org/pub/${name}/${branch}/
livecheck.regex "${name}-(\\d+(?:\\.\\d+)+)"
