# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 67582 2010-05-13 12:04:01Z snc@macports.org $

PortSystem          1.0

name                pngcrush
version             1.7.11
categories          graphics
maintainers         snc openmaintainer
description         optimizer for PNG files
long_description \
   pngcrush reads in a PNG image, and writes it out again, with the optimum \
   filter_type and zlib_level.  It uses brute force (trying filter_type \
   none, and libpng adaptive filtering, with compression levels 3 and 9).  \
   It does the most time-consuming method last in case it turns out to be \
   the best. Optionally, it can remove unwanted chunks or add gAMA and sRGB \
   chunks.

platforms           darwin freebsd

homepage            http://pmt.sourceforge.net/pngcrush/
master_sites        sourceforge:pmt
use_bzip2           yes

checksums           md5     8f033c547a428132fe273e1771b7624e \
                    sha1    ce65a62e39fdfef38fa71e09e0da18abe0f030e5 \
                    rmd160  c0dc68afdf5a844a0c5b6f9d7cb8aaf5a17cedf6

use_configure       no

build.args-append   CC="${configure.cc}" LD="${configure.cc}"

destroot {
   xinstall -m 755 -d ${destroot}${prefix}/bin
   xinstall -m 755 ${worksrcpath}/${name} ${destroot}${prefix}/bin
}

livecheck.url       http://sourceforge.net/api/file/index/project-id/1689/rss?path=%2F${name}
livecheck.regex     ${name}-(\\d+(\\.\\d+)+)\\.
