# $Id: Portfile,v 1.4 2006/05/09 01:37:53 vinc17 Exp $

PortSystem			1.0
name				optipng
version				0.5.2
categories			graphics
maintainers			blb@opendarwin.org 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 8cc507e596c95ee44621f7adc8ce0534 \
					sha1 e0b579f3843b747b2cb13bac136dc6b6257a2577 \
					rmd160 580487aead95fcc27681b3e62e39ebc5e9a84c13

# 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
}
