From b1fc5606e6d4c2893a2a46b97258eb6d89da85ad Mon Sep 17 00:00:00 2001 From: yosh Date: Sat, 27 Dec 2025 13:42:00 -0500 Subject: [PATCH 1/2] iscan: disable gimp2 plugin, fix sscanf for C99, restrict --- srcpkgs/iscan/files/README.voidlinux | 6 +++--- srcpkgs/iscan/patches/sscanf-c99.patch | 20 ++++++++++++++++++++ srcpkgs/iscan/template | 13 +++++++------ 3 files changed, 30 insertions(+), 9 deletions(-) create mode 100644 srcpkgs/iscan/patches/sscanf-c99.patch diff --git a/srcpkgs/iscan/files/README.voidlinux b/srcpkgs/iscan/files/README.voidlinux index fcc76ce1efe220..50be77ed675fac 100644 --- a/srcpkgs/iscan/files/README.voidlinux +++ b/srcpkgs/iscan/files/README.voidlinux @@ -1,3 +1,3 @@ -Most scanners will require some nonfree plugins. -Check the iscan-plugins-* packages to see if you need to install -additional packages. +Most scanners will require some nonfree plugins. These will need to +be installed via xbps-src. Check the iscan-plugin-* packages in the +void-packages repository. diff --git a/srcpkgs/iscan/patches/sscanf-c99.patch b/srcpkgs/iscan/patches/sscanf-c99.patch new file mode 100644 index 00000000000000..094de98d382635 --- /dev/null +++ b/srcpkgs/iscan/patches/sscanf-c99.patch @@ -0,0 +1,20 @@ +--- a/backend/cfg-obj.c ++++ b/backend/cfg-obj.c +@@ -1026,7 +1026,7 @@ _cfg_register_scsi_entry (const char *string) + char *vendor = NULL; + char *model = NULL; + +- sscanf (string, "%*s %as %as", &vendor, &model); ++ sscanf (string, "%*s %ms %ms", &vendor, &model); + + if (list_append (_cfg->seen[CFG_KEY_SCSI], info)) + { +@@ -1108,7 +1108,7 @@ _cfg_register_interpreter_entry (const char *string) + char *library = NULL; + char *firmware = NULL; + +- sscanf (string, "%*s %*s %x %x %as %as", ++ sscanf (string, "%*s %*s %x %x %ms %ms", + &vendor, &product, &library, &firmware); + + if (library && _cfg_have_interpreter (library, firmware) diff --git a/srcpkgs/iscan/template b/srcpkgs/iscan/template index f7b86f2a25b8bc..7ab906cee822c6 100644 --- a/srcpkgs/iscan/template +++ b/srcpkgs/iscan/template @@ -1,13 +1,14 @@ # Template file for 'iscan' pkgname=iscan version=2.30.4 -revision=1 +revision=2 _srcrev=2 archs="i686 x86_64" build_style=gnu-configure -configure_args="--enable-frontend --enable-jpeg --enable-tiff --enable-png --enable-gimp" +configure_args="--enable-frontend --enable-jpeg --enable-tiff --enable-png" hostmakedepends="pkg-config" -makedepends="gtk+-devel gimp-devel libxml2-devel libjpeg-turbo-devel tiff-devel libltdl-devel libpng-devel sane-devel libusb-devel" +makedepends="gtk+-devel libxml2-devel libjpeg-turbo-devel tiff-devel libltdl-devel + libpng-devel sane-devel libusb-devel" depends="sane-epkowa" short_desc="EPSON Image Scan! front-end" maintainer="Orphaned " @@ -16,6 +17,7 @@ homepage="http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX" distfiles="http://support.epson.net/linux/src/scanner/iscan/${pkgname}_${version}-${_srcrev}.tar.gz" checksum=597b9913de42d7a27f95bc82e533cbe778121ba13e3a03bc037f8d09a43447d5 repository=nonfree +restricted=yes LDFLAGS="-ldl -lpng16" post_configure() { @@ -25,16 +27,14 @@ post_configure() { post_install() { vlicense non-free/COPYING.EPSON.en.txt - vmkdir usr/lib/gimp/2.0/plug-ins - ln -s /usr/bin/iscan ${DESTDIR}/usr/lib/gimp/2.0/plug-ins vinstall iscan.desktop 644 usr/share/applications - vdoc "${FILESDIR}/README.voidlinux" } sane-epkowa_package() { short_desc="SANE backend for EPSON scanners" license="GPL-2.0-or-later" unset repository + unset restricted depends="sane iscan-data" conf_files="/etc/sane.d/epkowa.conf" pkg_install() { @@ -45,5 +45,6 @@ sane-epkowa_package() { vmove usr/bin/iscan-registry vmove usr/share/man/man8/iscan-registry.8 vinstall backend/epkowa.conf 644 etc/sane.d/ + vdoc "${FILESDIR}/README.voidlinux" } } From bf21dccd922c383589f6d81d64d0df323a53b5eb Mon Sep 17 00:00:00 2001 From: yosh Date: Sat, 27 Dec 2025 16:52:41 -0500 Subject: [PATCH 2/2] iscan-plugin-gt-s650: restrict, fix paths in INSTALL/REMOVE --- srcpkgs/iscan-plugin-gt-s650/INSTALL | 4 ++-- srcpkgs/iscan-plugin-gt-s650/REMOVE | 4 ++-- srcpkgs/iscan-plugin-gt-s650/template | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/srcpkgs/iscan-plugin-gt-s650/INSTALL b/srcpkgs/iscan-plugin-gt-s650/INSTALL index d0eae981b72d3e..eb9446602a08ef 100644 --- a/srcpkgs/iscan-plugin-gt-s650/INSTALL +++ b/srcpkgs/iscan-plugin-gt-s650/INSTALL @@ -1,6 +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 + usr/bin/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 index 02dd9f2bc9d256..a1ffd01bc1a209 100644 --- a/srcpkgs/iscan-plugin-gt-s650/REMOVE +++ b/srcpkgs/iscan-plugin-gt-s650/REMOVE @@ -3,7 +3,7 @@ if [ "$UPDATE" = "no" -a "$ACTION" = "pre" ]; then # 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 + usr/bin/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 index 588ca8c5be3a5c..18f6a82ea301d8 100644 --- a/srcpkgs/iscan-plugin-gt-s650/template +++ b/srcpkgs/iscan-plugin-gt-s650/template @@ -2,7 +2,7 @@ pkgname=iscan-plugin-gt-s650 reverts="1.1.0_4" version=1.0.0.3 -revision=2 +revision=3 archs="i686 x86_64" _bundle_version=6.6.2.1 depends="sane-epkowa" @@ -25,6 +25,7 @@ esac distfiles="https://download2.ebz.epson.net/epsonscan2/common/deb/${_arch}/epsonscan2-bundle-${_bundle_version}.${_cpu}.deb.tar.gz" nopie=yes repository=nonfree +restricted=yes do_install() { ar x plugins/*.deb