# $Id: Portfile 65248 2010-03-24 17:28:27Z ryandesign@macports.org $

PortSystem              1.0
PortGroup               muniversal 1.0
PortGroup               archcheck 1.0

name                    libpng
version                 1.2.43
categories              graphics
maintainers             ryandesign waqar
license                 libpng
platforms               darwin openbsd freebsd sunos linux
homepage                http://www.libpng.org/pub/png/libpng.html
use_bzip2               yes
use_parallel_build      yes
master_sites            sourceforge

description             Library for manipulating PNG images

long_description        Libpng was written as a companion to the PNG \
                        specification, as a way to reduce the amount of time \
                        and effort it takes to support the PNG file format in \
                        application programs. Most users will not have to \
                        modify the library significantly, advanced users may \
                        want to modify it more. The library was coded for \
                        both users. All attempts were made to make it as \
                        complete as possible, while keeping the code easy to \
                        understand. Currently, this library only supports C. \
                        Support for other languages is being considered.

checksums               md5     976909556e6613804d810405c1f72ce6 \
                        sha1    28ea29305d233669ce565894a95151e4427d1f34 \
                        rmd160  6c108f06ae32a86ddd8571e9031f143932f19531

depends_lib             port:zlib

archcheck.files         lib/libz.dylib

use_parallel_build      yes

test.run                yes
test.target             check

post-destroot {
    set docdir ${prefix}/share/doc/${name}-${version}
    xinstall -d ${destroot}${docdir}/examples
    xinstall -m 0644 -W ${worksrcpath} \
        ANNOUNCE \
        CHANGES \
        KNOWNBUG \
        LICENSE \
        README \
        TODO \
        ${destroot}${docdir}
    xinstall -m 0644 ${worksrcpath}/example.c ${destroot}${docdir}/examples
}

livecheck.type          regexm
livecheck.regex         {Current.+?version.+?<B>([0-9.]+)</B>}
