pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/optipng Fix build with png-1.2.9nb2. Bump PKG...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f8b268df2562
branches:  trunk
changeset: 511695:f8b268df2562
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Wed Apr 19 17:02:22 2006 +0000

description:
Fix build with png-1.2.9nb2. Bump PKGREVISION.

diffstat:

 graphics/optipng/Makefile         |   5 +-
 graphics/optipng/distinfo         |   5 +-
 graphics/optipng/patches/patch-aa |  13 ++++---
 graphics/optipng/patches/patch-ac |  66 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 79 insertions(+), 10 deletions(-)

diffs (132 lines):

diff -r 3da244ba8558 -r f8b268df2562 graphics/optipng/Makefile
--- a/graphics/optipng/Makefile Wed Apr 19 17:01:34 2006 +0000
+++ b/graphics/optipng/Makefile Wed Apr 19 17:02:22 2006 +0000
@@ -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 @@
 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 -r 3da244ba8558 -r f8b268df2562 graphics/optipng/distinfo
--- a/graphics/optipng/distinfo Wed Apr 19 17:01:34 2006 +0000
+++ b/graphics/optipng/distinfo Wed Apr 19 17:02:22 2006 +0000
@@ -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 -r 3da244ba8558 -r f8b268df2562 graphics/optipng/patches/patch-aa
--- a/graphics/optipng/patches/patch-aa Wed Apr 19 17:01:34 2006 +0000
+++ b/graphics/optipng/patches/patch-aa Wed Apr 19 17:02:22 2006 +0000
@@ -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 -r 3da244ba8558 -r f8b268df2562 graphics/optipng/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/optipng/patches/patch-ac Wed Apr 19 17:02:22 2006 +0000
@@ -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");
++}



Home | Main Index | Thread Index | Old Index