pngcrush: add recipe for version 1.8.0

This commit is contained in:
fbrosson
2016-02-02 17:17:46 +01:00
parent 48f5a7c189
commit 1cbfde8fb1
2 changed files with 69 additions and 0 deletions

View File

@@ -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

View File

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