1 |
ssuominen 11/09/30 17:58:25 |
2 |
|
3 |
Added: iscan-2.26.2-libpng15.patch |
4 |
Log: |
5 |
Fix building with libpng15 wrt #383799 by Ian Stakenvicius (patch pending upstream review) |
6 |
|
7 |
(Portage version: 2.2.0_alpha59/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 media-gfx/iscan/files/iscan-2.26.2-libpng15.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/iscan/files/iscan-2.26.2-libpng15.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/iscan/files/iscan-2.26.2-libpng15.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: iscan-2.26.2-libpng15.patch |
16 |
=================================================================== |
17 |
http://bugs.gentoo.org/show_bug.cgi?id=383799#c13 |
18 |
Upstream: http://www.avasys.jp/cgi-bin/lx/bbs/en/scanner-bbs/hyperbbs.cgi?mode=view;Code=5197 |
19 |
|
20 |
--- lib/pngstream.cc |
21 |
+++ lib/pngstream.cc |
22 |
@@ -76,7 +76,12 @@ |
23 |
set_error_handler (_png, _info); |
24 |
|
25 |
lib->write_flush (_png); |
26 |
+/* when not interlacing (ie, only one pass), number of rows is image height: _v_sz */ |
27 |
+#if PNG_LIBPNG_VER > 10499 |
28 |
+ if (!_footer && _v_sz == lib->get_current_row_number(_png)) |
29 |
+#else |
30 |
if (!_footer && _png->num_rows == _png->flush_rows) |
31 |
+#endif |
32 |
{ |
33 |
lib->write_end (_png, _info); |
34 |
_footer = true; |
35 |
@@ -161,6 +166,9 @@ |
36 |
funcsym (write_row); |
37 |
funcsym (write_flush); |
38 |
funcsym (write_end); |
39 |
+#if PNG_LIBPNG_VER > 10499 |
40 |
+ funcsym (get_current_row_number); |
41 |
+#endif |
42 |
|
43 |
if (lib->access_version_number |
44 |
&& lib->create_write_struct |
45 |
@@ -170,6 +178,9 @@ |
46 |
&& lib->set_IHDR |
47 |
&& lib->set_pHYs |
48 |
&& lib->set_invert_mono |
49 |
+#if PNG_LIBPNG_VER > 10499 |
50 |
+ && lib->get_current_row_number |
51 |
+#endif |
52 |
&& lib->write_info |
53 |
&& lib->write_row |
54 |
&& lib->write_flush |
55 |
--- lib/pngstream.hh |
56 |
+++ lib/pngstream.hh |
57 |
@@ -108,6 +108,10 @@ |
58 |
png_structp); |
59 |
fundecl (void, write_end, |
60 |
png_structp, png_infop); |
61 |
+#if PNG_LIBPNG_VER > 10499 |
62 |
+ fundecl (png_uint_32, get_current_row_number, |
63 |
+ png_structp); |
64 |
+#endif |
65 |
#endif /* HAVE_PNG_H */ |
66 |
}; |
67 |
static png_lib_handle *lib; |