# -*- 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 79416 2011-06-13 06:55:16Z ryandesign@macports.org $

PortSystem              1.0
PortGroup               archcheck 1.0
PortGroup               php5extension 1.0

php5extension.setup     freeimage 0.1 pecl
revision                1
name                    php5-FreeImage
license                 PHP
categories              php devel
platforms               darwin
maintainers             nomaintainer
homepage                http://pecl.php.net/package/FreeImage

description             Provides a wrapper to the FreeImage library.

long_description        This extension is a wrapper for the FreeImage library \
                        that allows PHP to support popular graphics image \
                        formats like GIF, PNG, BMP, JPEG, TIFF, PSD, XPM and \
                        others as needed by today's multimedia applications.

checksums               md5     91d3776de0beba4cdd7a76952f9b3265 \
                        sha1    a81bddb31962f4054cddf1fc4b35d9c2ae7476d7 \
                        rmd160  7a19f53176fc303c7ef04f06671b9eeeadbcec5a

distname                FreeImage-${version}

patchfiles              patch-freeimage.c.diff

depends_lib-append      port:freeimage

archcheck.files         lib/libfreeimage.dylib

configure.args-append   --with-freeimage=${prefix}

post-destroot {
    set docdir ${prefix}/share/doc/${name}
    xinstall -d ${destroot}${docdir}
    xinstall -m 644 -W ${worksrcpath} CREDITS README ${destroot}${docdir}
    copy ${worksrcpath}/examples ${destroot}${docdir}
}

livecheck.regex         {(\d+(?:\.\d+)*)</a></th>}
