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.
This commit is contained in:
Dominik Honnef 2015-07-11 03:36:41 +02:00
parent 872c46ad9b
commit 33145a024b
10 changed files with 159 additions and 0 deletions

View file

@ -0,0 +1,5 @@
case "${ACTION}" in
post)
/usr/lib/iscan-data/make-policy-file -m udev --template /usr/lib/udev/rules.d/*-sane.rules -o /usr/lib/udev/rules.d/99-epkowa.rules
;;
esac

View file

@ -0,0 +1,5 @@
case "${ACTION}" in
post)
rm /usr/lib/udev/rules.d/99-epkowa.rules
;;
esac

View file

@ -0,0 +1,14 @@
# Template file for 'iscan-data'
pkgname=iscan-data
version=1.36.0
revision=1
build_style=gnu-configure
maintainer="Dominik Honnef <dominik@honnef.co>"
hostmakedepends="libxslt"
depends="sane-udev-rules"
license="GPL-2"
homepage="http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX"
short_desc="EPSON Image Scan! data files"
distfiles="https://download3.ebz.epson.net/dsc/f/03/00/03/61/59/646738a219f7354bf3268897385f6ce48c0776bf/${pkgname}_${version}-1.tar.gz"
checksum=3a0a0075d0f7fcb0f482cbde2e74c9f6bee64268db32a4e6f470f1a6069117ba
noarch=yes

View file

@ -0,0 +1,6 @@
if [ "$UPDATE" = "no" -a "$ACTION" = "post" ]; then
for id in 0x013c 0x013d; do
iscan-registry --add interpreter usb 0x04b8 $id \
/usr/lib/iscan/libiscan-plugin-gt-s650 /usr/share/iscan/esfw010c.bin
done
fi

View file

@ -0,0 +1,9 @@
if [ "$UPDATE" = "no" -a "$ACTION" = "pre" ]; then
# If we're removing sane-epkowa together with this package,
# there's no point (and no success) in calling iscan-registry
command -v iscan-registry >/dev/null 2>&1 || exit 0
for id in 0x013c 0x013d; do
iscan-registry --remove interpreter usb 0x04b8 $id \
/usr/lib/iscan/libiscan-plugin-gt-s650 /usr/share/iscan/esfw010c.bin
done
fi

View file

@ -0,0 +1,27 @@
# Template file for 'iscan-plugin-gt-s650'
pkgname=iscan-plugin-gt-s650
version=1.1.0
revision=1
repository=nonfree
build_style=fetch
maintainer="Dominik Honnef <dominik@honnef.co>"
depends="sane-epkowa"
license="AVASYS"
homepage="http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX"
short_desc="Epson scanner plugin for GT-S650, Epson Perfection V19 and Epson Perfection V39"
_url="https://download3.ebz.epson.net/dsc/f/03/00/03/51/35/2bb85852bb07d419fa09653e76027ab61a7e0a95"
if [ "$XBPS_MACHINE" = "x86_64" ]; then
_arch=amd64
checksum=442ca971cc0ebf71598047f41cb7e36eca0649eb62e324b91091360a63043df4
else
_arch=i386
checksum=453004dcf8d6bf68feb1994acd14dbf3f774d49215013568eef6037e8de24643
fi
distfiles="${_url}/${pkgname}_${version}-2_${_arch}.deb"
only_for_archs="i686 x86_64"
do_install() {
ar x *.deb
tar -xvf data.tar.gz -C ${DESTDIR}
vlicense ${DESTDIR}/usr/share/doc/iscan-plugin-gt-s650/AVASYSPL.en.txt
}

View file

@ -0,0 +1,48 @@
--- 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;

View file

@ -0,0 +1,3 @@
if [ "$UPDATE" = "no" -a "$ACTION" = "post" ]; then
rm /var/lib/iscan/interpreter
fi

41
srcpkgs/iscan/template Normal file
View file

@ -0,0 +1,41 @@
# Template file for 'iscan'
pkgname=iscan
version=2.30.1
revision=1
repository=nonfree
build_style=gnu-configure
configure_args="--enable-frontend --enable-jpeg --enable-tiff --enable-png --enable-gimp"
LDFLAGS="-ldl -lpng16"
maintainer="Dominik Honnef <dominik@honnef.co>"
hostmakedepends="pkg-config"
makedepends="gtk+-devel gimp-devel libxml2-devel libjpeg-turbo-devel tiff-devel libltdl-devel libpng-devel sane-devel libusb-devel"
depends="sane-epkowa"
license="GPL-2, AVASYSPL"
homepage="http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX"
short_desc="EPSON Image Scan! front-end"
distfiles="https://download3.ebz.epson.net/dsc/f/03/00/03/61/59/a3f8b8d60e8702a1c5bf3977d018cc2336e308a8/${pkgname}_${version}-1.tar.gz"
checksum=79aa9a9f81a7146beb22a382bbaf840fbce61b1bdb82660e541946a471e48426
only_for_archs="i686 x86_64"
post_install() {
vlicense non-free/AVASYSPL.en.txt
vmkdir usr/lib/gimp/2.0/plug-ins
ln -s /usr/bin/iscan ${DESTDIR}/usr/lib/gimp/2.0/plug-ins
}
sane-epkowa_package() {
short_desc="SANE backend for EPSON scanners"
license="GPL-2"
unset repository
depends="sane iscan-data"
conf_files="/etc/sane.d/epkowa.conf"
pkg_install() {
vmkdir etc/sane.d/dll.d
echo epkowa > ${PKGDESTDIR}/etc/sane.d/dll.d/epkowa.conf
vmove usr/lib/sane
vmove usr/share/man/man5/sane-epkowa.5
vmove usr/bin/iscan-registry
vmove usr/share/man/man8/iscan-registry.8
vinstall backend/epkowa.conf 644 etc/sane.d/
}
}

1
srcpkgs/sane-epkowa Symbolic link
View file

@ -0,0 +1 @@
iscan