# $Id: Portfile 44024 2008-12-19 18:28:18Z jmr@macports.org $

PortSystem      1.0
PortGroup python26 1.0

name            py26-pil
version         1.1.6
maintainers     jmr openmaintainer
description     Python Imaging Library
long_description    The Python Imaging Library (PIL) adds image \
                    processing capabilities to your Python interpreter. \
                    This library supports many file formats, and \
                    provides powerful image processing and graphics \
                    capabilities. 
categories-append   graphics
platforms       darwin freebsd
homepage        http://www.pythonware.com/products/pil/
master_sites    http://effbot.org/downloads/
distname        Imaging-${version}
checksums       md5 3a9b5c20ca52f0a9900512d2c7347622 \
                sha1 952d241e4af8ba09f74e6926108b7c0c748d0f89
patchfiles      patch-setup.py

depends_lib-append  port:jpeg \
                    port:freetype \
                    port:zlib

post-patch {
    reinplace s,__PREFIX__,${prefix},g ${worksrcpath}/setup.py
}

post-destroot {
    xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
    xinstall -m 0644 -W ${worksrcpath} BUILDME CHANGES CONTENTS README \
        ${destroot}${prefix}/share/doc/${name}
}

livecheck.check regex
livecheck.url   ${homepage}
livecheck.regex {Imaging-([0-9\.]+)\.tar\.gz}
