# $Id: Portfile 55558 2009-08-13 11:16:25Z ryandesign@macports.org $

PortSystem              1.0
PortGroup               muniversal 1.0

name                    libpixman-devel
set my_name             pixman
version                 0.15.20
categories              graphics
platforms               darwin
maintainers             ryandesign
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 \
    md5     8cca7bdf45bd3c31cf95ecea0f05bddc \
    sha1    67a34a1fdc5431c9de5febd390057bdd9bb51df4 \
    rmd160  95047e078ce8dfe47ff9e2ea50d587fcebbb2751

depends_build           port:autoconf

pre-extract {
    if {"darwin" == ${os.platform} && 7 == ${os.major}} {
        set minimum_xcodeversion 1.5
        set current_xcodeversion [exec defaults read /Developer/Applications/Xcode.app/Contents/Info CFBundleShortVersionString]
        if {[rpm-vercomp ${current_xcodeversion} ${minimum_xcodeversion}] < 0} {
            ui_error "On Mac OS X ${macosx_version}, ${name} ${version} requires Xcode ${minimum_xcodeversion} but you have Xcode ${current_xcodeversion}."
            return -code error "incompatible Xcode version"
        }
    }
}

patchfiles              5db6db74f9539885314762d6f263c826fe7931e0.diff
patch.post_args         -p1

use_autoconf            yes

configure.args \
    --disable-gtk

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

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