void-packages/srcpkgs/iscan/patches/libpng15.patch
Dominik Honnef 33145a024b New package: iscan-2.30.1 and related
This commit adds support for Epson scanners. It packages the iscan
application, the epkowa SANE backend, iscan-data, as well as the
scanner-specific plugin for the GT S650 (and by extension V19 and V39).
More scanner plugins may be added later when people request them.

iscan is unfree because it ships with a binary blob. sane-epkowa is
free, however, same as iscan-data. Scanner plugins are unfree again.

All unfree components are covered by the AVASYS license. Not only does
it allow distribution, it's also almost a free license. However, it
forbids reverse engineering the binary blobs.

The binary blobs make this x86/amd64-only packages. The epkowa backend
itself could technically be compiled for other architectures, but it's
not evident that it's worth the time. Most modern scanners need a
proprietary plugin.
2015-07-13 20:37:20 +02:00

48 lines
1.4 KiB
Diff

--- lib/pngstream.cc 2011-12-01 02:30:53.000000000 +0100
+++ lib/pngstream.cc 2012-02-06 03:06:22.000000000 +0100
@@ -83,7 +83,12 @@
#if HAVE_PNG_H
set_error_handler (_png, _info);
+/* when not interlacing (ie, only one pass), number of rows is image height: _v_sz */
+#if PNG_LIBPNG_VER > 10499
+ if (!_footer && _v_sz == lib->get_current_row_number(_png))
+#else
if (_header && !_footer && _png->num_rows == _png->flush_rows)
+#endif
{
lib->write_end (_png, _info);
_footer = true;
@@ -167,6 +172,9 @@
funcsym (write_row);
funcsym (write_flush);
funcsym (write_end);
+#if PNG_LIBPNG_VER > 10499
+ funcsym (get_current_row_number);
+#endif
if (lib->access_version_number
&& lib->create_write_struct
@@ -176,6 +184,9 @@
&& lib->set_IHDR
&& lib->set_pHYs
&& lib->set_invert_mono
+#if PNG_LIBPNG_VER > 10499
+ && lib->get_current_row_number
+#endif
&& lib->write_info
&& lib->write_row
&& lib->write_flush
--- lib/pngstream.hh 2011-12-01 02:30:53.000000000 +0100
+++ lib/pngstream.hh 2012-02-06 03:09:09.000000000 +0100
@@ -108,6 +108,10 @@
png_structp);
fundecl (void, write_end,
png_structp, png_infop);
+#if PNG_LIBPNG_VER > 10499
+ fundecl (png_uint_32, get_current_row_number,
+ png_structp);
+#endif
#endif /* HAVE_PNG_H */
};
static png_lib_handle *lib;