# $Id: Portfile 50984 2009-05-14 21:08:43Z and.damore@macports.org $ PortSystem 1.0 name optipng version 0.6.2 revision 1 categories graphics maintainers vincent-vinc17.org:opdarw 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 08b6195bb5895a7fe167fab16dcdf6d5 \ sha1 374b3537a262590ba2822f2b10d9241247b4da95 \ rmd160 cd9ecfbd1c8901d14cb93fbc9f07403071cea37e # Doesn't depend on libpng or zlib since it uses its own, modified versions patch.pre_args -p1 patchfiles optipng-0.6.2.1.diff # Make sure gmake 3.81+ is used, as scripts/gcc.mak needs POSIX # backslash-newline sequence compatibility. depends_build port:gmake # Avoid --prefix option (not supported by OptiPNG's configure script). configure.pre_args build.cmd ${prefix}/bin/gmake destroot { xinstall -m 755 -d ${destroot}${prefix}/bin \ ${destroot}${prefix}/share/doc/${name} \ ${destroot}${prefix}/share/man/man1 xinstall -m 755 -W ${worksrcpath}/src 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 } # The default SourceForge livecheck rule doesn't with OptiPNG. livecheck.check regex livecheck.url ${homepage} livecheck.regex "Latest version:.*OptiPNG (\\d+\\.\\d+\\.\\d+)"