# -*- 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 91516 2012-04-04 00:07:40Z ryandesign@macports.org $

PortSystem              1.0
PortGroup               archcheck 1.0

name                    libpng
version                 1.4.11
set branch              [join [lrange [split ${version} .] 0 1] ""]
categories              graphics
maintainers             ryandesign waqar
license                 zlib
platforms               darwin openbsd freebsd sunos linux
homepage                http://www.libpng.org/pub/png/libpng.html
master_sites            sourceforge:project/${name}/${name}${branch}/${version}
use_bzip2               yes

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               rmd160  62216fcfac8f840d26e8084a70fbba2cd5c33a56 \
                        sha256  35c94642e0d1697a70d065a9ae274ece1d052f7cfb1d4da51af7e185aceb5754

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}
    xinstall -d ${destroot}${docdir}/examples
    xinstall -m 0644 -W ${worksrcpath} \
        ANNOUNCE \
        CHANGES \
        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>}
