diff --git a/srcpkgs/iscan-data/INSTALL b/srcpkgs/iscan-data/INSTALL new file mode 100644 index 00000000000..7ebba74496a --- /dev/null +++ b/srcpkgs/iscan-data/INSTALL @@ -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 diff --git a/srcpkgs/iscan-data/REMOVE b/srcpkgs/iscan-data/REMOVE new file mode 100644 index 00000000000..ca40eb21ed2 --- /dev/null +++ b/srcpkgs/iscan-data/REMOVE @@ -0,0 +1,5 @@ +case "${ACTION}" in + post) + rm /usr/lib/udev/rules.d/99-epkowa.rules + ;; +esac diff --git a/srcpkgs/iscan-data/template b/srcpkgs/iscan-data/template new file mode 100644 index 00000000000..1d4d28c837c --- /dev/null +++ b/srcpkgs/iscan-data/template @@ -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 " +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 diff --git a/srcpkgs/iscan-plugin-gt-s650/INSTALL b/srcpkgs/iscan-plugin-gt-s650/INSTALL new file mode 100644 index 00000000000..5cd784de394 --- /dev/null +++ b/srcpkgs/iscan-plugin-gt-s650/INSTALL @@ -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 diff --git a/srcpkgs/iscan-plugin-gt-s650/REMOVE b/srcpkgs/iscan-plugin-gt-s650/REMOVE new file mode 100644 index 00000000000..b144fb4bdf8 --- /dev/null +++ b/srcpkgs/iscan-plugin-gt-s650/REMOVE @@ -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 diff --git a/srcpkgs/iscan-plugin-gt-s650/template b/srcpkgs/iscan-plugin-gt-s650/template new file mode 100644 index 00000000000..eab5943e8be --- /dev/null +++ b/srcpkgs/iscan-plugin-gt-s650/template @@ -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 " +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 +} diff --git a/srcpkgs/iscan/patches/libpng15.patch b/srcpkgs/iscan/patches/libpng15.patch new file mode 100644 index 00000000000..955433ec035 --- /dev/null +++ b/srcpkgs/iscan/patches/libpng15.patch @@ -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; diff --git a/srcpkgs/iscan/sane-epkowa.REMOVE b/srcpkgs/iscan/sane-epkowa.REMOVE new file mode 100644 index 00000000000..7159ff4f75e --- /dev/null +++ b/srcpkgs/iscan/sane-epkowa.REMOVE @@ -0,0 +1,3 @@ +if [ "$UPDATE" = "no" -a "$ACTION" = "post" ]; then + rm /var/lib/iscan/interpreter +fi diff --git a/srcpkgs/iscan/template b/srcpkgs/iscan/template new file mode 100644 index 00000000000..7ef588d7aa8 --- /dev/null +++ b/srcpkgs/iscan/template @@ -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 " +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/ + } +} diff --git a/srcpkgs/sane-epkowa b/srcpkgs/sane-epkowa new file mode 120000 index 00000000000..653ee200f3c --- /dev/null +++ b/srcpkgs/sane-epkowa @@ -0,0 +1 @@ +iscan \ No newline at end of file