From 1cbfde8fb1d560301c1ac41cbfefb48d3176a559 Mon Sep 17 00:00:00 2001 From: fbrosson Date: Tue, 2 Feb 2016 17:17:46 +0100 Subject: [PATCH] pngcrush: add recipe for version 1.8.0 --- .../pngcrush/patches/pngcrush-1.8.0.patchset | 20 ++++++++ media-gfx/pngcrush/pngcrush-1.8.0.recipe | 49 +++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 media-gfx/pngcrush/patches/pngcrush-1.8.0.patchset create mode 100644 media-gfx/pngcrush/pngcrush-1.8.0.recipe diff --git a/media-gfx/pngcrush/patches/pngcrush-1.8.0.patchset b/media-gfx/pngcrush/patches/pngcrush-1.8.0.patchset new file mode 100644 index 000000000..5f2c83196 --- /dev/null +++ b/media-gfx/pngcrush/patches/pngcrush-1.8.0.patchset @@ -0,0 +1,20 @@ +--- a/pngcrush.c 2016-01-16 23:05:11.000000000 +0000 ++++ b/pngcrush.c +@@ -6363,6 +6363,8 @@ defined(PNG_READ_STRIP_16_TO_8_SUPPORTED + png_uint_32 zbuf_size; + png_uint_32 required_window; + int channels = 0; ++ png_uint_32 rowbytes; ++ png_uint_32 h = height; + png_set_compression_strategy(write_ptr, + z_strategy); + png_set_compression_mem_level(write_ptr, +@@ -6384,8 +6386,6 @@ defined(PNG_READ_STRIP_16_TO_8_SUPPORTED + * a png_uint_32, by limiting the width and height used + * to 15 bits. + */ +- png_uint_32 rowbytes; +- png_uint_32 h = height; + + /* FIX THIS, does not work with libpng-1.7.0 + * because info_ptr->bit_depth has not been diff --git a/media-gfx/pngcrush/pngcrush-1.8.0.recipe b/media-gfx/pngcrush/pngcrush-1.8.0.recipe new file mode 100644 index 000000000..fa920c017 --- /dev/null +++ b/media-gfx/pngcrush/pngcrush-1.8.0.recipe @@ -0,0 +1,49 @@ +SUMMARY="An optimizer for PNG files" +DESCRIPTION="Pngcrush is an optimizer for PNG (Portable Network Graphics) \ +files. It can be run from a commandline in an MSDOS window, or from a UNIX or \ +LINUX commandline. Its main purpose is to reduce the size of the PNG IDAT \ +datastream by trying various compression levels and PNG filter methods. It \ +also can be used to remove unwanted ancillary chunks, or to add certain chunks \ +including gAMA, tRNS, iCCP, and textual chunks." +HOMEPAGE="http://pmt.sourceforge.net/pngcrush/" +COPYRIGHT="1998-2002, 2006-2016 Glenn Randers-Pehrson + 2005 Greg Roelofs" +LICENSE="LibPNG" +REVISION="1" +SOURCE_URI="http://downloads.sf.net/pmt/pngcrush-$portVersion-nolib.tar.xz" +CHECKSUM_SHA256="baa7048351c341e3a0c4769db7093b3206d46aa66ca93ac039c896ace63563bf" +SOURCE_DIR="pngcrush-${portVersion}-nolib" +PATCHES="pngcrush-$portVersion.patchset" + +ARCHITECTURES="x86 x86_gcc2 x86_64" + +PROVIDES=" + pngcrush = $portVersion compat >= 1.8 + cmd:pngcrush = $portVersion compat >= 1.8 + " +REQUIRES=" + haiku + lib:libpng16 + lib:libz + " + +BUILD_REQUIRES=" + devel:libpng16 + devel:libz + " +BUILD_PREREQUIRES=" + haiku_devel + cmd:make + cmd:gcc + " + +BUILD() +{ + make LIBS="-L$libDir -lpng -lz" +} + +INSTALL() +{ + mkdir -p $binDir + cp -af pngcrush $binDir +}