Convert/update pngcrush to working recipe

This commit is contained in:
Chris Roberts
2013-10-16 16:25:54 -06:00
parent c0629f9f3a
commit 18bdf17657
8 changed files with 77 additions and 112 deletions

View File

@@ -1,15 +0,0 @@
diff -up pngcrush-1.7.11-nolib/Makefile.orig pngcrush-1.7.11-nolib/Makefile
--- pngcrush-1.7.11-nolib/Makefile.orig 2010-02-25 21:21:23.004980736 -0700
+++ pngcrush-1.7.11-nolib/Makefile 2010-05-18 14:10:18.201588736 -0600
@@ -31,7 +31,11 @@ E =
PNGCRUSH = pngcrush
# LIBS = -lm
+ifeq ($(shell uname), Haiku)
+LIBS = -lpng -lz
+else
LIBS = -L$(PNGLIB) -lpng -lz -lm
+endif
# LIBS = -lpng -lz -lm
#LIBS = ${ZLIB}/libz.a -lm

View File

@@ -1,15 +0,0 @@
diff -up pngcrush-1.7.12-nolib/Makefile.orig pngcrush-1.7.12-nolib/Makefile
--- pngcrush-1.7.12-nolib/Makefile.orig 2010-02-25 21:21:23.004980736 -0700
+++ pngcrush-1.7.12-nolib/Makefile 2010-05-18 14:10:18.201588736 -0600
@@ -31,7 +31,11 @@ E =
PNGCRUSH = pngcrush
# LIBS = -lm
+ifeq ($(shell uname), Haiku)
+LIBS = -lpng -lz
+else
LIBS = -L$(PNGLIB) -lpng -lz -lm
+endif
# LIBS = -lpng -lz -lm
#LIBS = ${ZLIB}/libz.a -lm

View File

@@ -1,15 +0,0 @@
diff -ur pngcrush-1.7.6-nolib/Makefile pngcrush-1.7.6-nolib-haiku/Makefile
--- pngcrush-1.7.6-nolib/Makefile 2006-03-30 18:39:16.000000000 -0700
+++ pngcrush-1.7.6-nolib-haiku/Makefile 2009-12-29 01:02:29.000000000 -0700
@@ -36,7 +36,11 @@
PNGCRUSH = pngcrush
# LIBS = -lm
+ifeq ($(shell uname), Haiku)
+LIBS = -L/boot/system/lib -lpng -lz
+else
LIBS = -L$(PNGLIB) -lpng -lz -lm
+endif
# LIBS = -lpng -lz -lm
#LIBS = ${ZLIB}/libz.a -lm

View File

@@ -0,0 +1,21 @@
diff -up pngcrush-1.7.67-nolib/pngcrush.c.orig pngcrush-1.7.67-nolib/pngcrush.c
--- pngcrush-1.7.67-nolib/pngcrush.c.orig 2013-10-15 00:27:02.442236928 -0600
+++ pngcrush-1.7.67-nolib/pngcrush.c 2013-10-15 00:27:50.849084416 -0600
@@ -6146,6 +6146,8 @@ int main(int argc, char *argv[])
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,
@@ -6167,8 +6169,6 @@ int main(int argc, char *argv[])
* a png_uint_32, by limiting the width and height used
* to 15 bits.
*/
- png_uint_32 rowbytes;
- png_uint_32 h = height;
rowbytes = png_get_rowbytes(read_ptr, read_info_ptr);
#ifndef PNGCRUSH_H

View File

@@ -1,23 +0,0 @@
DESCRIPTION="Pngcrush is an optimizer for PNG (Portable Network Graphics) files."
HOMEPAGE="http://pmt.sourceforge.net/pngcrush/"
SRC_URI="http://sourceforge.net/projects/pmt/files/pngcrush/1.7.11/pngcrush-1.7.11-nolib.tar.bz2/download"
CHECKSUM_MD5="f9f5adfd36c5b0b84e0a5115e841e38a"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
BUILD()
{
cd pngcrush-1.7.11-nolib
make
}
INSTALL()
{
cd pngcrush-1.7.11-nolib
mkdir -p ${DESTDIR}`finddir B_COMMON_BIN_DIRECTORY`
cp -a -f pngcrush ${DESTDIR}`finddir B_COMMON_BIN_DIRECTORY`
}
LICENSE="LibPNG"
COPYRIGHT="1998-2009 Glenn Randers-Pehrson
2005 Greg Roelofs"

View File

@@ -1,23 +0,0 @@
DESCRIPTION="Pngcrush is an optimizer for PNG (Portable Network Graphics) files."
HOMEPAGE="http://pmt.sourceforge.net/pngcrush/"
SRC_URI="http://sourceforge.net/projects/pmt/files/pngcrush/00-1.7.12/pngcrush-1.7.12-nolib.tar.bz2/download"
CHECKSUM_MD5="10d43bf881a591ba1e5d87e6888de722"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
BUILD()
{
cd pngcrush-1.7.12-nolib
make
}
INSTALL()
{
cd pngcrush-1.7.12-nolib
mkdir -p ${DESTDIR}`finddir B_COMMON_BIN_DIRECTORY`
cp -a -f pngcrush ${DESTDIR}`finddir B_COMMON_BIN_DIRECTORY`
}
LICENSE="LibPNG"
COPYRIGHT="1998-2009 Glenn Randers-Pehrson
2005 Greg Roelofs"

View File

@@ -1,21 +0,0 @@
DESCRIPTION="Pngcrush is an optimizer for PNG (Portable Network Graphics) files."
HOMEPAGE="http://pmt.sourceforge.net/pngcrush/"
SRC_URI="http://sourceforge.net/projects/pmt/files/pngcrush/00-1.7.6/pngcrush-1.7.6-nolib.tar.bz2/download"
CHECKSUM_MD5="79fdedccf761f6391c11aa851c9fc6b2"
REVISION="1"
STATUS_HAIKU="stable"
DEPEND=""
BUILD()
{
cd pngcrush-1.7.6-nolib
make
}
INSTALL()
{
cd pngcrush-1.7.6-nolib
cp -a -f pngcrush `finddir B_COMMON_BIN_DIRECTORY`
}
LICENSE="LibPNG"
COPYRIGHT="1998-2009 Glenn Randers-Pehrson
2005 Greg Roelofs"

View File

@@ -0,0 +1,56 @@
SUMMARY="Pngcrush is an optimizer for PNG (Portable Network Graphics) 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/"
SRC_URI="http://sourceforge.net/projects/pmt/files/pngcrush/1.7.67/pngcrush-1.7.67-nolib.tar.xz"
CHECKSUM_MD5="682318b86be2e01056b8dba7b90dee01"
REVISION="1"
LICENSE="LibPNG"
COPYRIGHT="1998-2009 Glenn Randers-Pehrson
2005 Greg Roelofs"
ARCHITECTURES="x86 x86_gcc2"
SOURCE_DIR="${portVersionedName}-nolib"
PROVIDES="
pngcrush = $portVersion compat >= 1.7
cmd:pngcrush = $portVersion compat >= 1.7
"
REQUIRES="
haiku >= $haikuVersion
lib:libpng
lib:libz
"
BUILD_REQUIRES="
devel:libpng
devel:libz
"
BUILD_PREREQUIRES="
haiku_devel >= $haikuVersion
cmd:make
cmd:gcc
"
PATCHES="pngcrush-1.7.67.patch"
BUILD()
{
make LIBS="-L$libDir -lpng -lz"
}
INSTALL()
{
mkdir -p $binDir
cp -af pngcrush $binDir
}