1 |
flameeyes 12/07/01 12:49:08 |
2 |
|
3 |
Added: iscan-2.28.1.3+libpng-1.5.patch |
4 |
Log: |
5 |
Add patch to fix building with libpng 1.5. Thanks to Stefano for the patch, closes bug #419729. |
6 |
|
7 |
(Portage version: 2.2.0_alpha114/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 media-gfx/iscan/files/iscan-2.28.1.3+libpng-1.5.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/iscan/files/iscan-2.28.1.3+libpng-1.5.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/iscan/files/iscan-2.28.1.3+libpng-1.5.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: iscan-2.28.1.3+libpng-1.5.patch |
16 |
=================================================================== |
17 |
--- lib/pngstream.cc 2011-12-01 02:30:53.000000000 +0100 |
18 |
+++ lib/pngstream.cc 2012-02-06 03:06:22.000000000 +0100 |
19 |
@@ -83,7 +83,12 @@ |
20 |
#if HAVE_PNG_H |
21 |
set_error_handler (_png, _info); |
22 |
|
23 |
+/* when not interlacing (ie, only one pass), number of rows is image height: _v_sz */ |
24 |
+#if PNG_LIBPNG_VER > 10499 |
25 |
+ if (!_footer && _v_sz == lib->get_current_row_number(_png)) |
26 |
+#else |
27 |
if (_header && !_footer && _png->num_rows == _png->flush_rows) |
28 |
+#endif |
29 |
{ |
30 |
lib->write_end (_png, _info); |
31 |
_footer = true; |
32 |
@@ -167,6 +172,9 @@ |
33 |
funcsym (write_row); |
34 |
funcsym (write_flush); |
35 |
funcsym (write_end); |
36 |
+#if PNG_LIBPNG_VER > 10499 |
37 |
+ funcsym (get_current_row_number); |
38 |
+#endif |
39 |
|
40 |
if (lib->access_version_number |
41 |
&& lib->create_write_struct |
42 |
@@ -176,6 +184,9 @@ |
43 |
&& lib->set_IHDR |
44 |
&& lib->set_pHYs |
45 |
&& lib->set_invert_mono |
46 |
+#if PNG_LIBPNG_VER > 10499 |
47 |
+ && lib->get_current_row_number |
48 |
+#endif |
49 |
&& lib->write_info |
50 |
&& lib->write_row |
51 |
&& lib->write_flush |
52 |
--- lib/pngstream.hh 2011-12-01 02:30:53.000000000 +0100 |
53 |
+++ lib/pngstream.hh 2012-02-06 03:09:09.000000000 +0100 |
54 |
@@ -108,6 +108,10 @@ |
55 |
png_structp); |
56 |
fundecl (void, write_end, |
57 |
png_structp, png_infop); |
58 |
+#if PNG_LIBPNG_VER > 10499 |
59 |
+ fundecl (png_uint_32, get_current_row_number, |
60 |
+ png_structp); |
61 |
+#endif |
62 |
#endif /* HAVE_PNG_H */ |
63 |
}; |
64 |
static png_lib_handle *lib; |