# -*- 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 92253 2012-04-23 00:51:24Z ryandesign@macports.org $

PortSystem              1.0
PortGroup               muniversal 1.0

name                    libpixman
conflicts               libpixman-devel
set my_name             pixman
version                 0.24.4
categories              graphics
platforms               darwin
maintainers             ryandesign
license                 X11
homepage                http://www.x.org/
master_sites            http://xorg.freedesktop.org/archive/individual/lib/ \
                        ${homepage}pub/individual/lib/
distname                ${my_name}-${version}
use_bzip2               yes
use_parallel_build      yes

description             Pixel region Library

long_description        libpixman is a generic library for manipulating pixel \
                        regions. A PixRegion is a set of Y-X banded rectangles \
                        that cover the desired region.

checksums               rmd160  1df92f83b0b944e8a493a8cdf6318ebc6e778914 \
                        sha256  5f4b384aa39e82a582bdc8835e2e81b28176db851dd1f7ff32d682d026a23bb5

# remove when updating libpixman to 0.26.x
patchfiles-append       patch-configure.diff

# llvm-gcc-4.2 makes cairo fail to generate PDFs properly
# clang on Xcode 4.1 cannot build libpixman
if {${configure.compiler} == "llvm-gcc-4.2"} {
    configure.compiler  gcc-4.2
}

configure.args          ac_cv_prog_AWK=/usr/bin/awk \
                        ac_cv_path_GREP=/usr/bin/grep \
                        lt_cv_path_SED=/usr/bin/sed \
                        --disable-gtk \
                        --disable-libpng

build.args              V=1

post-destroot {
    set docdir ${destroot}${prefix}/share/doc/${name}
    xinstall -d ${docdir}
    eval xinstall -m 644 -W ${worksrcpath} \
        AUTHORS \
        COPYING \
        [glob ${worksrcpath}/ChangeLog*] \
        NEWS \
        README \
        TODO \
        ${docdir}
}

livecheck.type          regex
livecheck.url           [lindex ${master_sites} 0]?C=M&O=D
livecheck.regex         ${my_name}-(\[0-9\]+\\.\[0-9\]*\[02468\](\\.\[0-9\]+)*)\\.tar
