diff options
author | wiz <wiz@pkgsrc.org> | 2006-04-19 17:02:22 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2006-04-19 17:02:22 +0000 |
commit | 891fcffe748b2a2f191ebf95fb6a966ee4c53193 (patch) | |
tree | 0d9697757aac14eee2518bdb86b3a59f134c2889 | |
parent | 766fd8c1875daf14a158e40516ee64b1dd60e038 (diff) | |
download | pkgsrc-891fcffe748b2a2f191ebf95fb6a966ee4c53193.tar.gz |
Fix build with png-1.2.9nb2. Bump PKGREVISION.
-rw-r--r-- | graphics/optipng/Makefile | 5 | ||||
-rw-r--r-- | graphics/optipng/distinfo | 5 | ||||
-rw-r--r-- | graphics/optipng/patches/patch-aa | 13 | ||||
-rw-r--r-- | graphics/optipng/patches/patch-ac | 66 |
4 files changed, 79 insertions, 10 deletions
diff --git a/graphics/optipng/Makefile b/graphics/optipng/Makefile index a898ef41ba3..2fb39656260 100644 --- a/graphics/optipng/Makefile +++ b/graphics/optipng/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.7 2006/04/17 13:46:33 wiz Exp $ +# $NetBSD: Makefile,v 1.8 2006/04/19 17:02:22 wiz Exp $ DISTNAME= optipng-0.5 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= graphics MASTER_SITES= http://www.cs.toronto.edu/~cosmin/pngtech/optipng/ @@ -10,6 +10,7 @@ HOMEPAGE= http://www.cs.toronto.edu/~cosmin/pngtech/optipng/ COMMENT= Advanced PNG Optimizer BUILDLINK_API_DEPENDS.zlib+= zlib>=1.2.2 +BUILDLINK_API_DEPENDS.png+= png>=1.2.9nb2 .include "../../devel/zlib/buildlink3.mk" .include "../../graphics/png/buildlink3.mk" diff --git a/graphics/optipng/distinfo b/graphics/optipng/distinfo index aab1d47cbce..c5c1dcb3e82 100644 --- a/graphics/optipng/distinfo +++ b/graphics/optipng/distinfo @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.2 2006/01/19 11:18:41 adam Exp $ +$NetBSD: distinfo,v 1.3 2006/04/19 17:02:22 wiz Exp $ SHA1 (optipng-0.5.tar.gz) = c724e52802ea7419874ba7b4d3dfa55abf964ed6 RMD160 (optipng-0.5.tar.gz) = 6bd7594856b31f42aef4811b4b6a52d18e7803c5 Size (optipng-0.5.tar.gz) = 746749 bytes -SHA1 (patch-aa) = 0ce5ea5ceeabe74fb37938b19657365a594917a9 +SHA1 (patch-aa) = 025087f864936fb727f7fc4d9e0032526a09cea7 SHA1 (patch-ab) = 5608933a0725a7c0ac0f68e3de77d57dc6f0569a +SHA1 (patch-ac) = fb4eb567b5a24b2d26bf357061be80c57b4d4a3c diff --git a/graphics/optipng/patches/patch-aa b/graphics/optipng/patches/patch-aa index 60debaf36b9..0405c3b978c 100644 --- a/graphics/optipng/patches/patch-aa +++ b/graphics/optipng/patches/patch-aa @@ -1,16 +1,17 @@ -$NetBSD: patch-aa,v 1.2 2006/01/19 11:18:41 adam Exp $ +$NetBSD: patch-aa,v 1.3 2006/04/19 17:02:22 wiz Exp $ ---- /dev/null 2006-01-19 12:14:22.000000000 +0100 +--- Makefile.orig 2006-04-19 14:47:12.000000000 +0200 +++ Makefile -@@ -0,0 +1,26 @@ +@@ -0,0 +1,27 @@ +OBJS= optipng.o opngio.o opngreduc.o cbitset.o osys.o \ + pngxread.o pngxrbmp.o pngxrgif.o pngxrpnm.o \ -+ gifread.o pnmerror.o pnmread.o pnmwrite.o ++ gifread.o pnmerror.o pnmread.o pnmwrite.o \ ++ png_write_sig.o + -+CPPFLAGS= -I${PREFIX}/include -Ilib/pngxtern -Isrc ++CPPFLAGS= `libpng-config --cflags` -Ilib/pngxtern -Isrc + +all: $(OBJS) -+ $(CC) -o optipng $(LDFLAGS) $(OBJS) -lm -lz -lpng ++ $(CC) -o optipng $(LDFLAGS) $(OBJS) `libpng-config --ldflags` + +optipng.o: src/optipng.c src/opng.h src/osys.h src/cbitset.h src/cexcept.h +opngio.o: src/opngio.c src/opng.h diff --git a/graphics/optipng/patches/patch-ac b/graphics/optipng/patches/patch-ac new file mode 100644 index 00000000000..bc5ed49735f --- /dev/null +++ b/graphics/optipng/patches/patch-ac @@ -0,0 +1,66 @@ +$NetBSD: patch-ac,v 1.1 2006/04/19 17:02:22 wiz Exp $ + +--- png_write_sig.c.orig 2006-04-19 15:45:16.000000000 +0200 ++++ png_write_sig.c +@@ -0,0 +1,61 @@ ++/* png_write_sig.c from libpng-1.2.9 */ ++ ++/* pngwutil.c - utilities to write a PNG file ++ * ++ * Last changed in libpng 1.2.9 April 14, 2006 ++ * For conditions of distribution and use, see copyright notice in png.h ++ * Copyright (c) 1998-2006 Glenn Randers-Pehrson ++ * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) ++ * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) ++ */ ++ ++#define PNG_INTERNAL ++#include "png.h" ++ ++/* Simple function to write the signature. If we have already written ++ * the magic bytes of the signature, or more likely, the PNG stream is ++ * being embedded into another stream and doesn't need its own signature, ++ * we should call png_set_sig_bytes() to tell libpng how many of the ++ * bytes have already been written. ++ */ ++void /* PRIVATE */ ++png_write_sig(png_structp png_ptr) ++{ ++ png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10}; ++ /* write the rest of the 8 byte signature */ ++ png_write_data(png_ptr, &png_signature[png_ptr->sig_bytes], ++ (png_size_t)8 - png_ptr->sig_bytes); ++ if(png_ptr->sig_bytes < 3) ++ png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE; ++} ++ ++/* pngwio.c - functions for data output ++ * ++ * Last changed in libpng 1.2.3 - May 21, 2002 ++ * For conditions of distribution and use, see copyright notice in png.h ++ * Copyright (c) 1998-2002 Glenn Randers-Pehrson ++ * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) ++ * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) ++ * ++ * This file provides a location for all output. Users who need ++ * special handling are expected to write functions that have the same ++ * arguments as these and perform similar functions, but that possibly ++ * use different output methods. Note that you shouldn't change these ++ * functions, but rather write replacement functions and then change ++ * them at run time with png_set_write_fn(...). ++ */ ++ ++/* Write the data to whatever output you are using. The default routine ++ writes to a file pointer. Note that this routine sometimes gets called ++ with very small lengths, so you should implement some kind of simple ++ buffering if you are using unbuffered writes. This should never be asked ++ to write more than 64K on a 16 bit machine. */ ++ ++void /* PRIVATE */ ++png_write_data(png_structp png_ptr, png_bytep data, png_size_t length) ++{ ++ if (png_ptr->write_data_fn != NULL ) ++ (*(png_ptr->write_data_fn))(png_ptr, data, length); ++ else ++ png_error(png_ptr, "Call to NULL write function"); ++} |