Gentoo Archives: gentoo-commits

From: "Sebastian Pipping (sping)" <sping@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-gfx/optipng/files: optipng-0.6.5-libpng-1.4.8.patch
Date: Tue, 02 Aug 2011 15:11:02
Message-Id: 20110802151047.8D78020051@flycatcher.gentoo.org
1 sping 11/08/02 15:10:47
2
3 Added: optipng-0.6.5-libpng-1.4.8.patch
4 Log:
5 media-gfx/optipng: Bump to 0.6.5
6
7 (Portage version: 2.1.10.9/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.1 media-gfx/optipng/files/optipng-0.6.5-libpng-1.4.8.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/optipng/files/optipng-0.6.5-libpng-1.4.8.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/optipng/files/optipng-0.6.5-libpng-1.4.8.patch?rev=1.1&content-type=text/plain
14
15 Index: optipng-0.6.5-libpng-1.4.8.patch
16 ===================================================================
17 From d84fd1880aae22a2a92ca759a3f9e07f2f7b6bee Mon Sep 17 00:00:00 2001
18 From: Sebastian Pipping <sebastian@×××××××.org>
19 Date: Tue, 2 Aug 2011 17:01:51 +0200
20 Subject: [PATCH] Fix compilation against libpng 1.4.8
21
22 ---
23 src/opngoptim.c | 2 +-
24 src/opngreduc.c | 16 ++++++++--------
25 2 files changed, 9 insertions(+), 9 deletions(-)
26
27 diff --git a/src/opngoptim.c b/src/opngoptim.c
28 index 16f7acd..ead0c6e 100644
29 --- a/src/opngoptim.c
30 +++ b/src/opngoptim.c
31 @@ -19,10 +19,10 @@
32 #include "proginfo.h"
33
34 #include "cbitset.h"
35 -#include "cexcept.h"
36 #include "opngreduc.h"
37 #include "osys.h"
38 #include "png.h"
39 +#include "cexcept.h"
40 #include "pngx.h"
41 #include "pngxtern.h"
42 #include "zlib.h"
43 diff --git a/src/opngreduc.c b/src/opngreduc.c
44 index e4d5c98..5ef0b60 100644
45 --- a/src/opngreduc.c
46 +++ b/src/opngreduc.c
47 @@ -366,8 +366,8 @@ opng_get_alpha_row(png_structp png_ptr, png_infop info_ptr,
48 channels = (png_ptr->usr_channels > 0) ?
49 png_ptr->usr_channels : info_ptr->channels;
50 sample_ptr = row;
51 - if (!(png_ptr->transformations & PNG_FILLER) ||
52 - (png_ptr->flags & PNG_FLAG_FILLER_AFTER))
53 + if (!(png_ptr->transformations & OPNG_FILLER) ||
54 + (png_ptr->flags & OPNG_FLAG_FILLER_AFTER))
55 sample_ptr += channels - 1; /* alpha sample is the last in RGBA tuple */
56 for (i = 0; i < width; ++i, sample_ptr += channels, ++alpha_row)
57 *alpha_row = *sample_ptr;
58 @@ -416,8 +416,8 @@ opng_analyze_bits(png_structp png_ptr, png_infop info_ptr,
59 reductions &= ~OPNG_REDUCE_STRIP_ALPHA;
60
61 offset_color = offset_alpha = 0;
62 - if ((png_ptr->transformations & PNG_FILLER) &&
63 - !(png_ptr->flags & PNG_FLAG_FILLER_AFTER))
64 + if ((png_ptr->transformations & OPNG_FILLER) &&
65 + !(png_ptr->flags & OPNG_FLAG_FILLER_AFTER))
66 offset_color = byte_depth;
67 else
68 offset_alpha = (channels - 1) * byte_depth;
69 @@ -565,7 +565,7 @@ opng_reduce_bits(png_structp png_ptr, png_infop info_ptr,
70 /* See which reductions may be performed. */
71 reductions = opng_analyze_bits(png_ptr, info_ptr, reductions);
72 /* Strip the filler even if it is not an alpha channel. */
73 - if (png_ptr->transformations & PNG_FILLER)
74 + if (png_ptr->transformations & OPNG_FILLER)
75 reductions |= OPNG_REDUCE_STRIP_ALPHA;
76 if (reductions == OPNG_REDUCE_NONE)
77 return OPNG_REDUCE_NONE; /* nothing can be reduced */
78 @@ -606,8 +606,8 @@ opng_reduce_bits(png_structp png_ptr, png_infop info_ptr,
79 dest_sample_size = dest_channels * dest_byte_depth;
80 dest_pixel_depth = dest_channels * dest_bit_depth;
81
82 - if (!(png_ptr->transformations & PNG_FILLER) ||
83 - (png_ptr->flags & PNG_FLAG_FILLER_AFTER))
84 + if (!(png_ptr->transformations & OPNG_FILLER) ||
85 + (png_ptr->flags & OPNG_FLAG_FILLER_AFTER))
86 src_offset_alpha = (src_channels - 1) * src_byte_depth;
87 else
88 src_offset_alpha = 0;
89 @@ -748,7 +748,7 @@ opng_reduce_bits(png_structp png_ptr, png_infop info_ptr,
90 png_ptr->pixel_depth = info_ptr->pixel_depth = (png_byte)dest_pixel_depth;
91 if (reductions & OPNG_REDUCE_STRIP_ALPHA)
92 {
93 - png_ptr->transformations &= ~PNG_FILLER;
94 + png_ptr->transformations &= ~OPNG_FILLER;
95 if (png_ptr->usr_channels > 0)
96 --png_ptr->usr_channels;
97 }
98 --
99 1.7.6