# -*- 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 91956 2012-04-14 02:17:12Z snc@macports.org $

PortSystem          1.0

name                pngcrush
version             1.7.27
categories          graphics
maintainers         snc openmaintainer
license             zlib
installs_libs       no

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:project/pmt/pngcrush/${version}
use_bzip2           yes

checksums           rmd160  73194968b909bed7f2d071ddd555488796fc67c6 \
                    sha256  ed12107ab8f1489e7b15fea00ddfaf4dcf2474e15d60a8918c22e34647fda044

use_configure       no

variant universal {}

build.args-append   CC="${configure.cc} [get_canonical_archflags cc]" \
                    LD="${configure.cc} [get_canonical_archflags ld]"

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+)+)\\.
