Portfile

# $Id: Portfile 21577 2007-01-29 15:57:53Z vinc17@macports.org $

PortSystem 1.0
name optipng
version 0.5.5
categories graphics
maintainers vincent-opdarw@vinc17.org
description PNG file optimizer
long_description \
OptiPNG is a PNG optimizer that recompresses the image files to a \
smaller size, without losing any information. The idea has been \
inspired from pngcrush (http://pmt.sourceforge.net/pngcrush), and \
is explained in detail in the PNG-Tech article 'A guide to PNG \
optimization'. The implementation is carried forward in OptiPNG, \
which offers a faster execution per trial, and a wider search space.

platforms darwin

homepage http://optipng.sourceforge.net/
master_sites sourceforge

checksums md5 9dbc2bb39e39b6ab4ed0c705d8035bdf \
sha1 670da3b01da903fa04886e4b6e625648570b3d9c \
rmd160 39e4b0587e4bcc7cb705e329dde35b1f9426b1d0

# Doesn't depend on libpng or zlib since it uses its own, modified versions

worksrcdir ${name}-${version}/src

use_configure no

build.cmd make -f scripts/gcc.mak
build.target ""

destroot {
xinstall -m 755 -d ${destroot}${prefix}/bin \
${destroot}${prefix}/share/doc/${name} \
${destroot}${prefix}/share/man/man1
xinstall -m 755 -W ${worksrcpath} optipng ${destroot}${prefix}/bin
eval xinstall -m 644 [glob ${worksrcpath}/../doc/*] \
${worksrcpath}/../README.txt ${destroot}${prefix}/share/doc/${name}
xinstall -m 644 ${worksrcpath}/../man/optipng.1 \
${destroot}${prefix}/share/man/man1
}