* [gentoo-commits] repo/gentoo:master commit in: media-gfx/sane-backends/, media-gfx/sane-backends/files/
@ 2015-11-02 22:47 Mike Frysinger
0 siblings, 0 replies; 10+ messages in thread
From: Mike Frysinger @ 2015-11-02 22:47 UTC (permalink / raw
To: gentoo-commits
commit: 70f1e0c27a7971ae7520a4e137f642103f8a81f7
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 2 22:37:17 2015 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon Nov 2 22:46:49 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=70f1e0c2
media-gfx/sane-backends: disable test that relies on USB support
.../files/sane-backends-1.0.25-disable-usb-tests.patch | 14 ++++++++++++++
.../sane-backends/sane-backends-1.0.25_pre20150628.ebuild | 3 ++-
media-gfx/sane-backends/sane-backends-9999.ebuild | 1 +
3 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.25-disable-usb-tests.patch b/media-gfx/sane-backends/files/sane-backends-1.0.25-disable-usb-tests.patch
new file mode 100644
index 0000000..217a440
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backends-1.0.25-disable-usb-tests.patch
@@ -0,0 +1,14 @@
+do not let the tests try reading/locking usb hardware. we also disable
+this because the test will abort() if no usb support is found at all.
+
+--- a/testsuite/sanei/sanei_usb_test.c
++++ b/testsuite/sanei/sanei_usb_test.c
+@@ -832,6 +832,8 @@ main (int argc, char **argv)
+ int detected, opened, i;
+ SANE_Int dn[MAX_DEVICES];
+
++ return 77;
++
+ #ifdef HAVE_LIBUSB
+ printf ("\n%s built with old libusb\n\n", argv[0]);
+ #endif
diff --git a/media-gfx/sane-backends/sane-backends-1.0.25_pre20150628.ebuild b/media-gfx/sane-backends/sane-backends-1.0.25_pre20150628.ebuild
index d8cec10..61a6e8f 100644
--- a/media-gfx/sane-backends/sane-backends-1.0.25_pre20150628.ebuild
+++ b/media-gfx/sane-backends/sane-backends-1.0.25_pre20150628.ebuild
@@ -197,7 +197,8 @@ src_prepare() {
"${FILESDIR}"/${PN}-1.0.24-automagic_systemd.patch \
"${FILESDIR}"/${PN}-1.0.24-systemd_pkgconfig.patch \
"${FILESDIR}"/${PN}-1.0.24-saned_pidfile_location.patch \
- "${FILESDIR}"/${PN}-1.0.24-cross-compile.patch
+ "${FILESDIR}"/${PN}-1.0.24-cross-compile.patch \
+ "${FILESDIR}"/${PN}-1.0.25-disable-usb-tests.patch
# Fix for "make check".
sed -i -e 's/sane-backends 1.0.24/sane-backends 1.0.25git/' testsuite/tools/data/html*
mv configure.{in,ac} || die
diff --git a/media-gfx/sane-backends/sane-backends-9999.ebuild b/media-gfx/sane-backends/sane-backends-9999.ebuild
index b636bf1..9743a91 100644
--- a/media-gfx/sane-backends/sane-backends-9999.ebuild
+++ b/media-gfx/sane-backends/sane-backends-9999.ebuild
@@ -190,6 +190,7 @@ src_prepare() {
epkowa
EOF
epatch "${FILESDIR}"/${PN}-1.0.24-saned_pidfile_location.patch
+ epatch "${FILESDIR}"/${PN}-1.0.25-disable-usb-tests.patch
mv configure.{in,ac} || die
AT_NOELIBTOOLIZE=yes eautoreconf
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/sane-backends/, media-gfx/sane-backends/files/
@ 2017-09-27 10:56 Pacho Ramos
0 siblings, 0 replies; 10+ messages in thread
From: Pacho Ramos @ 2017-09-27 10:56 UTC (permalink / raw
To: gentoo-commits
commit: 5b9c3f6d3294f87e193d5496d92cc871fb49a331
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 27 10:53:03 2017 +0000
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Wed Sep 27 10:53:03 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b9c3f6d
media-gfx/sane-backends: Version bump, add systemd unit files to complete its systemd support
Package-Manager: Portage-2.3.10, Repoman-2.3.3
media-gfx/sane-backends/Manifest | 1 +
.../sane-backends-1.0.27-disable-usb-tests.patch | 11 +
media-gfx/sane-backends/files/saned.socket | 10 +
media-gfx/sane-backends/files/saned_at.service | 18 ++
.../sane-backends/sane-backends-1.0.27.ebuild | 349 +++++++++++++++++++++
5 files changed, 389 insertions(+)
diff --git a/media-gfx/sane-backends/Manifest b/media-gfx/sane-backends/Manifest
index c55f6ece576..9844b23bfd8 100644
--- a/media-gfx/sane-backends/Manifest
+++ b/media-gfx/sane-backends/Manifest
@@ -1,2 +1,3 @@
DIST sane-backends-1.0.24.tar.gz 5778749 SHA256 27c7085a54f1505d8b551e6f1e69d30e1ee57328b18429bb2225dabf4c45462d SHA512 1e9f962bb9d27f17067eb662dabfc0a1aa0d06e16bec4bd28868124b468578d82f14f6d2c1f5de63d2cec57ca4584ec12d3b2c2b1de20f1199aece581453ebc5 WHIRLPOOL 19b939c920a3c157044c85a941debdc664d8781562fa3fc04f061b9d216b089be80edfd43479069382adf13e68160518fdbd5c84a5f4c506a46f8521d4ed2a1c
DIST sane-backends-1.0.25.tar.gz 5955016 SHA256 a4d7ba8d62b2dea702ce76be85699940992daf3f44823ddc128812da33dc6e2c SHA512 b9548646fff13558a4da4a4e9e8bad730f05121bcc65b72d24ded3bfddc6fe574e08c39c8651544b8fbfeab036fffd76cc14d76ef5d5d47e7513a2ce3afcc9df WHIRLPOOL 557a3ac8785c0dd7f98aa55d5edaf76fb5b2b3c86a2431bb40b5b132ac05de3abcb250a8bcf8ed188868c4f124ce0a323a92a5a83c7b44a20908fe40ca323711
+DIST sane-backends-1.0.27.tar.gz 6430188 SHA256 293747bf37275c424ebb2c833f8588601a60b2f9653945d5a3194875355e36c9 SHA512 c6552768bfc10216730fc11011c82f74ca0952182019ded3916072147ec09be5c975ce1d37dc3ccea050c488dbdf983c2ca17dcd702644060ba796ae2591f9c5 WHIRLPOOL 62ac1f4d4601bb2189212f021c23a48067ebdb5d900c2259ae4acdb6f94292c20689d9889bb11861b78be5ea7c3f76e815154e032f4bda76efcf901a97895cdd
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.27-disable-usb-tests.patch b/media-gfx/sane-backends/files/sane-backends-1.0.27-disable-usb-tests.patch
new file mode 100644
index 00000000000..6d208b9fbb8
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backends-1.0.27-disable-usb-tests.patch
@@ -0,0 +1,11 @@
+--- a/testsuite/sanei/sanei_usb_test.c~ 2017-05-15 03:19:11.000000000 +0200
++++ b/testsuite/sanei/sanei_usb_test.c 2017-09-27 12:13:57.402803737 +0200
+@@ -832,6 +832,8 @@
+ int detected, opened, i;
+ SANE_Int dn[MAX_DEVICES];
+
++ return 77;
++
+ #ifdef HAVE_LIBUSB_LEGACY
+ printf ("\n%s built with old libusb\n\n", argv[0]);
+ #endif
diff --git a/media-gfx/sane-backends/files/saned.socket b/media-gfx/sane-backends/files/saned.socket
new file mode 100644
index 00000000000..1aa19e703c9
--- /dev/null
+++ b/media-gfx/sane-backends/files/saned.socket
@@ -0,0 +1,10 @@
+[Unit]
+Description=saned incoming socket
+
+[Socket]
+ListenStream=6566
+Accept=yes
+MaxConnections=1
+
+[Install]
+WantedBy=sockets.target
diff --git a/media-gfx/sane-backends/files/saned_at.service b/media-gfx/sane-backends/files/saned_at.service
new file mode 100644
index 00000000000..f3282e44da9
--- /dev/null
+++ b/media-gfx/sane-backends/files/saned_at.service
@@ -0,0 +1,18 @@
+[Unit]
+Description=Scanner Service
+Requires=saned.socket
+
+[Service]
+ExecStart=/usr/sbin/saned
+User=scanner
+Group=scanner
+StandardInput=null
+StandardOutput=syslog
+StandardError=syslog
+Environment=SANE_CONFIG_DIR=@CONFIGDIR@
+# If you need to debug your configuration uncomment the next line and
+# change it as appropriate to set the desired debug options
+# Environment=SANE_DEBUG_DLL=255 SANE_DEBUG_NET=255
+
+[Install]
+Also=saned.socket
diff --git a/media-gfx/sane-backends/sane-backends-1.0.27.ebuild b/media-gfx/sane-backends/sane-backends-1.0.27.ebuild
new file mode 100644
index 00000000000..b74b5565a8e
--- /dev/null
+++ b/media-gfx/sane-backends/sane-backends-1.0.27.ebuild
@@ -0,0 +1,349 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit flag-o-matic ltprune multilib-minimal systemd toolchain-funcs udev user
+
+# gphoto and v4l are handled by their usual USE flags.
+# The pint backend was disabled because I could not get it to compile.
+IUSE_SANE_BACKENDS="
+ abaton
+ agfafocus
+ apple
+ artec
+ artec_eplus48u
+ as6e
+ avision
+ bh
+ canon
+ canon630u
+ canon_dr
+ canon_pp
+ cardscan
+ coolscan
+ coolscan2
+ coolscan3
+ dc210
+ dc240
+ dc25
+ dell1600n_net
+ dmc
+ epjitsu
+ epson
+ epson2
+ fujitsu
+ genesys
+ gt68xx
+ hp
+ hp3500
+ hp3900
+ hp4200
+ hp5400
+ hp5590
+ hpljm1005
+ hpsj5s
+ hs2p
+ ibm
+ kodak
+ kodakaio
+ kvs1025
+ kvs20xx
+ kvs40xx
+ leo
+ lexmark
+ ma1509
+ magicolor
+ matsushita
+ microtek
+ microtek2
+ mustek
+ mustek_pp
+ mustek_usb
+ mustek_usb2
+ nec
+ net
+ niash
+ p5
+ pie
+ pixma
+ plustek
+ plustek_pp
+ pnm
+ qcam
+ ricoh
+ rts8891
+ s9036
+ sceptre
+ sharp
+ sm3600
+ sm3840
+ snapscan
+ sp15c
+ st400
+ stv680
+ tamarack
+ teco1
+ teco2
+ teco3
+ test
+ u12
+ umax
+ umax1220u
+ umax_pp
+ xerox_mfp"
+
+IUSE="gphoto2 ipv6 snmp systemd threads usb v4l xinetd zeroconf"
+
+for backend in ${IUSE_SANE_BACKENDS}; do
+ case ${backend} in
+ # Disable backends that require parallel ports as no one has those anymore.
+ canon_pp|hpsj5s|mustek_pp|\
+ pnm)
+ IUSE+=" -sane_backends_${backend}"
+ ;;
+ mustek_usb2|kvs40xx)
+ IUSE+=" sane_backends_${backend}"
+ ;;
+ *)
+ IUSE+=" +sane_backends_${backend}"
+ esac
+done
+
+REQUIRED_USE="
+ sane_backends_mustek_usb2? ( threads )
+ sane_backends_kvs40xx? ( threads )
+"
+
+DESCRIPTION="Scanner Access Now Easy - Backends"
+HOMEPAGE="http://www.sane-project.org/"
+case ${PV} in
+9999)
+ EGIT_REPO_URI="git://anonscm.debian.org/sane/sane-backends.git"
+ inherit git-r3 autotools
+ ;;
+*_pre*)
+ MY_P="${PN}-git${PV#*_pre}"
+ SRC_URI="http://www.sane-project.org/snapshots/${MY_P}.tar.gz
+ mirror://gentoo/${MY_P}.tar.gz"
+ S=${WORKDIR}/${MY_P}
+ ;;
+*)
+ MY_P=${P}
+ FRS_ID="4224"
+ SRC_URI="https://alioth.debian.org/frs/download.php/file/${FRS_ID}/${P}.tar.gz"
+ ;;
+esac
+
+LICENSE="GPL-2 public-domain"
+SLOT="0"
+if [[ ${PV} != "9999" ]] ; then
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+fi
+
+RDEPEND="
+ sane_backends_dc210? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] )
+ sane_backends_dc240? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] )
+ sane_backends_dell1600n_net? (
+ >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}]
+ >=media-libs/tiff-3.9.7-r1:0=[${MULTILIB_USEDEP}]
+ )
+ sane_backends_canon_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
+ sane_backends_hpsj5s? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
+ sane_backends_mustek_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
+ usb? ( >=virtual/libusb-1-r1:1=[${MULTILIB_USEDEP}] )
+ gphoto2? (
+ >=media-libs/libgphoto2-2.5.3.1:=[${MULTILIB_USEDEP}]
+ >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}]
+ )
+ v4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] )
+ xinetd? ( sys-apps/xinetd )
+ snmp? ( net-analyzer/net-snmp )
+ systemd? ( sys-apps/systemd:0= )
+ zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] )
+"
+
+DEPEND="${RDEPEND}
+ v4l? ( sys-kernel/linux-headers )
+ >=sys-devel/gettext-0.18.1
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+"
+
+# We now use new syntax construct (SUBSYSTEMS!="usb|usb_device)
+RDEPEND="${RDEPEND}
+ !<sys-fs/udev-114
+"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/sane-config
+)
+
+pkg_setup() {
+ enewgroup scanner
+ enewuser saned -1 -1 -1 scanner
+}
+
+src_prepare() {
+ default
+
+ cat >> backend/dll.conf.in <<-EOF
+ # Add support for the HP-specific backend. Needs net-print/hplip installed.
+ hpaio
+ # Add support for the Epson-specific backend. Needs media-gfx/iscan installed.
+ epkowa
+ EOF
+
+ eapply "${FILESDIR}"/${PN}-1.0.24-saned_pidfile_location.patch
+ eapply "${FILESDIR}"/${PN}-1.0.27-disable-usb-tests.patch
+
+ if [[ ${PV} == "9999" ]] ; then
+ mv configure.{in,ac} || die
+ AT_NOELIBTOOLIZE=yes eautoreconf
+ fi
+
+ # Fix for "make check". Upstream sometimes forgets to update this.
+ local ver=$(./configure --version | awk '{print $NF; exit 0}')
+ sed -i \
+ -e "/by sane-desc 3.5 from sane-backends/s:sane-backends .*:sane-backends ${ver}:" \
+ testsuite/tools/data/html* || die
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing # bug?????
+
+ # if LINGUAS is set, just use the listed and supported localizations.
+ if [[ ${LINGUAS+set} == "set" ]]; then
+ mkdir -p po || die
+ strip-linguas -u po
+ printf '%s\n' ${LINGUAS} > po/LINGUAS
+ fi
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ # the blank is intended - an empty string would result in building ALL backends.
+ local BACKENDS=" "
+
+ use gphoto2 && BACKENDS="gphoto2"
+ use v4l && BACKENDS="${BACKENDS} v4l"
+ for backend in ${IUSE_SANE_BACKENDS}; do
+ if use "sane_backends_${backend}" && [ ${backend} != pnm ]; then
+ BACKENDS="${BACKENDS} ${backend}"
+ fi
+ done
+
+ local myconf=(
+ $(use_with usb)
+ $(multilib_native_use_with snmp)
+ )
+
+ # you can only enable this backend, not disable it...
+ if use sane_backends_pnm; then
+ myconf+=( --enable-pnm-backend )
+ fi
+ if use sane_backends_mustek_pp; then
+ myconf+=( --enable-parport-directio )
+ fi
+ if ! { use sane_backends_canon_pp || use sane_backends_hpsj5s || use sane_backends_mustek_pp; }; then
+ myconf+=( sane_cv_use_libieee1284=no )
+ fi
+
+ # relative path must be used for tests to work properly
+ ECONF_SOURCE=${S} \
+ SANEI_JPEG="sanei_jpeg.o" SANEI_JPEG_LO="sanei_jpeg.lo" \
+ BACKENDS="${BACKENDS}" \
+ econf \
+ $(use_with gphoto2) \
+ $(multilib_native_use_with systemd) \
+ $(use_with v4l) \
+ $(use_enable ipv6) \
+ $(use_enable threads pthread) \
+ $(use_enable zeroconf avahi) \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ emake VARTEXFONTS="${T}/fonts"
+
+ if tc-is-cross-compiler; then
+ pushd "${BUILD_DIR}"/tools >/dev/null || die
+
+ # The build system sucks and doesn't handle this properly.
+ # https://alioth.debian.org/tracker/index.php?func=detail&aid=314236&group_id=30186&atid=410366
+ tc-export_build_env BUILD_CC
+ ${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
+ -I. -I../include -I"${S}"/include \
+ "${S}"/sanei/sanei_config.c "${S}"/sanei/sanei_constrain_value.c \
+ "${S}"/sanei/sanei_init_debug.c "${S}"/tools/sane-desc.c -o sane-desc || die
+ local dirs=( hal hotplug hotplug-ng udev )
+ local targets=(
+ hal/libsane.fdi
+ hotplug/libsane.usermap
+ hotplug-ng/libsane.db
+ udev/libsane.rules
+ )
+ mkdir -p "${dirs[@]}" || die
+ emake "${targets[@]}"
+
+ popd >/dev/null
+ fi
+
+ if use usb; then
+ sed -i -e '/^$/d' \
+ tools/hotplug/libsane.usermap || die
+ fi
+}
+
+multilib_src_install() {
+ emake INSTALL_LOCKPATH="" DESTDIR="${D}" install \
+ docdir="${EPREFIX}"/usr/share/doc/${PF}
+
+ if multilib_is_native_abi; then
+ if use usb; then
+ insinto /etc/hotplug/usb
+ doins tools/hotplug/libsane.usermap
+ fi
+
+ udev_newrules tools/udev/libsane.rules 41-libsane.rules
+ insinto "/usr/share/pkgconfig"
+ doins tools/sane-backends.pc
+ fi
+}
+
+multilib_src_install_all() {
+ keepdir /var/lib/lock/sane
+ fowners root:scanner /var/lib/lock/sane
+ fperms g+w /var/lib/lock/sane
+ dodir /etc/env.d
+
+ if use systemd; then
+ systemd_newunit "${FILESDIR}"/saned_at.service "saned@.service"
+ systemd_newunit "${FILESDIR}"/saned.socket saned.socket
+ fi
+
+ if use usb; then
+ exeinto /etc/hotplug/usb
+ doexe tools/hotplug/libusbscanner
+ newdoc tools/hotplug/README README.hotplug
+ fi
+
+ dodoc NEWS AUTHORS ChangeLog* PROBLEMS README README.linux
+ prune_libtool_files --modules
+ if use xinetd; then
+ insinto /etc/xinetd.d
+ doins "${FILESDIR}"/saned
+ fi
+
+ newinitd "${FILESDIR}"/saned.initd saned
+ newconfd "${FILESDIR}"/saned.confd saned
+}
+
+pkg_postinst() {
+ if use xinetd; then
+ elog "If you want remote clients to connect, edit"
+ elog "/etc/sane.d/saned.conf and /etc/hosts.allow"
+ fi
+
+ elog "If you are using a USB scanner, add all users who want"
+ elog "to access your scanner to the \"scanner\" group."
+}
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/sane-backends/, media-gfx/sane-backends/files/
@ 2018-04-02 12:23 Pacho Ramos
0 siblings, 0 replies; 10+ messages in thread
From: Pacho Ramos @ 2018-04-02 12:23 UTC (permalink / raw
To: gentoo-commits
commit: 5588a45209bdffafdf680a85c1724be657c5b596
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 2 12:21:34 2018 +0000
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Mon Apr 2 12:23:52 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5588a452
media-gfx/sane-backends: Multiple bug fixes
- Fix sandbox violation (#635022)
- Fix genesys driver (#635348)
- Apply ArchLinux patch to prevent interruptions with network scanners
Package-Manager: Portage-2.3.27, Repoman-2.3.9
.../sane-backends-1.0.27-canon-lide-100.patch | 17 ++
.../files/sane-backends-1.0.27-network.patch | 42 +++
.../sane-backends/sane-backends-1.0.27-r1.ebuild | 340 +++++++++++++++++++++
3 files changed, 399 insertions(+)
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.27-canon-lide-100.patch b/media-gfx/sane-backends/files/sane-backends-1.0.27-canon-lide-100.patch
new file mode 100644
index 00000000000..504f9e666e6
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backends-1.0.27-canon-lide-100.patch
@@ -0,0 +1,17 @@
+diff -up sane-backends-1.0.27/backend/genesys.c.canon-lide-100 sane-backends-1.0.27/backend/genesys.c
+--- sane-backends-1.0.27/backend/genesys.c.canon-lide-100 2018-02-01 10:37:26.160044539 +0100
++++ sane-backends-1.0.27/backend/genesys.c 2018-02-01 10:45:44.616653277 +0100
+@@ -2070,11 +2070,9 @@ genesys_white_shading_calibration (Genes
+ dev->model->cmd_set->set_lamp_power (dev, dev->calib_reg, SANE_TRUE);
+ dev->model->cmd_set->set_motor_power (dev->calib_reg, motor);
+
+- /* if needed, go back before doin next scan, by using rewind, registers and
+- * slopes table are kept intact from previous scan */
+- if (dev->model->flags & GENESYS_FLAG_SHADING_REPARK && dev->model->cmd_set->rewind)
++ if (dev->model->flags & GENESYS_FLAG_SHADING_REPARK)
+ {
+- status = dev->model->cmd_set->rewind (dev);
++ status = dev->model->cmd_set->slow_back_home (dev, SANE_TRUE);
+ }
+
+ status =
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.27-network.patch b/media-gfx/sane-backends/files/sane-backends-1.0.27-network.patch
new file mode 100644
index 00000000000..2605ea83578
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backends-1.0.27-network.patch
@@ -0,0 +1,42 @@
+diff --git a/sanei/sanei_tcp.c b/sanei/sanei_tcp.c
+index a57d7c7..d0a1e92 100644
+--- a/sanei/sanei_tcp.c
++++ b/sanei/sanei_tcp.c
+@@ -45,6 +45,7 @@
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <time.h>
+
+ #ifdef HAVE_WINSOCK2_H
+ #include <winsock2.h>
+@@ -123,14 +124,27 @@ sanei_tcp_write(int fd, const u_char * buf, int count)
+ ssize_t
+ sanei_tcp_read(int fd, u_char * buf, int count)
+ {
+- ssize_t bytes_recv = 0, rc = 1;
++ ssize_t bytes_recv = 0, rc = 1;
++ int retry = 5;
+
+ while (bytes_recv < count && rc > 0)
+ {
+ rc = recv(fd, buf+bytes_recv, count-bytes_recv, 0);
++ DBG(1, "%s: bytes received %d\n", __FUNCTION__, rc);
+ if (rc > 0)
+ bytes_recv += rc;
+-
++ else {
++ if ( errno == EAGAIN && retry-- ) {
++ DBG(1, "%s: waiting %d\n", __FUNCTION__, retry);
++ /* wait for max 1s */
++ struct timespec req;
++ struct timespec rem;
++ req.tv_sec = 0;
++ req.tv_nsec= 100000000;
++ nanosleep(&req, &rem);
++ rc = 1;
++ }
++ }
+ }
+ return bytes_recv;
+ }
diff --git a/media-gfx/sane-backends/sane-backends-1.0.27-r1.ebuild b/media-gfx/sane-backends/sane-backends-1.0.27-r1.ebuild
new file mode 100644
index 00000000000..4b7b9d954cd
--- /dev/null
+++ b/media-gfx/sane-backends/sane-backends-1.0.27-r1.ebuild
@@ -0,0 +1,340 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit flag-o-matic multilib-minimal systemd toolchain-funcs udev user xdg-utils
+
+# gphoto and v4l are handled by their usual USE flags.
+# The pint backend was disabled because I could not get it to compile.
+IUSE_SANE_BACKENDS="
+ abaton
+ agfafocus
+ apple
+ artec
+ artec_eplus48u
+ as6e
+ avision
+ bh
+ canon
+ canon630u
+ canon_dr
+ canon_pp
+ cardscan
+ coolscan
+ coolscan2
+ coolscan3
+ dc210
+ dc240
+ dc25
+ dell1600n_net
+ dmc
+ epjitsu
+ epson
+ epson2
+ fujitsu
+ genesys
+ gt68xx
+ hp
+ hp3500
+ hp3900
+ hp4200
+ hp5400
+ hp5590
+ hpljm1005
+ hpsj5s
+ hs2p
+ ibm
+ kodak
+ kodakaio
+ kvs1025
+ kvs20xx
+ kvs40xx
+ leo
+ lexmark
+ ma1509
+ magicolor
+ matsushita
+ microtek
+ microtek2
+ mustek
+ mustek_pp
+ mustek_usb
+ mustek_usb2
+ nec
+ net
+ niash
+ p5
+ pie
+ pixma
+ plustek
+ plustek_pp
+ pnm
+ qcam
+ ricoh
+ rts8891
+ s9036
+ sceptre
+ sharp
+ sm3600
+ sm3840
+ snapscan
+ sp15c
+ st400
+ stv680
+ tamarack
+ teco1
+ teco2
+ teco3
+ test
+ u12
+ umax
+ umax1220u
+ umax_pp
+ xerox_mfp"
+
+IUSE="gphoto2 ipv6 snmp systemd threads usb v4l xinetd zeroconf"
+
+for backend in ${IUSE_SANE_BACKENDS}; do
+ case ${backend} in
+ # Disable backends that require parallel ports as no one has those anymore.
+ canon_pp|hpsj5s|mustek_pp|\
+ pnm)
+ IUSE+=" -sane_backends_${backend}"
+ ;;
+ mustek_usb2|kvs40xx)
+ IUSE+=" sane_backends_${backend}"
+ ;;
+ *)
+ IUSE+=" +sane_backends_${backend}"
+ esac
+done
+
+REQUIRED_USE="
+ sane_backends_mustek_usb2? ( threads )
+ sane_backends_kvs40xx? ( threads )
+"
+
+DESCRIPTION="Scanner Access Now Easy - Backends"
+HOMEPAGE="http://www.sane-project.org/"
+MY_P="${P}"
+FRS_ID="4224"
+SRC_URI="https://alioth.debian.org/frs/download.php/file/${FRS_ID}/${P}.tar.gz"
+
+LICENSE="GPL-2 public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ sane_backends_dc210? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] )
+ sane_backends_dc240? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] )
+ sane_backends_dell1600n_net? (
+ >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}]
+ >=media-libs/tiff-3.9.7-r1:0=[${MULTILIB_USEDEP}]
+ )
+ sane_backends_canon_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
+ sane_backends_hpsj5s? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
+ sane_backends_mustek_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
+ usb? ( >=virtual/libusb-1-r1:1=[${MULTILIB_USEDEP}] )
+ gphoto2? (
+ >=media-libs/libgphoto2-2.5.3.1:=[${MULTILIB_USEDEP}]
+ >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}]
+ )
+ v4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] )
+ xinetd? ( sys-apps/xinetd )
+ snmp? ( net-analyzer/net-snmp )
+ systemd? ( sys-apps/systemd:0= )
+ zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] )
+"
+
+DEPEND="${RDEPEND}
+ v4l? ( sys-kernel/linux-headers )
+ >=sys-devel/gettext-0.18.1
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
+"
+
+# We now use new syntax construct (SUBSYSTEMS!="usb|usb_device)
+RDEPEND="${RDEPEND}
+ !<sys-fs/udev-114
+"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/sane-config
+)
+
+pkg_setup() {
+ enewgroup scanner
+ enewuser saned -1 -1 -1 scanner
+}
+
+src_prepare() {
+ default
+
+ xdg_environment_reset
+
+ cat >> backend/dll.conf.in <<-EOF
+ # Add support for the HP-specific backend. Needs net-print/hplip installed.
+ hpaio
+ # Add support for the Epson-specific backend. Needs media-gfx/iscan installed.
+ epkowa
+ EOF
+
+ eapply "${FILESDIR}"/${PN}-1.0.24-saned_pidfile_location.patch
+ eapply "${FILESDIR}"/${PN}-1.0.27-disable-usb-tests.patch
+
+ # From Arch
+ eapply "${FILESDIR}"/${PN}-1.0.27-network.patch
+
+ # From Fedora
+ # Fix https://bugs.gentoo.org/635348
+ eapply "${FILESDIR}"/${PN}-1.0.27-canon-lide-100.patch
+
+ # Fix for "make check". Upstream sometimes forgets to update this.
+ local ver=$(./configure --version | awk '{print $NF; exit 0}')
+ sed -i \
+ -e "/by sane-desc 3.5 from sane-backends/s:sane-backends .*:sane-backends ${ver}:" \
+ testsuite/tools/data/html* || die
+}
+
+src_configure() {
+ append-flags -fno-strict-aliasing # From Fedora
+
+ # if LINGUAS is set, just use the listed and supported localizations.
+ if [[ ${LINGUAS+set} == "set" ]]; then
+ mkdir -p po || die
+ strip-linguas -u po
+ printf '%s\n' ${LINGUAS} > po/LINGUAS
+ fi
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ # the blank is intended - an empty string would result in building ALL backends.
+ local BACKENDS=" "
+
+ use gphoto2 && BACKENDS="gphoto2"
+ use v4l && BACKENDS="${BACKENDS} v4l"
+ for backend in ${IUSE_SANE_BACKENDS}; do
+ if use "sane_backends_${backend}" && [ ${backend} != pnm ]; then
+ BACKENDS="${BACKENDS} ${backend}"
+ fi
+ done
+
+ local myconf=(
+ $(use_with usb)
+ $(multilib_native_use_with snmp)
+ )
+
+ # you can only enable this backend, not disable it...
+ if use sane_backends_pnm; then
+ myconf+=( --enable-pnm-backend )
+ fi
+ if use sane_backends_mustek_pp; then
+ myconf+=( --enable-parport-directio )
+ fi
+ if ! { use sane_backends_canon_pp || use sane_backends_hpsj5s || use sane_backends_mustek_pp; }; then
+ myconf+=( sane_cv_use_libieee1284=no )
+ fi
+
+ # relative path must be used for tests to work properly
+ ECONF_SOURCE=${S} \
+ SANEI_JPEG="sanei_jpeg.o" SANEI_JPEG_LO="sanei_jpeg.lo" \
+ BACKENDS="${BACKENDS}" \
+ econf \
+ $(use_with gphoto2) \
+ $(multilib_native_use_with systemd) \
+ $(use_with v4l) \
+ $(use_enable ipv6) \
+ $(use_enable threads pthread) \
+ $(use_enable zeroconf avahi) \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ emake VARTEXFONTS="${T}/fonts"
+
+ if tc-is-cross-compiler; then
+ pushd "${BUILD_DIR}"/tools >/dev/null || die
+
+ # The build system sucks and doesn't handle this properly.
+ # https://alioth.debian.org/tracker/index.php?func=detail&aid=314236&group_id=30186&atid=410366
+ tc-export_build_env BUILD_CC
+ ${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
+ -I. -I../include -I"${S}"/include \
+ "${S}"/sanei/sanei_config.c "${S}"/sanei/sanei_constrain_value.c \
+ "${S}"/sanei/sanei_init_debug.c "${S}"/tools/sane-desc.c -o sane-desc || die
+ local dirs=( hal hotplug hotplug-ng udev )
+ local targets=(
+ hal/libsane.fdi
+ hotplug/libsane.usermap
+ hotplug-ng/libsane.db
+ udev/libsane.rules
+ )
+ mkdir -p "${dirs[@]}" || die
+ emake "${targets[@]}"
+
+ popd >/dev/null
+ fi
+
+ if use usb; then
+ sed -i -e '/^$/d' \
+ tools/hotplug/libsane.usermap || die
+ fi
+}
+
+multilib_src_install() {
+ emake INSTALL_LOCKPATH="" DESTDIR="${D}" install \
+ docdir="${EPREFIX}"/usr/share/doc/${PF}
+
+ if multilib_is_native_abi; then
+ if use usb; then
+ insinto /etc/hotplug/usb
+ doins tools/hotplug/libsane.usermap
+ fi
+
+ udev_newrules tools/udev/libsane.rules 41-libsane.rules
+ insinto "/usr/share/pkgconfig"
+ doins tools/sane-backends.pc
+ fi
+}
+
+multilib_src_install_all() {
+ keepdir /var/lib/lock/sane
+ fowners root:scanner /var/lib/lock/sane
+ fperms g+w /var/lib/lock/sane
+ dodir /etc/env.d
+
+ if use systemd; then
+ systemd_newunit "${FILESDIR}"/saned_at.service "saned@.service"
+ systemd_newunit "${FILESDIR}"/saned.socket saned.socket
+ fi
+
+ if use usb; then
+ exeinto /etc/hotplug/usb
+ doexe tools/hotplug/libusbscanner
+ newdoc tools/hotplug/README README.hotplug
+ fi
+
+ dodoc NEWS AUTHORS ChangeLog* PROBLEMS README README.linux
+ find "${D}" -name '*.la' -delete || die
+
+ if use xinetd; then
+ insinto /etc/xinetd.d
+ doins "${FILESDIR}"/saned
+ fi
+
+ newinitd "${FILESDIR}"/saned.initd saned
+ newconfd "${FILESDIR}"/saned.confd saned
+}
+
+pkg_postinst() {
+ if use xinetd; then
+ elog "If you want remote clients to connect, edit"
+ elog "/etc/sane.d/saned.conf and /etc/hosts.allow"
+ fi
+
+ if ! use systemd; then
+ elog "If you are using a USB scanner, add all users who want"
+ elog "to access your scanner to the \"scanner\" group."
+ fi
+}
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/sane-backends/, media-gfx/sane-backends/files/
@ 2020-06-28 8:24 Jeroen Roovers
0 siblings, 0 replies; 10+ messages in thread
From: Jeroen Roovers @ 2020-06-28 8:24 UTC (permalink / raw
To: gentoo-commits
commit: 49491819885af7f659dafe3a116ada80fbcfe1d7
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 28 08:23:11 2020 +0000
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sun Jun 28 08:24:53 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49491819
media-gfx/sane-backends: Fix genesys backend on bigendian
Fixes a compile failure on HPPA (and other BE architectures):
backend/genesys/low.cpp:542:9: error: ‘depth’ was not declared in this
scope
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Bug: https://bugs.gentoo.org/729312
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>
.../files/sane-backends-1.0.30-bigendian-depth.patch | 14 ++++++++++++++
media-gfx/sane-backends/sane-backends-1.0.30-r2.ebuild | 3 ++-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.30-bigendian-depth.patch b/media-gfx/sane-backends/files/sane-backends-1.0.30-bigendian-depth.patch
new file mode 100644
index 00000000000..bac06593b9e
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backends-1.0.30-bigendian-depth.patch
@@ -0,0 +1,14 @@
+Correct overlooked bigendian case. This has been fixed upstream in a different
+way since the 1.0.30 release.
+
+--- a/backend/genesys/low.cpp
++++ b/backend/genesys/low.cpp
+@@ -539,7 +539,7 @@
+ }
+
+ #ifdef WORDS_BIGENDIAN
+- if (depth == 16) {
++ if (session.params.depth == 16) {
+ dev->pipeline.push_node<ImagePipelineNodeSwap16BitEndian>();
+ }
+ #endif
diff --git a/media-gfx/sane-backends/sane-backends-1.0.30-r2.ebuild b/media-gfx/sane-backends/sane-backends-1.0.30-r2.ebuild
index e7eb2d4d7dd..d81a991ad81 100644
--- a/media-gfx/sane-backends/sane-backends-1.0.30-r2.ebuild
+++ b/media-gfx/sane-backends/sane-backends-1.0.30-r2.ebuild
@@ -168,7 +168,8 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.0.24-saned_pidfile_location.patch
"${FILESDIR}"/${PN}-1.0.27-disable-usb-tests.patch
"${FILESDIR}"/${P}-missing-stdint-include.patch
- "${FILESDIR}"/sane-backends-1.0.30-add_hpaio_epkowa_dll.conf.patch
+ "${FILESDIR}"/${PN}-1.0.30-add_hpaio_epkowa_dll.conf.patch
+ "${FILESDIR}"/${PN}-1.0.30-bigendian-depth.patch
)
S="${WORKDIR}/${MY_P}"
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/sane-backends/, media-gfx/sane-backends/files/
@ 2020-09-17 23:20 Sam James
0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2020-09-17 23:20 UTC (permalink / raw
To: gentoo-commits
commit: 619a6b6164660089f7dee5fcb6ea484f7bcff72b
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 17 23:20:15 2020 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Sep 17 23:20:22 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=619a6b61
media-gfx/sane-backends: security cleanup
Bug: https://bugs.gentoo.org/729312
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-gfx/sane-backends/Manifest | 1 -
.../sane-backends-1.0.27-canon-lide-100.patch | 17 -
.../files/sane-backends-1.0.27-network.patch | 42 ---
.../sane-backends-1.0.27-revert-samsung.patch | 406 ---------------------
...ne-backends-1.0.27-uninitialized-variable.patch | 25 --
.../sane-backends/sane-backends-1.0.27-r3.ebuild | 344 -----------------
6 files changed, 835 deletions(-)
diff --git a/media-gfx/sane-backends/Manifest b/media-gfx/sane-backends/Manifest
index 1e5f15e24b2..4a1266cd003 100644
--- a/media-gfx/sane-backends/Manifest
+++ b/media-gfx/sane-backends/Manifest
@@ -1,2 +1 @@
DIST backends-1.0.30.tar.gz 5721262 BLAKE2B 139d3ca908d54b94d14ef4145d44a89b939807c15870be03c3c028cf95351bf9a4abd3ea115b84396366bb054f37ade883f429467dceb0663c2855b92e0a4fa5 SHA512 19127c8109c1587d60d8cba713f73b1a24242df44fa49c3e59320f48022783f05d26d3242a3f87478e583a807d88b446ef7a51afb33b674be29656496c435d7b
-DIST sane-backends-1.0.27.tar.gz 6430188 BLAKE2B 90f910311e31a436eaa0ca0fedd998aac3331f89a346f31613776ebc860a10cc37055fd15db8de8d743498914ea0c16e4153dbaa101380eb6e36857d730c3456 SHA512 c6552768bfc10216730fc11011c82f74ca0952182019ded3916072147ec09be5c975ce1d37dc3ccea050c488dbdf983c2ca17dcd702644060ba796ae2591f9c5
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.27-canon-lide-100.patch b/media-gfx/sane-backends/files/sane-backends-1.0.27-canon-lide-100.patch
deleted file mode 100644
index 504f9e666e6..00000000000
--- a/media-gfx/sane-backends/files/sane-backends-1.0.27-canon-lide-100.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff -up sane-backends-1.0.27/backend/genesys.c.canon-lide-100 sane-backends-1.0.27/backend/genesys.c
---- sane-backends-1.0.27/backend/genesys.c.canon-lide-100 2018-02-01 10:37:26.160044539 +0100
-+++ sane-backends-1.0.27/backend/genesys.c 2018-02-01 10:45:44.616653277 +0100
-@@ -2070,11 +2070,9 @@ genesys_white_shading_calibration (Genes
- dev->model->cmd_set->set_lamp_power (dev, dev->calib_reg, SANE_TRUE);
- dev->model->cmd_set->set_motor_power (dev->calib_reg, motor);
-
-- /* if needed, go back before doin next scan, by using rewind, registers and
-- * slopes table are kept intact from previous scan */
-- if (dev->model->flags & GENESYS_FLAG_SHADING_REPARK && dev->model->cmd_set->rewind)
-+ if (dev->model->flags & GENESYS_FLAG_SHADING_REPARK)
- {
-- status = dev->model->cmd_set->rewind (dev);
-+ status = dev->model->cmd_set->slow_back_home (dev, SANE_TRUE);
- }
-
- status =
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.27-network.patch b/media-gfx/sane-backends/files/sane-backends-1.0.27-network.patch
deleted file mode 100644
index 2605ea83578..00000000000
--- a/media-gfx/sane-backends/files/sane-backends-1.0.27-network.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-diff --git a/sanei/sanei_tcp.c b/sanei/sanei_tcp.c
-index a57d7c7..d0a1e92 100644
---- a/sanei/sanei_tcp.c
-+++ b/sanei/sanei_tcp.c
-@@ -45,6 +45,7 @@
- #include <unistd.h>
- #include <stdlib.h>
- #include <string.h>
-+#include <time.h>
-
- #ifdef HAVE_WINSOCK2_H
- #include <winsock2.h>
-@@ -123,14 +124,27 @@ sanei_tcp_write(int fd, const u_char * buf, int count)
- ssize_t
- sanei_tcp_read(int fd, u_char * buf, int count)
- {
-- ssize_t bytes_recv = 0, rc = 1;
-+ ssize_t bytes_recv = 0, rc = 1;
-+ int retry = 5;
-
- while (bytes_recv < count && rc > 0)
- {
- rc = recv(fd, buf+bytes_recv, count-bytes_recv, 0);
-+ DBG(1, "%s: bytes received %d\n", __FUNCTION__, rc);
- if (rc > 0)
- bytes_recv += rc;
--
-+ else {
-+ if ( errno == EAGAIN && retry-- ) {
-+ DBG(1, "%s: waiting %d\n", __FUNCTION__, retry);
-+ /* wait for max 1s */
-+ struct timespec req;
-+ struct timespec rem;
-+ req.tv_sec = 0;
-+ req.tv_nsec= 100000000;
-+ nanosleep(&req, &rem);
-+ rc = 1;
-+ }
-+ }
- }
- return bytes_recv;
- }
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.27-revert-samsung.patch b/media-gfx/sane-backends/files/sane-backends-1.0.27-revert-samsung.patch
deleted file mode 100644
index af3e141a010..00000000000
--- a/media-gfx/sane-backends/files/sane-backends-1.0.27-revert-samsung.patch
+++ /dev/null
@@ -1,406 +0,0 @@
-From 9b13d4c18b2424eaed02b72a928e9607921ec265 Mon Sep 17 00:00:00 2001
-From: Bernard Cafarelli <bernard.cafarelli@gmail.com>
-Date: Tue, 17 Apr 2018 22:43:15 +0200
-Subject: [PATCH] Revert "Color scanning for Samsung models, which support JPEG
- Lossy compression."
-
-This reverts commit 926bfade544de4a4fd5f1a8082b85a97e2443770, leaving
-the new IDs in.
-As tracked in #315876, this breaks scanning with multiple Samsung scanners
-
-Conflicts:
- backend/xerox_mfp.c
- backend/xerox_mfp.h
- doc/descriptions/xerox_mfp.desc
----
- backend/Makefile.am | 2 +-
- backend/Makefile.in | 7 +-
- backend/xerox_mfp.c | 193 +-------------------------------
- backend/xerox_mfp.h | 5 -
- doc/descriptions/xerox_mfp.desc | 10 +-
- 5 files changed, 14 insertions(+), 203 deletions(-)
-
-diff --git a/backend/Makefile.am b/backend/Makefile.am
-index 18695a4a..3225b133 100644
---- a/backend/Makefile.am
-+++ b/backend/Makefile.am
-@@ -1086,7 +1086,7 @@ libxerox_mfp_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=xerox_mfp
- nodist_libsane_xerox_mfp_la_SOURCES = xerox_mfp-s.c
- libsane_xerox_mfp_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=xerox_mfp
- libsane_xerox_mfp_la_LDFLAGS = $(DIST_SANELIBS_LDFLAGS)
--libsane_xerox_mfp_la_LIBADD = $(COMMON_LIBS) libxerox_mfp.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo sane_strstatus.lo @SANEI_SANEI_JPEG_LO@ $(JPEG_LIBS) ../sanei/sanei_usb.lo ../sanei/sanei_tcp.lo $(MATH_LIB) $(SOCKET_LIBS) $(USB_LIBS) $(RESMGR_LIBS)
-+libsane_xerox_mfp_la_LIBADD = $(COMMON_LIBS) libxerox_mfp.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_tcp.lo $(MATH_LIB) $(SOCKET_LIBS) $(USB_LIBS) $(RESMGR_LIBS)
- EXTRA_DIST += xerox_mfp.conf.in
-
- libdll_preload_la_SOURCES = dll.c
-diff --git a/backend/Makefile.in b/backend/Makefile.in
-index d1dca4a2..2643bb77 100644
---- a/backend/Makefile.in
-+++ b/backend/Makefile.in
-@@ -1430,10 +1430,9 @@ libsane_v4l_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
- libsane_xerox_mfp_la_DEPENDENCIES = $(COMMON_LIBS) libxerox_mfp.la \
- ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo \
- ../sanei/sanei_config.lo sane_strstatus.lo \
-- $(am__DEPENDENCIES_1) ../sanei/sanei_usb.lo \
-- ../sanei/sanei_tcp.lo $(am__DEPENDENCIES_1) \
-+ ../sanei/sanei_usb.lo ../sanei/sanei_tcp.lo \
- $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-- $(am__DEPENDENCIES_1)
-+ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
- nodist_libsane_xerox_mfp_la_OBJECTS = \
- libsane_xerox_mfp_la-xerox_mfp-s.lo
- libsane_xerox_mfp_la_OBJECTS = $(nodist_libsane_xerox_mfp_la_OBJECTS)
-@@ -2754,7 +2753,7 @@ libxerox_mfp_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=xerox_mfp
- nodist_libsane_xerox_mfp_la_SOURCES = xerox_mfp-s.c
- libsane_xerox_mfp_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=xerox_mfp
- libsane_xerox_mfp_la_LDFLAGS = $(DIST_SANELIBS_LDFLAGS)
--libsane_xerox_mfp_la_LIBADD = $(COMMON_LIBS) libxerox_mfp.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo sane_strstatus.lo @SANEI_SANEI_JPEG_LO@ $(JPEG_LIBS) ../sanei/sanei_usb.lo ../sanei/sanei_tcp.lo $(MATH_LIB) $(SOCKET_LIBS) $(USB_LIBS) $(RESMGR_LIBS)
-+libsane_xerox_mfp_la_LIBADD = $(COMMON_LIBS) libxerox_mfp.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo sane_strstatus.lo ../sanei/sanei_usb.lo ../sanei/sanei_tcp.lo $(MATH_LIB) $(SOCKET_LIBS) $(USB_LIBS) $(RESMGR_LIBS)
- libdll_preload_la_SOURCES = dll.c
- libdll_preload_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=dll -DENABLE_PRELOAD
- libdll_la_SOURCES = dll.c
-diff --git a/backend/xerox_mfp.c b/backend/xerox_mfp.c
-index 8b8c8956..d37a6237 100644
---- a/backend/xerox_mfp.c
-+++ b/backend/xerox_mfp.c
-@@ -33,9 +33,6 @@
- #include "../include/sane/sanei_usb.h"
- #include "../include/sane/sanei_config.h"
- #include "../include/sane/sanei_backend.h"
--#ifdef HAVE_LIBJPEG
--#include <jpeglib.h>
--#endif
- #include "xerox_mfp.h"
-
- #define BACKEND_BUILD 13
-@@ -93,128 +90,6 @@ static char *str_cmd(int cmd)
- }
-
- #define MAX_DUMP 70
--const char *encTmpFileName = "/tmp/stmp_enc.tmp";
--
--static int decompress(struct device __sane_unused__ *dev,
-- const char __sane_unused__ *infilename)
--{
--#ifdef HAVE_LIBJPEG
-- int rc;
-- int row_stride, width, height, pixel_size;
-- struct jpeg_decompress_struct cinfo;
-- struct jpeg_error_mgr jerr;
-- unsigned long bmp_size = 0;
-- FILE *pInfile = NULL;
-- JSAMPARRAY buffer;
--
-- if ((pInfile = fopen(infilename, "rb")) == NULL) {
-- fprintf(stderr, "can't open %s\n", infilename);
-- return -1;
-- }
--
-- cinfo.err = jpeg_std_error(&jerr);
--
-- jpeg_create_decompress(&cinfo);
--
-- jpeg_stdio_src(&cinfo, pInfile);
--
-- rc = jpeg_read_header(&cinfo, TRUE);
-- if (rc != 1) {
-- jpeg_destroy_decompress(&cinfo);
-- fclose(pInfile);
-- return -1;
-- }
--
-- jpeg_start_decompress(&cinfo);
--
-- width = cinfo.output_width;
-- height = cinfo.output_height;
-- pixel_size = cinfo.output_components;
-- bmp_size = width * height * pixel_size;
-- dev->decDataSize = bmp_size;
--
-- row_stride = width * pixel_size;
--
-- buffer = (*cinfo.mem->alloc_sarray)
-- ((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1);
--
-- while (cinfo.output_scanline < cinfo.output_height) {
-- buffer[0] = dev->decData + \
-- (cinfo.output_scanline) * row_stride;
-- jpeg_read_scanlines(&cinfo, buffer, 1);
-- }
-- jpeg_finish_decompress(&cinfo);
-- jpeg_destroy_decompress(&cinfo);
-- fclose(pInfile);
-- return 0;
--#else
-- return -1;
--#endif
--}
--
--static int copy_decompress_data(struct device *dev, unsigned char *pDest, int maxlen, int *destLen)
--{
-- int data_size = 0;
-- size_t result = 0, retVal = 0;
--
--
-- if (0 == dev->decDataSize) {
-- *destLen = 0;
-- return retVal;
-- }
-- data_size = dev->decDataSize - dev->currentDecDataIndex;
-- if (data_size > maxlen) {
-- data_size = maxlen;
-- }
-- memcpy(pDest, dev->decData+dev->currentDecDataIndex, data_size);
-- result = data_size;
-- *destLen = result;
-- dev->currentDecDataIndex += result;
-- retVal = result;
--
-- if (dev->decDataSize == dev->currentDecDataIndex) {
-- dev->currentDecDataIndex = 0;
-- dev->decDataSize = 0;
-- }
--
-- return retVal;
--}
--
--static int decompress_tempfile(struct device *dev)
--{
-- decompress(dev, encTmpFileName);
-- remove(encTmpFileName);
-- return 0;
--}
--
--static int dump_to_tmp_file(struct device *dev)
--{
-- unsigned char *pSrc = dev->data;
-- int srcLen = dev->datalen;
-- FILE *pInfile;
-- if ((pInfile = fopen(encTmpFileName, "a")) == NULL) {
-- fprintf(stderr, "can't open %s\n", encTmpFileName);
-- return 0;
-- }
--
-- fwrite(pSrc, 1, srcLen, pInfile);
-- fclose(pInfile);
-- return srcLen;
--}
--
--static int isSupportedDevice(struct device __sane_unused__ *dev)
--{
--#ifdef HAVE_LIBJPEG
-- /* Checking device which supports JPEG Lossy compression for color scanning*/
-- if (dev->compressionTypes & (1 << 6))
-- return 1;
-- else
-- return 0;
--#else
-- return 0;
--#endif
--}
--
- static void dbg_dump(struct device *dev)
- {
- int i;
-@@ -639,11 +514,9 @@ static void set_parameters(struct device *dev)
- dev->para.pixels_per_line = dev->win_width / px_to_len;
- dev->para.bytes_per_line = dev->para.pixels_per_line;
-
-- if (!isSupportedDevice(dev)) {
- #if BETTER_BASEDPI
-- px_to_len = 1213.9 / dev->val[OPT_RESOLUTION].w;
-+ px_to_len = 1213.9 / dev->val[OPT_RESOLUTION].w;
- #endif
-- }
- dev->para.lines = dev->win_len / px_to_len;
- if (dev->composition == MODE_LINEART ||
- dev->composition == MODE_HALFTONE) {
-@@ -765,13 +638,6 @@ static int dev_set_window(struct device *dev)
- cmd[0x11] = (SANE_Byte)floor(dev->win_off_y);
- cmd[0x12] = (SANE_Byte)((dev->win_off_y - floor(dev->win_off_y)) * 100);
- cmd[0x13] = dev->composition;
-- /* Set to JPEG Lossy Compression, if mode is color (only for supported model)...
-- * else go with Uncompressed (For backard compatibility with old models )*/
-- if (dev->composition == MODE_RGB24) {
-- if (isSupportedDevice(dev)) {
-- cmd[0x14] = 0x6;
-- }
-- }
- cmd[0x16] = dev->threshold;
- cmd[0x17] = dev->doc_source;
-
-@@ -843,7 +709,6 @@ dev_inquiry(struct device *dev)
- dev->res[0x3e] << 8 |
- dev->res[0x3f];
- dev->line_order = dev->res[0x31];
-- dev->compressionTypes = dev->res[0x32];
- dev->doc_loaded = (dev->res[0x35] == 0x02) &&
- (dev->res[0x26] & 0x03);
-
-@@ -942,10 +807,6 @@ dev_free(struct device *dev)
- free(UNCONST(dev->sane.type));
- if (dev->data)
- free(dev->data);
-- if (dev->decData) {
-- free(dev->decData);
-- dev->decData = NULL;
-- }
- memset(dev, 0, sizeof(*dev));
- free(dev);
- }
-@@ -1283,19 +1144,6 @@ sane_read(SANE_Handle h, SANE_Byte *buf, SANE_Int maxlen, SANE_Int *lenp)
- /* if there is no data to read or output from buffer */
- if (!dev->blocklen && dev->datalen <= PADDING_SIZE) {
-
-- /* copying uncompressed data */
-- if (dev->composition == MODE_RGB24 &&
-- isSupportedDevice(dev) &&
-- dev->decDataSize > 0) {
-- int diff = dev->total_img_size - dev->total_out_size;
-- int bufLen = (diff < maxlen) ? diff : maxlen;
-- if (0 < diff &&
-- 0 < copy_decompress_data(dev, buf, bufLen, lenp)) {
-- dev->total_out_size += *lenp;
-- return SANE_STATUS_GOOD;
-- }
-- }
--
- /* and we don't need to acquire next block */
- if (dev->final_block) {
- int slack = dev->total_img_size - dev->total_out_size;
-@@ -1311,10 +1159,7 @@ sane_read(SANE_Handle h, SANE_Byte *buf, SANE_Int maxlen, SANE_Int *lenp)
- /* this will never happen */
- DBG(1, "image overflow %d bytes\n", dev->total_img_size - dev->total_out_size);
- }
-- if (isSupportedDevice(dev) &&
-- dev->composition == MODE_RGB24) {
-- remove(encTmpFileName);
-- }
-+
- /* that's all */
- dev_stop(dev);
- return SANE_STATUS_EOF;
-@@ -1365,18 +1210,9 @@ sane_read(SANE_Handle h, SANE_Byte *buf, SANE_Int maxlen, SANE_Int *lenp)
-
- if (buf && lenp) { /* read mode */
- /* copy will do minimal of valid data */
-- if (dev->para.format == SANE_FRAME_RGB && dev->line_order) {
-- if (isSupportedDevice(dev)) {
-- clrlen = dump_to_tmp_file(dev);
-- /* decompress after reading entire block data*/
-- if (0 == dev->blocklen) {
-- decompress_tempfile(dev);
-- }
-- copy_decompress_data(dev, buf, maxlen, &olen);
-- } else {
-- clrlen = copy_mix_bands_trim(dev, buf, maxlen, &olen);
-- }
-- } else
-+ if (dev->para.format == SANE_FRAME_RGB && dev->line_order)
-+ clrlen = copy_mix_bands_trim(dev, buf, maxlen, &olen);
-+ else
- clrlen = copy_plain_trim(dev, buf, maxlen, &olen);
-
- dev->datalen -= clrlen;
-@@ -1455,9 +1291,6 @@ sane_start(SANE_Handle h)
- if (!dev->data && !(dev->data = malloc(DATASIZE)))
- return ret_cancel(dev, SANE_STATUS_NO_MEM);
-
-- if (!dev->decData && !(dev->decData = malloc(POST_DATASIZE)))
-- return ret_cancel(dev, SANE_STATUS_NO_MEM);
--
- if (!dev_acquire(dev))
- return dev->state;
-
-@@ -1479,22 +1312,6 @@ sane_start(SANE_Handle h)
-
- dev->total_img_size = dev->para.bytes_per_line * dev->para.lines;
-
-- if (isSupportedDevice(dev) &&
-- dev->composition == MODE_RGB24) {
-- int fd;
-- remove(encTmpFileName);
--
-- /* Precreate temporary file in exclusive mode. */
-- fd = open(encTmpFileName, O_CREAT|O_EXCL, 0600);
-- if (fd == -1) {
-- DBG(3, "%s: %p, can't create temporary file %s: %s\n", __func__,
-- (void *)dev, encTmpFileName, strerror(errno));
-- return ret_cancel(dev, SANE_STATUS_ACCESS_DENIED);
-- }
-- close(fd);
-- }
-- dev->currentDecDataIndex = 0;
--
- return SANE_STATUS_GOOD;
- }
-
-diff --git a/backend/xerox_mfp.h b/backend/xerox_mfp.h
-index 3d93f06d..ea89dda2 100644
---- a/backend/xerox_mfp.h
-+++ b/backend/xerox_mfp.h
-@@ -74,10 +74,6 @@ struct device {
- #define DATATAIL(dev) ((dev->dataoff + dev->datalen) & DATAMASK)
- #define DATAROOM(dev) dataroom(dev)
-
--#define POST_DATASIZE 0xFFFFFF
-- SANE_Byte *decData;
-- int decDataSize;
-- int currentDecDataIndex;
- /* data from CMD_INQUIRY: */
- int resolutions; /* supported resolution bitmask */
- int compositions; /* supported image compositions bitmask */
-@@ -102,7 +98,6 @@ struct device {
- int composition; /* MODE_ */
- int doc_source; /* document source */
- int threshold; /* brightness */
-- int compressionTypes;
-
- /* CMD_READ data. It is per block only, image could be in many blocks */
- int blocklen; /* image data block len (padding incl.) */
-diff --git a/doc/descriptions/xerox_mfp.desc b/doc/descriptions/xerox_mfp.desc
-index d21a6be6..67253b38 100644
---- a/doc/descriptions/xerox_mfp.desc
-+++ b/doc/descriptions/xerox_mfp.desc
-@@ -320,7 +320,7 @@
-
- :model "SCX-3405W"
- :interface "Ethernet"
--:status :good
-+:status :basic
-
- :model "SCX-3400"
- :interface "USB"
-@@ -335,17 +335,17 @@
- :model "SCX-4729FD"
- :interface "USB"
- :usbid "0x04e8" "0x3453"
--:status :good
-+:status :basic
-
- :model "CLX-6260"
- :interface "USB"
- :usbid "0x04e8" "0x3455"
--:status :good
-+:status :minimal
-
- :model "CLX-3300 Series"
- :interface "USB"
- :usbid "0x04e8" "0x3456"
--:status :good
-+:status :basic
-
- :model "SCX-470x"
- :interface "USB"
-@@ -355,7 +355,7 @@
- :model "CLX-4190"
- :interface "USB"
- :usbid "0x04e8" "0x345a"
--:status :good
-+:status :minimal
-
- :model "SCX-4650 4x21S Series"
- :interface "USB"
---
-2.17.0
-
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.27-uninitialized-variable.patch b/media-gfx/sane-backends/files/sane-backends-1.0.27-uninitialized-variable.patch
deleted file mode 100644
index 0311975c0ce..00000000000
--- a/media-gfx/sane-backends/files/sane-backends-1.0.27-uninitialized-variable.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From dd61ef1cc84299781e382b9258d97102cee192b4 Mon Sep 17 00:00:00 2001
-From: Olaf Meeuwissen <paddy-hack@member.fsf.org>
-Date: Thu, 3 Aug 2017 18:50:05 +0900
-Subject: [PATCH] genesys: Fix use of uninitialized variable
-
-See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=869673
----
- backend/genesys.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/backend/genesys.c b/backend/genesys.c
-index 1c1bbf4..0b644c4 100644
---- a/backend/genesys.c
-+++ b/backend/genesys.c
-@@ -6237,6 +6237,7 @@ attach (SANE_String_Const devname, Genesys_Device ** devp, SANE_Bool may_wait)
- dev->model = genesys_usb_device_list[i].model;
- dev->vendorId = genesys_usb_device_list[i].vendor;
- dev->productId = genesys_usb_device_list[i].product;
-+ dev->usb_mode = 0; /* i.e. unset */
- dev->already_initialized = SANE_FALSE;
-
- DBG (DBG_info, "attach: found %s flatbed scanner %s at %s\n",
---
-2.1.4
-
diff --git a/media-gfx/sane-backends/sane-backends-1.0.27-r3.ebuild b/media-gfx/sane-backends/sane-backends-1.0.27-r3.ebuild
deleted file mode 100644
index 3470233904f..00000000000
--- a/media-gfx/sane-backends/sane-backends-1.0.27-r3.ebuild
+++ /dev/null
@@ -1,344 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-inherit eutils flag-o-matic multilib-minimal systemd toolchain-funcs udev user
-
-# gphoto and v4l are handled by their usual USE flags.
-# The pint backend was disabled because I could not get it to compile.
-IUSE_SANE_BACKENDS="
- abaton
- agfafocus
- apple
- artec
- artec_eplus48u
- as6e
- avision
- bh
- canon
- canon630u
- canon_dr
- canon_pp
- cardscan
- coolscan
- coolscan2
- coolscan3
- dc210
- dc240
- dc25
- dell1600n_net
- dmc
- epjitsu
- epson
- epson2
- fujitsu
- genesys
- gt68xx
- hp
- hp3500
- hp3900
- hp4200
- hp5400
- hp5590
- hpljm1005
- hpsj5s
- hs2p
- ibm
- kodak
- kodakaio
- kvs1025
- kvs20xx
- kvs40xx
- leo
- lexmark
- ma1509
- magicolor
- matsushita
- microtek
- microtek2
- mustek
- mustek_pp
- mustek_usb
- mustek_usb2
- nec
- net
- niash
- p5
- pie
- pixma
- plustek
- plustek_pp
- pnm
- qcam
- ricoh
- rts8891
- s9036
- sceptre
- sharp
- sm3600
- sm3840
- snapscan
- sp15c
- st400
- stv680
- tamarack
- teco1
- teco2
- teco3
- test
- u12
- umax
- umax1220u
- umax_pp
- xerox_mfp"
-
-IUSE="gphoto2 ipv6 snmp systemd threads usb v4l xinetd zeroconf"
-
-for backend in ${IUSE_SANE_BACKENDS}; do
- case ${backend} in
- # Disable backends that require parallel ports as no one has those anymore.
- canon_pp|hpsj5s|mustek_pp|\
- pnm)
- IUSE+=" -sane_backends_${backend}"
- ;;
- mustek_usb2|kvs40xx)
- IUSE+=" sane_backends_${backend}"
- ;;
- *)
- IUSE+=" +sane_backends_${backend}"
- esac
-done
-
-REQUIRED_USE="
- sane_backends_mustek_usb2? ( threads )
- sane_backends_kvs40xx? ( threads )
-"
-
-DESCRIPTION="Scanner Access Now Easy - Backends"
-HOMEPAGE="http://www.sane-project.org/"
-MY_P="${P}"
-FRS_ID="4224"
-SRC_URI="https://alioth.debian.org/frs/download.php/file/${FRS_ID}/${P}.tar.gz"
-
-LICENSE="GPL-2 public-domain"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux"
-
-RDEPEND="
- sane_backends_dc210? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] )
- sane_backends_dc240? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] )
- sane_backends_dell1600n_net? (
- >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}]
- >=media-libs/tiff-3.9.7-r1:0=[${MULTILIB_USEDEP}]
- )
- sane_backends_canon_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
- sane_backends_hpsj5s? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
- sane_backends_mustek_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
- usb? ( >=virtual/libusb-1-r1:1=[${MULTILIB_USEDEP}] )
- gphoto2? (
- >=media-libs/libgphoto2-2.5.3.1:=[${MULTILIB_USEDEP}]
- >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}]
- )
- v4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] )
- xinetd? ( sys-apps/xinetd )
- snmp? ( net-analyzer/net-snmp:0= )
- systemd? ( sys-apps/systemd:0= )
- zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] )
-"
-
-DEPEND="${RDEPEND}
- v4l? ( sys-kernel/linux-headers )
- >=sys-devel/gettext-0.18.1
- virtual/pkgconfig
-"
-
-MULTILIB_CHOST_TOOLS=(
- /usr/bin/sane-config
-)
-
-pkg_setup() {
- enewgroup scanner
- enewuser saned -1 -1 -1 scanner
-}
-
-src_prepare() {
- default
-
- cat >> backend/dll.conf.in <<-EOF
- # Add support for the HP-specific backend. Needs net-print/hplip installed.
- hpaio
- # Add support for the Epson-specific backend. Needs media-gfx/iscan installed.
- epkowa
- EOF
-
- eapply "${FILESDIR}"/${PN}-1.0.24-saned_pidfile_location.patch
- eapply "${FILESDIR}"/${PN}-1.0.27-disable-usb-tests.patch
-
- # From Arch
- eapply "${FILESDIR}"/${PN}-1.0.27-network.patch
-
- # From Fedora
- # Fix https://bugs.gentoo.org/635348
- eapply "${FILESDIR}"/${PN}-1.0.27-canon-lide-100.patch
- # Fix https://bugs.gentoo.org/653300
- eapply "${FILESDIR}"/${PN}-1.0.27-revert-samsung.patch
-
- # From Debian
- eapply "${FILESDIR}"/${PN}-1.0.27-uninitialized-variable.patch
-
- # Fix for "make check". Upstream sometimes forgets to update this.
- local ver=$(./configure --version | awk '{print $NF; exit 0}')
- sed -i \
- -e "/by sane-desc 3.5 from sane-backends/s:sane-backends .*:sane-backends ${ver}:" \
- testsuite/tools/data/html* || die
-}
-
-src_configure() {
- append-flags -fno-strict-aliasing # From Fedora
-
- # if LINGUAS is set, just use the listed and supported localizations.
- if [[ ${LINGUAS+set} == "set" ]]; then
- mkdir -p po || die
- strip-linguas -u po
- printf '%s\n' ${LINGUAS} > po/LINGUAS
- fi
-
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- # the blank is intended - an empty string would result in building ALL backends.
- local BACKENDS=" "
-
- use gphoto2 && BACKENDS="gphoto2"
- use v4l && BACKENDS="${BACKENDS} v4l"
- for backend in ${IUSE_SANE_BACKENDS}; do
- if use "sane_backends_${backend}" && [ ${backend} != pnm ]; then
- BACKENDS="${BACKENDS} ${backend}"
- fi
- done
-
- local myconf=(
- $(use_with usb)
- $(multilib_native_use_with snmp)
- )
-
- # you can only enable this backend, not disable it...
- if use sane_backends_pnm; then
- myconf+=( --enable-pnm-backend )
- fi
- if use sane_backends_mustek_pp; then
- myconf+=( --enable-parport-directio )
- fi
- if ! { use sane_backends_canon_pp || use sane_backends_hpsj5s || use sane_backends_mustek_pp; }; then
- myconf+=( sane_cv_use_libieee1284=no )
- fi
-
- # relative path must be used for tests to work properly
- # All distributions pass --disable-locking because /var/lock/sane/ would be a world-writable directory
- # --without-api-spec to not automagically depend on tons of stuff
- # that break in many ways, bug #636202, #668232, #668350
- # People can refer to the "Programmer's Documentation" at http://www.sane-project.org/docs.html
- ECONF_SOURCE=${S} \
- SANEI_JPEG="sanei_jpeg.o" SANEI_JPEG_LO="sanei_jpeg.lo" \
- BACKENDS="${BACKENDS}" \
- econf \
- --disable-locking \
- --without-api-spec \
- $(use_with gphoto2) \
- $(multilib_native_use_with systemd) \
- $(use_with v4l) \
- $(use_enable ipv6) \
- $(use_enable threads pthread) \
- $(use_enable zeroconf avahi) \
- "${myconf[@]}"
-}
-
-multilib_src_compile() {
- emake VARTEXFONTS="${T}/fonts"
-
- if tc-is-cross-compiler; then
- pushd "${BUILD_DIR}"/tools >/dev/null || die
-
- # The build system sucks and doesn't handle this properly.
- # https://alioth.debian.org/tracker/index.php?func=detail&aid=314236&group_id=30186&atid=410366
- tc-export_build_env BUILD_CC
- ${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
- -I. -I../include -I"${S}"/include \
- "${S}"/sanei/sanei_config.c "${S}"/sanei/sanei_constrain_value.c \
- "${S}"/sanei/sanei_init_debug.c "${S}"/tools/sane-desc.c -o sane-desc || die
- local dirs=( hal hotplug hotplug-ng udev )
- local targets=(
- hal/libsane.fdi
- hotplug/libsane.usermap
- hotplug-ng/libsane.db
- udev/libsane.rules
- )
- mkdir -p "${dirs[@]}" || die
- emake "${targets[@]}"
-
- popd >/dev/null
- fi
-
- if use usb; then
- sed -i -e '/^$/d' \
- tools/hotplug/libsane.usermap || die
- fi
-}
-
-multilib_src_install() {
- emake INSTALL_LOCKPATH="" DESTDIR="${D}" install \
- docdir="${EPREFIX}"/usr/share/doc/${PF}
-
- if multilib_is_native_abi; then
- if use usb; then
- insinto /etc/hotplug/usb
- doins tools/hotplug/libsane.usermap
- fi
-
- udev_newrules tools/udev/libsane.rules 41-libsane.rules
- insinto "/usr/share/pkgconfig"
- doins tools/sane-backends.pc
- fi
-}
-
-multilib_src_install_all() {
- keepdir /var/lib/lock/sane
- fowners root:scanner /var/lib/lock/sane
- fperms g+w /var/lib/lock/sane
- dodir /etc/env.d
-
- if use systemd; then
- systemd_newunit "${FILESDIR}"/saned_at.service "saned@.service"
- systemd_newunit "${FILESDIR}"/saned.socket saned.socket
- fi
-
- if use usb; then
- exeinto /etc/hotplug/usb
- doexe tools/hotplug/libusbscanner
- newdoc tools/hotplug/README README.hotplug
- fi
-
- dodoc NEWS AUTHORS ChangeLog* PROBLEMS README README.linux
- find "${D}" -name '*.la' -delete || die
-
- if use xinetd; then
- insinto /etc/xinetd.d
- doins "${FILESDIR}"/saned
- fi
-
- newinitd "${FILESDIR}"/saned.initd saned
- newconfd "${FILESDIR}"/saned.confd saned
-}
-
-pkg_postinst() {
- if use xinetd; then
- elog "If you want remote clients to connect, edit"
- elog "/etc/sane.d/saned.conf and /etc/hosts.allow"
- fi
-
- if ! use systemd; then
- elog "If you are using a USB scanner, add all users who want"
- elog "to access your scanner to the \"scanner\" group."
- fi
-}
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/sane-backends/, media-gfx/sane-backends/files/
@ 2022-01-29 8:42 Pacho Ramos
0 siblings, 0 replies; 10+ messages in thread
From: Pacho Ramos @ 2022-01-29 8:42 UTC (permalink / raw
To: gentoo-commits
commit: 2d6b57e2a291f675341c026a67e452db1ea15227
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 29 08:42:23 2022 +0000
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sat Jan 29 08:42:23 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d6b57e2
media-gfx/sane-backends: Fix crash in genesys driver
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
.../sane-backends-1.1.1-genesys-gl845-crash.patch | 12 +
.../sane-backends/sane-backends-1.1.1-r2.ebuild | 365 +++++++++++++++++++++
2 files changed, 377 insertions(+)
diff --git a/media-gfx/sane-backends/files/sane-backends-1.1.1-genesys-gl845-crash.patch b/media-gfx/sane-backends/files/sane-backends-1.1.1-genesys-gl845-crash.patch
new file mode 100644
index 000000000000..f63a8e2100b9
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backends-1.1.1-genesys-gl845-crash.patch
@@ -0,0 +1,12 @@
+diff --git a/backend/genesys/genesys.cpp b/backend/genesys/genesys.cpp
+index 9552fa9..c95de7b 100644
+--- a/backend/genesys/genesys.cpp
++++ b/backend/genesys/genesys.cpp
+@@ -367,6 +367,7 @@ void sanei_genesys_create_default_gamma_table(Genesys_Device* dev,
+ }
+ max = size - 1;
+ } else if (dev->model->asic_type == AsicType::GL124 ||
++ dev->model->asic_type == AsicType::GL845 ||
+ dev->model->asic_type == AsicType::GL846 ||
+ dev->model->asic_type == AsicType::GL847) {
+ size = 257;
diff --git a/media-gfx/sane-backends/sane-backends-1.1.1-r2.ebuild b/media-gfx/sane-backends/sane-backends-1.1.1-r2.ebuild
new file mode 100644
index 000000000000..010ba000e55f
--- /dev/null
+++ b/media-gfx/sane-backends/sane-backends-1.1.1-r2.ebuild
@@ -0,0 +1,365 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+# python-any-r1 required for a script in
+# backends/pixma/scripts/
+inherit autotools flag-o-matic multilib-minimal optfeature python-any-r1 systemd toolchain-funcs udev
+
+# gphoto and v4l are handled by their usual USE flags.
+# The pint backend was disabled because I could not get it to compile.
+IUSE_SANE_BACKENDS=(
+ abaton
+ agfafocus
+ apple
+ artec
+ artec_eplus48u
+ as6e
+ avision
+ bh
+ canon
+ canon630u
+ canon_dr
+ canon_lide70
+ canon_pp
+ cardscan
+ coolscan
+ coolscan2
+ coolscan3
+ dc210
+ dc240
+ dc25
+ dell1600n_net
+ dmc
+ epjitsu
+ epson
+ epson2
+ escl
+ fujitsu
+ genesys
+ gt68xx
+ hp
+ hp3500
+ hp3900
+ hp4200
+ hp5400
+ hp5590
+ hpljm1005
+ hpsj5s
+ hs2p
+ ibm
+ kodak
+ kodakaio
+ kvs1025
+ kvs20xx
+ kvs40xx
+ leo
+ lexmark
+ ma1509
+ magicolor
+ matsushita
+ microtek
+ microtek2
+ mustek
+ mustek_pp
+ mustek_usb
+ mustek_usb2
+ nec
+ net
+ niash
+ p5
+ pie
+ pieusb
+ pixma
+ plustek
+ plustek_pp
+ pnm
+ qcam
+ ricoh
+ ricoh2
+ rts8891
+ s9036
+ sceptre
+ sharp
+ sm3600
+ sm3840
+ snapscan
+ sp15c
+ st400
+ stv680
+ tamarack
+ teco1
+ teco2
+ teco3
+ test
+ u12
+ umax
+ umax1220u
+ umax_pp
+ xerox_mfp
+)
+
+IUSE="gphoto2 ipv6 snmp systemd threads usb v4l xinetd +zeroconf"
+
+for GBACKEND in ${IUSE_SANE_BACKENDS[@]}; do
+ case ${GBACKEND} in
+ # Disable backends that require parallel ports as no one has those anymore.
+ canon_pp|hpsj5s|mustek_pp|\
+ pnm|mustek_usb2|kvs40xx)
+ IUSE+=" sane_backends_${GBACKEND}"
+ ;;
+ *)
+ IUSE+=" +sane_backends_${GBACKEND}"
+ esac
+done
+
+REQUIRED_USE="
+ sane_backends_escl? ( zeroconf )
+ sane_backends_kvs40xx? ( threads )
+ sane_backends_mustek_usb2? ( threads )
+"
+
+DESCRIPTION="Scanner Access Now Easy - Backends"
+HOMEPAGE="http://www.sane-project.org/"
+SRC_URI="https://gitlab.com/sane-project/backends/uploads/7d30fab4e115029d91027b6a58d64b43/${P}.tar.gz"
+
+LICENSE="GPL-2 public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+# For pixma: see https://gitlab.com/sane-project/backends/-/releases/1.0.28#build
+RDEPEND="
+ acct-user/saned
+ gphoto2? (
+ >=media-libs/libgphoto2-2.5.3.1:=[${MULTILIB_USEDEP}]
+ >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}]
+ )
+ sane_backends_canon_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
+ sane_backends_dc210? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] )
+ sane_backends_dc240? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] )
+ sane_backends_dell1600n_net? (
+ >=media-libs/tiff-3.9.7-r1:0=[${MULTILIB_USEDEP}]
+ >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}]
+ )
+ sane_backends_escl? (
+ app-text/poppler[cairo]
+ || (
+ net-dns/avahi[dbus]
+ net-dns/avahi[gtk]
+ )
+ net-dns/avahi[${MULTILIB_USEDEP}]
+ net-misc/curl[${MULTILIB_USEDEP}]
+ )
+ sane_backends_hpsj5s? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
+ sane_backends_mustek_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
+ sane_backends_pixma? ( >=virtual/jpeg-0-r2:0=[${MULTILIB_USEDEP}] )
+ snmp? ( net-analyzer/net-snmp:0= )
+ systemd? ( sys-apps/systemd:0= )
+ usb? ( >=virtual/libusb-1-r1:1=[${MULTILIB_USEDEP}] )
+ v4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] )
+ xinetd? ( sys-apps/xinetd )
+ zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] )
+"
+
+DEPEND="${RDEPEND}
+ dev-libs/libxml2
+ v4l? ( sys-kernel/linux-headers )
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ sys-devel/autoconf-archive
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.0.24-saned_pidfile_location.patch
+ "${FILESDIR}"/${PN}-1.0.27-disable-usb-tests.patch
+ "${FILESDIR}"/${PN}-1.0.30-add_hpaio_epkowa_dll.conf.patch
+ # https://gitlab.com/sane-project/backends/-/merge_requests/688
+ "${FILESDIR}"/${PN}-1.1.1-genesys-gl845-crash.patch
+)
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/sane-config
+)
+
+src_prepare() {
+ default
+
+ # Patch out the git reference so we can run eautoreconf
+ sed \
+ -e "s/m4_esyscmd_s(\[git describe --dirty\])/${PV}/" \
+ -e '/^AM_MAINTAINER_MODE/d' \
+ -i configure.ac || die
+ eautoreconf
+
+ # Fix for "make check". Upstream sometimes forgets to update this.
+ local ver=$(./configure --version | awk '{print $NF; exit 0}')
+ sed -i \
+ -e "/by sane-desc 3.5 from sane-backends/s:sane-backends .*:sane-backends ${ver}:" \
+ testsuite/tools/data/html* || die
+
+ # don't bleed user LDFLAGS into pkgconfig files
+ sed 's|@LDFLAGS@ ||' -i tools/*.pc.in || die
+
+ # Needed for udev rules generation/installation
+ multilib_copy_sources
+}
+
+src_configure() {
+ # From Fedora
+ append-flags -fno-strict-aliasing
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ # the blank is intended - an empty string would result in building ALL backends.
+ local lbackends=" "
+
+ use gphoto2 && lbackends="gphoto2"
+ use v4l && lbackends+=" v4l"
+ use sane_backends_escl && multilib_is_native_abi && lbackends+=" escl"
+ local backend
+ for backend in ${IUSE_SANE_BACKENDS[@]} ; do
+ if use "sane_backends_${backend}" && [[ "${backend}" != pnm ]] && [[ "${backend}" != escl ]] ; then
+ lbackends+=" ${backend}"
+ fi
+ done
+
+ local myconf=(
+ $(use_with usb)
+ $(multilib_native_use_with snmp)
+
+ $(multilib_native_use_with sane_backends_escl poppler-glib)
+ # you can only enable this backend, not disable it...
+ $(usex sane_backends_pnm --enable-pnm-backend '')
+ $(usex sane_backends_mustek_pp --enable-parport-directio '')
+ )
+
+ if ! { use sane_backends_canon_pp || use sane_backends_hpsj5s || use sane_backends_mustek_pp ; } ; then
+ myconf+=( sane_cv_use_libieee1284=no )
+ fi
+
+ # relative path must be used for tests to work properly
+ # All distributions pass --disable-locking because /var/lock/sane/ would be a world-writable directory
+ # that break in many ways, bug #636202, #668232, #668350
+ # People can refer to the "Programmer's Documentation" at http://www.sane-project.org/docs.html
+ myconf+=(
+ --disable-locking
+ $(use_with gphoto2)
+ $(multilib_native_use_with systemd)
+ $(use_with v4l)
+ $(use_enable ipv6)
+ $(use_enable threads pthread)
+ $(use_with zeroconf avahi)
+ )
+ ECONF_SOURCE="${S}" \
+ SANEI_JPEG="sanei_jpeg.o" SANEI_JPEG_LO="sanei_jpeg.lo" \
+ BACKENDS="${lbackends}" \
+ econf "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ emake VARTEXFONTS="${T}/fonts"
+
+ if tc-is-cross-compiler ; then
+ pushd "${BUILD_DIR}"/tools >/dev/null || die
+
+ # The build system sucks and doesn't handle this properly.
+ # https://alioth.debian.org/tracker/index.php?func=detail&aid=314236&group_id=30186&atid=410366
+ tc-export_build_env BUILD_CC
+ ${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
+ -I. -I../include -I"${S}"/include \
+ "${S}"/sanei/sanei_config.c "${S}"/sanei/sanei_constrain_value.c \
+ "${S}"/sanei/sanei_init_debug.c "${S}"/tools/sane-desc.c -o sane-desc || die
+ local dirs=( hal hotplug hotplug-ng udev )
+ local targets=(
+ hal/libsane.fdi
+ hotplug/libsane.usermap
+ hotplug-ng/libsane.db
+ udev/libsane.rules
+ )
+ mkdir -p "${dirs[@]}" || die
+ emake "${targets[@]}"
+
+ popd >/dev/null || die
+ fi
+
+ if use usb ; then
+ sed -i -e '/^$/d' \
+ tools/hotplug/libsane.usermap || die
+ fi
+}
+
+multilib_src_install() {
+ emake INSTALL_LOCKPATH="" DESTDIR="${D}" install \
+ docdir="${EPREFIX}"/usr/share/doc/${PF}
+
+ if multilib_is_native_abi ; then
+ if use usb ; then
+ insinto /etc/hotplug/usb
+ doins tools/hotplug/libsane.usermap
+ fi
+
+ insinto "/usr/share/pkgconfig"
+ doins tools/sane-backends.pc
+
+ # From Fedora and Arch, prevent permission conflicts
+ # https://github.com/OpenPrinting/cups/issues/314
+ # https://gitlab.com/sane-project/backends/-/issues/546
+ #
+ # Generate udev udev+hwdb, not needing scanner group
+ install -vdm 755 "${ED}/$(get_udevdir)/rules.d/" || die
+ tools/sane-desc -m udev+hwdb -s doc/descriptions/ > "${ED}/$(get_udevdir)/rules.d/65-${PN}.rules" || die
+ tools/sane-desc -m udev+hwdb -s doc/descriptions-external/ >> "${ED}/$(get_udevdir)/rules.d/65-${PN}.rules" || die
+ # generate udev hwdb
+ install -vdm 755 "${ED}/$(get_udevdir)/hwdb.d/" || die
+ tools/sane-desc -m hwdb -s doc/descriptions/ > "${ED}/$(get_udevdir)/hwdb.d/20-${PN}.hwdb"
+ # NOTE: an empty new line is required between the two .desc collections
+ printf "\n" >> "${ED}/$(get_udevdir)/hwdb.d/20-${PN}.hwdb" || die
+ tools/sane-desc -m hwdb -s doc/descriptions-external/ >> "${ED}/$(get_udevdir)/hwdb.d/20-${PN}.hwdb" || die
+ # udev rule for saned (SANE scanning daemon) to be able to write on usb port
+ udev_dorules "${FILESDIR}/66-saned.rules"
+ fi
+}
+
+multilib_src_install_all() {
+ dodir /etc/env.d
+
+ if use systemd ; then
+ systemd_newunit "${FILESDIR}"/saned_at.service "saned@.service"
+ systemd_newunit "${FILESDIR}"/saned.socket saned.socket
+ fi
+
+ if use usb ; then
+ exeinto /etc/hotplug/usb
+ doexe tools/hotplug/libusbscanner
+ newdoc tools/hotplug/README README.hotplug
+ fi
+
+ dodoc NEWS AUTHORS PROBLEMS README README.linux
+ find "${ED}" -name '*.la' -delete || die
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ doins "${FILESDIR}"/saned
+ fi
+
+ newinitd "${FILESDIR}"/saned.initd saned
+ newconfd "${FILESDIR}"/saned.confd saned
+}
+
+pkg_postinst() {
+ optfeature "Network scanner backend" media-gfx/sane-airscan
+ optfeature "Epson-specific backend" media-gfx/iscan
+ optfeature "HP-specific backend" net-print/hplip
+
+ if use xinetd ; then
+ elog "If you want remote clients to connect, edit"
+ elog "/etc/sane.d/saned.conf and /etc/hosts.allow"
+ fi
+}
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/sane-backends/, media-gfx/sane-backends/files/
@ 2022-11-04 4:19 Sam James
0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2022-11-04 4:19 UTC (permalink / raw
To: gentoo-commits
commit: 3865b4531959596959b487d84fd862e2aac4999f
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 4 04:17:27 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Nov 4 04:18:58 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3865b453
media-gfx/sane-backends: fix configure w/ clang 16; fix service file & udev
- Fix configure with Clang 16
- Fix saned_at.service user name (scanner->saned, as scanner is the group)
- Fix path to setfacl in udev rule (previous one assumed /usr merge)
- Fix group name in udev rule (saned->scanner)
- Call udev_reload in pkg_post{rm,inst}
Closes: https://bugs.gentoo.org/876772
Closes: https://bugs.gentoo.org/859619
Closes: https://bugs.gentoo.org/849590
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-gfx/sane-backends/files/66-saned.rules-r1 | 2 +
.../sane-backends-1.1.1-configure-clang16.patch | 43 +++
.../files/sane-backends-1.1.1-musl.patch | 34 ++
media-gfx/sane-backends/files/saned_at.service-r1 | 18 +
.../sane-backends/sane-backends-1.1.1-r5.ebuild | 376 +++++++++++++++++++++
5 files changed, 473 insertions(+)
diff --git a/media-gfx/sane-backends/files/66-saned.rules-r1 b/media-gfx/sane-backends/files/66-saned.rules-r1
new file mode 100644
index 000000000000..4e1fe9507eae
--- /dev/null
+++ b/media-gfx/sane-backends/files/66-saned.rules-r1
@@ -0,0 +1,2 @@
+# udev rule for saned (SANE scanning daemon) to be able to write on usb port
+ENV{libsane_matched}=="yes", ENV{DEVNAME}!="", RUN+="/bin/setfacl -m g:scanner:rw $env{DEVNAME}"
diff --git a/media-gfx/sane-backends/files/sane-backends-1.1.1-configure-clang16.patch b/media-gfx/sane-backends/files/sane-backends-1.1.1-configure-clang16.patch
new file mode 100644
index 000000000000..cc8a48b18b67
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backends-1.1.1-configure-clang16.patch
@@ -0,0 +1,43 @@
+https://gitlab.com/sane-project/backends/-/merge_requests/763
+
+From 300b460970f538ab515835f14650785e88808a8f Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Fri, 4 Nov 2022 04:04:46 +0000
+Subject: [PATCH] acinclude.m4: fix -Wimplicit-function-declaration
+
+-Wimplicit-function-declaration will become an error by default
+in Clang 16.
+
+Fixes errors like:
+```
+error: call to undeclared library function 'exit' with type 'void (int) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration]
+```
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -471,6 +471,7 @@ AC_DEFUN([SANE_CHECK_IPV6],
+ if test "$ipv6" != "no" ; then
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #define INET6
++ #include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/socket.h> ]], [[
+ /* AF_INET6 available check */
+@@ -492,6 +493,7 @@ AC_DEFUN([SANE_CHECK_IPV6],
+ AC_MSG_CHECKING([whether struct sockaddr_storage has an ss_family member])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #define INET6
++ #include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/socket.h> ]], [[
+ /* test if the ss_family member exists in struct sockaddr_storage */
+@@ -504,6 +506,7 @@ AC_DEFUN([SANE_CHECK_IPV6],
+ ], [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+ #define INET6
++ #include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/socket.h> ]], [[
+ /* test if the __ss_family member exists in struct sockaddr_storage */
+GitLab
diff --git a/media-gfx/sane-backends/files/sane-backends-1.1.1-musl.patch b/media-gfx/sane-backends/files/sane-backends-1.1.1-musl.patch
new file mode 100644
index 000000000000..8aebb50672a1
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backends-1.1.1-musl.patch
@@ -0,0 +1,34 @@
+https://gitlab.com/sane-project/backends/-/commit/12560890a6e298091bd63b8093a35604416eb92a
+
+From 12560890a6e298091bd63b8093a35604416eb92a Mon Sep 17 00:00:00 2001
+From: David Ward <david.ward@gatech.edu>
+Date: Thu, 21 Apr 2022 23:37:33 -0400
+Subject: [PATCH] Fix header file used for poll()
+
+POSIX specifies the header to include is <poll.h>, not <sys/poll.h>.
+This results in a compiler warning with musl libc (on Alpine Linux).
+--- a/configure.ac
++++ b/configure.ac
+@@ -202,7 +202,7 @@ AC_HEADER_STDC
+ AC_CHECK_HEADERS(fcntl.h unistd.h libc.h sys/dsreq.h sys/select.h \
+ sys/time.h sys/shm.h sys/ipc.h sys/scanio.h os2.h \
+ sys/socket.h sys/io.h sys/hw.h sys/types.h linux/ppdev.h \
+- dev/ppbus/ppi.h machine/cpufunc.h sys/sem.h sys/poll.h \
++ dev/ppbus/ppi.h machine/cpufunc.h sys/sem.h poll.h \
+ windows.h be/kernel/OS.h limits.h sys/ioctl.h asm/types.h\
+ netinet/in.h tiffio.h ifaddrs.h pwd.h getopt.h)
+ AC_CHECK_HEADERS([asm/io.h],,,[#include <sys/types.h>])
+--- a/frontend/saned.c
++++ b/frontend/saned.c
+@@ -84,8 +84,8 @@
+
+ #include "lgetopt.h"
+
+-#if defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL)
+-# include <sys/poll.h>
++#if defined(HAVE_POLL_H) && defined(HAVE_POLL)
++# include <poll.h>
+ #else
+ /*
+ * This replacement poll() using select() is only designed to cover
+GitLab
diff --git a/media-gfx/sane-backends/files/saned_at.service-r1 b/media-gfx/sane-backends/files/saned_at.service-r1
new file mode 100644
index 000000000000..b7d6179bba71
--- /dev/null
+++ b/media-gfx/sane-backends/files/saned_at.service-r1
@@ -0,0 +1,18 @@
+[Unit]
+Description=Scanner Service
+Requires=saned.socket
+
+[Service]
+ExecStart=/usr/sbin/saned
+User=saned
+Group=scanner
+StandardInput=null
+StandardOutput=syslog
+StandardError=syslog
+Environment=SANE_CONFIG_DIR=/etc/sane.d
+# If you need to debug your configuration uncomment the next line and
+# change it as appropriate to set the desired debug options
+# Environment=SANE_DEBUG_DLL=255 SANE_DEBUG_NET=255
+
+[Install]
+Also=saned.socket
diff --git a/media-gfx/sane-backends/sane-backends-1.1.1-r5.ebuild b/media-gfx/sane-backends/sane-backends-1.1.1-r5.ebuild
new file mode 100644
index 000000000000..77b5ec95218e
--- /dev/null
+++ b/media-gfx/sane-backends/sane-backends-1.1.1-r5.ebuild
@@ -0,0 +1,376 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+# python-any-r1 required for a script in
+# backends/pixma/scripts/
+inherit autotools flag-o-matic multilib-minimal optfeature python-any-r1 systemd toolchain-funcs udev
+
+# gphoto and v4l are handled by their usual USE flags.
+# The pint backend was disabled because I could not get it to compile.
+IUSE_SANE_BACKENDS=(
+ abaton
+ agfafocus
+ apple
+ artec
+ artec_eplus48u
+ as6e
+ avision
+ bh
+ canon
+ canon630u
+ canon_dr
+ canon_lide70
+ canon_pp
+ cardscan
+ coolscan
+ coolscan2
+ coolscan3
+ dc210
+ dc240
+ dc25
+ dell1600n_net
+ dmc
+ epjitsu
+ epson
+ epson2
+ epsonds
+ escl
+ fujitsu
+ genesys
+ gt68xx
+ hp
+ hp3500
+ hp3900
+ hp4200
+ hp5400
+ hp5590
+ hpljm1005
+ hpsj5s
+ hs2p
+ ibm
+ kodak
+ kodakaio
+ kvs1025
+ kvs20xx
+ kvs40xx
+ leo
+ lexmark
+ ma1509
+ magicolor
+ matsushita
+ microtek
+ microtek2
+ mustek
+ mustek_pp
+ mustek_usb
+ mustek_usb2
+ nec
+ net
+ niash
+ p5
+ pie
+ pieusb
+ pixma
+ plustek
+ plustek_pp
+ pnm
+ qcam
+ ricoh
+ ricoh2
+ rts8891
+ s9036
+ sceptre
+ sharp
+ sm3600
+ sm3840
+ snapscan
+ sp15c
+ st400
+ stv680
+ tamarack
+ teco1
+ teco2
+ teco3
+ test
+ u12
+ umax
+ umax1220u
+ umax_pp
+ xerox_mfp
+)
+
+IUSE="gphoto2 ipv6 snmp systemd threads usb v4l xinetd +zeroconf"
+
+for GBACKEND in ${IUSE_SANE_BACKENDS[@]}; do
+ case ${GBACKEND} in
+ # Disable backends that require parallel ports as no one has those anymore.
+ canon_pp|hpsj5s|mustek_pp|\
+ pnm|mustek_usb2|kvs40xx)
+ IUSE+=" sane_backends_${GBACKEND}"
+ ;;
+ *)
+ IUSE+=" +sane_backends_${GBACKEND}"
+ esac
+done
+
+REQUIRED_USE="
+ sane_backends_escl? ( zeroconf )
+ sane_backends_kvs40xx? ( threads )
+ sane_backends_mustek_usb2? ( threads )
+"
+
+DESCRIPTION="Scanner Access Now Easy - Backends"
+HOMEPAGE="http://www.sane-project.org/"
+SRC_URI="https://gitlab.com/sane-project/backends/uploads/7d30fab4e115029d91027b6a58d64b43/${P}.tar.gz"
+
+LICENSE="GPL-2 public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+# For pixma: see https://gitlab.com/sane-project/backends/-/releases/1.0.28#build
+RDEPEND="
+ acct-user/saned
+ acct-group/scanner
+ gphoto2? (
+ >=media-libs/libgphoto2-2.5.3.1:=[${MULTILIB_USEDEP}]
+ media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}]
+ )
+ sane_backends_canon_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
+ sane_backends_dc210? ( media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}] )
+ sane_backends_dc240? ( media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}] )
+ sane_backends_dell1600n_net? (
+ >=media-libs/tiff-3.9.7-r1:0=[${MULTILIB_USEDEP}]
+ media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}]
+ )
+ sane_backends_escl? (
+ app-text/poppler[cairo]
+ || (
+ net-dns/avahi[dbus]
+ net-dns/avahi[gtk]
+ )
+ net-dns/avahi[${MULTILIB_USEDEP}]
+ net-misc/curl[${MULTILIB_USEDEP}]
+ )
+ sane_backends_hpsj5s? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
+ sane_backends_mustek_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
+ sane_backends_pixma? ( media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}] )
+ snmp? ( net-analyzer/net-snmp:0= )
+ systemd? ( sys-apps/systemd:0= )
+ usb? ( >=virtual/libusb-1-r1:1=[${MULTILIB_USEDEP}] )
+ v4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] )
+ xinetd? ( sys-apps/xinetd )
+ zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] )
+"
+
+DEPEND="${RDEPEND}
+ dev-libs/libxml2
+ v4l? ( sys-kernel/linux-headers )
+"
+BDEPEND="
+ ${PYTHON_DEPS}
+ sys-devel/autoconf-archive
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.0.24-saned_pidfile_location.patch
+ "${FILESDIR}"/${PN}-1.0.27-disable-usb-tests.patch
+ "${FILESDIR}"/${PN}-1.0.30-add_hpaio_epkowa_dll.conf.patch
+ # https://gitlab.com/sane-project/backends/-/merge_requests/688
+ "${FILESDIR}"/${PN}-1.1.1-genesys-gl845-crash.patch
+ "${FILESDIR}"/${P}-gcc12-tests.patch
+ "${FILESDIR}"/${PN}-1.1.1-configure-clang16.patch
+ "${FILESDIR}"/${P}-musl.patch
+)
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/sane-config
+)
+
+src_prepare() {
+ default
+
+ # Patch out the git reference so we can run eautoreconf
+ sed \
+ -e "s/m4_esyscmd_s(\[git describe --dirty\])/${PV}/" \
+ -e '/^AM_MAINTAINER_MODE/d' \
+ -i configure.ac || die
+ eautoreconf
+
+ # Fix for "make check". Upstream sometimes forgets to update this.
+ local ver=$(./configure --version | awk '{print $NF; exit 0}')
+ sed -i \
+ -e "/by sane-desc 3.5 from sane-backends/s:sane-backends .*:sane-backends ${ver}:" \
+ testsuite/tools/data/html* || die
+
+ # don't bleed user LDFLAGS into pkgconfig files
+ sed 's|@LDFLAGS@ ||' -i tools/*.pc.in || die
+
+ # Needed for udev rules generation/installation
+ multilib_copy_sources
+}
+
+src_configure() {
+ # From Fedora
+ append-flags -fno-strict-aliasing
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ # the blank is intended - an empty string would result in building ALL backends.
+ local lbackends=" "
+
+ use gphoto2 && lbackends="gphoto2"
+ use v4l && lbackends+=" v4l"
+ use sane_backends_escl && multilib_is_native_abi && lbackends+=" escl"
+ local backend
+ for backend in ${IUSE_SANE_BACKENDS[@]} ; do
+ if use "sane_backends_${backend}" && [[ "${backend}" != pnm ]] && [[ "${backend}" != escl ]] ; then
+ lbackends+=" ${backend}"
+ fi
+ done
+
+ local myconf=(
+ $(use_with usb)
+ $(multilib_native_use_with snmp)
+
+ $(multilib_native_use_with sane_backends_escl poppler-glib)
+ # you can only enable this backend, not disable it...
+ $(usex sane_backends_pnm --enable-pnm-backend '')
+ $(usex sane_backends_mustek_pp --enable-parport-directio '')
+ )
+
+ if ! { use sane_backends_canon_pp || use sane_backends_hpsj5s || use sane_backends_mustek_pp ; } ; then
+ myconf+=( sane_cv_use_libieee1284=no )
+ fi
+
+ # relative path must be used for tests to work properly
+ # All distributions pass --disable-locking because /var/lock/sane/ would be a world-writable directory
+ # that break in many ways, bug #636202, #668232, #668350
+ # People can refer to the "Programmer's Documentation" at http://www.sane-project.org/docs.html
+ myconf+=(
+ --disable-locking
+ $(use_with gphoto2)
+ $(multilib_native_use_with systemd)
+ $(use_with v4l)
+ $(use_enable ipv6)
+ $(use_enable threads pthread)
+ $(use_with zeroconf avahi)
+ )
+ ECONF_SOURCE="${S}" \
+ SANEI_JPEG="sanei_jpeg.o" SANEI_JPEG_LO="sanei_jpeg.lo" \
+ BACKENDS="${lbackends}" \
+ econf "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ emake VARTEXFONTS="${T}/fonts"
+
+ if tc-is-cross-compiler ; then
+ pushd "${BUILD_DIR}"/tools >/dev/null || die
+
+ # The build system sucks and doesn't handle this properly.
+ # https://alioth.debian.org/tracker/index.php?func=detail&aid=314236&group_id=30186&atid=410366
+ tc-export_build_env BUILD_CC
+ ${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
+ -I. -I../include -I"${S}"/include \
+ "${S}"/sanei/sanei_config.c "${S}"/sanei/sanei_constrain_value.c \
+ "${S}"/sanei/sanei_init_debug.c "${S}"/tools/sane-desc.c -o sane-desc || die
+ local dirs=( hal hotplug hotplug-ng udev )
+ local targets=(
+ hal/libsane.fdi
+ hotplug/libsane.usermap
+ hotplug-ng/libsane.db
+ udev/libsane.rules
+ )
+ mkdir -p "${dirs[@]}" || die
+ emake "${targets[@]}"
+
+ popd >/dev/null || die
+ fi
+
+ if use usb ; then
+ sed -i -e '/^$/d' \
+ tools/hotplug/libsane.usermap || die
+ fi
+}
+
+multilib_src_install() {
+ emake INSTALL_LOCKPATH="" DESTDIR="${D}" install \
+ docdir="${EPREFIX}"/usr/share/doc/${PF}
+
+ if multilib_is_native_abi ; then
+ if use usb ; then
+ insinto /etc/hotplug/usb
+ doins tools/hotplug/libsane.usermap
+ fi
+
+ insinto "/usr/share/pkgconfig"
+ doins tools/sane-backends.pc
+
+ # From Fedora and Arch, prevent permission conflicts
+ # https://github.com/OpenPrinting/cups/issues/314
+ # https://gitlab.com/sane-project/backends/-/issues/546
+ #
+ # Generate udev udev+hwdb, not needing scanner group
+ install -vdm 755 "${ED}/$(get_udevdir)/rules.d/" || die
+ tools/sane-desc -m udev+hwdb -s doc/descriptions/ > "${ED}/$(get_udevdir)/rules.d/65-${PN}.rules" || die
+ tools/sane-desc -m udev+hwdb -s doc/descriptions-external/ >> "${ED}/$(get_udevdir)/rules.d/65-${PN}.rules" || die
+ # generate udev hwdb
+ install -vdm 755 "${ED}/$(get_udevdir)/hwdb.d/" || die
+ tools/sane-desc -m hwdb -s doc/descriptions/ > "${ED}/$(get_udevdir)/hwdb.d/20-${PN}.hwdb"
+ # NOTE: an empty new line is required between the two .desc collections
+ printf "\n" >> "${ED}/$(get_udevdir)/hwdb.d/20-${PN}.hwdb" || die
+ tools/sane-desc -m hwdb -s doc/descriptions-external/ >> "${ED}/$(get_udevdir)/hwdb.d/20-${PN}.hwdb" || die
+ # udev rule for saned (SANE scanning daemon) to be able to write on usb port
+ udev_newrules "${FILESDIR}/66-saned.rules-r1" 66-saned.rules
+ fi
+}
+
+multilib_src_install_all() {
+ dodir /etc/env.d
+
+ if use systemd ; then
+ systemd_newunit "${FILESDIR}"/saned_at.service-r1 "saned@.service"
+ systemd_newunit "${FILESDIR}"/saned.socket saned.socket
+ fi
+
+ if use usb ; then
+ exeinto /etc/hotplug/usb
+ doexe tools/hotplug/libusbscanner
+ newdoc tools/hotplug/README README.hotplug
+ fi
+
+ dodoc NEWS AUTHORS PROBLEMS README README.linux
+ find "${ED}" -name '*.la' -delete || die
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ doins "${FILESDIR}"/saned
+ fi
+
+ newinitd "${FILESDIR}"/saned.initd saned
+ newconfd "${FILESDIR}"/saned.confd saned
+}
+
+pkg_postrm() {
+ udev_reload
+}
+
+pkg_postinst() {
+ udev_reload
+
+ optfeature "Network scanner backend" media-gfx/sane-airscan
+ optfeature "Epson-specific backend" media-gfx/iscan
+ optfeature "HP-specific backend" net-print/hplip
+
+ if use xinetd ; then
+ elog "If you want remote clients to connect, edit"
+ elog "/etc/sane.d/saned.conf and /etc/hosts.allow"
+ fi
+}
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/sane-backends/, media-gfx/sane-backends/files/
@ 2024-05-31 7:17 Andreas Sturmlechner
0 siblings, 0 replies; 10+ messages in thread
From: Andreas Sturmlechner @ 2024-05-31 7:17 UTC (permalink / raw
To: gentoo-commits
commit: 2166faf0dd14687b21773c123831e08e24d5ffb2
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri May 31 07:11:52 2024 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri May 31 07:17:06 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2166faf0
media-gfx/sane-backends: drop 1.1.1-r11, 1.1.1-r13
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
media-gfx/sane-backends/Manifest | 1 -
.../files/sane-backends-1.1.1-gcc12-tests.patch | 78 -----
.../sane-backends-1.1.1-genesys-gl845-crash.patch | 12 -
.../files/sane-backends-1.1.1-musl.patch | 34 --
.../sane-backends/sane-backends-1.1.1-r11.ebuild | 360 --------------------
.../sane-backends/sane-backends-1.1.1-r13.ebuild | 366 ---------------------
6 files changed, 851 deletions(-)
diff --git a/media-gfx/sane-backends/Manifest b/media-gfx/sane-backends/Manifest
index cb3d569a9c23..d77bbff58364 100644
--- a/media-gfx/sane-backends/Manifest
+++ b/media-gfx/sane-backends/Manifest
@@ -1,2 +1 @@
-DIST sane-backends-1.1.1.tar.gz 7447569 BLAKE2B 02ac1822beabb12f19ce2d7c053f0f727313d13e0f9380325492a2f0048094f78a118f7659b4c6e39b60c4ea319d862a242f8866a67c84e5649d9ae2691d9473 SHA512 25bd9f90d550cfe6a6d01c48e83716a53f4b0e3a294287e455ecb5e5b80c8fe1699f45c6c87f694475cceb85745c70597e18a7b1094669d5091c5fb183dfe94d
DIST sane-backends-1.2.1.tar.gz 7308040 BLAKE2B 8448a66e70548f159cfac63501e52417fb1d0599008ce7bf26bf2e7a25a946e688968f01ae64b72c3d5efce67cfbdc0e8e04d8ab3bc92dae0a7e01bc81bf0140 SHA512 3ffce67e409caa5d32684290a56a46a68fef6991a14858d89cbab5aeb364fbbfd6d7c85bcbc4932c9167073a3a6ba682b4730f11fb320f0c4de53a7e7d3edba1
diff --git a/media-gfx/sane-backends/files/sane-backends-1.1.1-gcc12-tests.patch b/media-gfx/sane-backends/files/sane-backends-1.1.1-gcc12-tests.patch
deleted file mode 100644
index 25a1e4db265e..000000000000
--- a/media-gfx/sane-backends/files/sane-backends-1.1.1-gcc12-tests.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-https://bugs.gentoo.org/840137
-https://gitlab.com/sane-project/backends/-/commit/6b99447f5b12758ff015b5c360a6dcbcf9b0a72d
-https://gitlab.com/sane-project/backends/-/issues/597
-https://gitlab.com/sane-project/backends/-/issues/557
-
-From edfc90450ee06149537fadb3095ba4b215c5c4fa Mon Sep 17 00:00:00 2001
-From: Ralph Little <skelband@gmail.com>
-Date: Sun, 2 Oct 2022 18:14:25 -0700
-Subject: [PATCH] genesys: corrections to include file order.
-
-minigtest.h has items that require the definitions in tests_printers.h.
-Pre-GCC-12, this didn't seem to matter but GCC12 seems to have a
-problem with this and requires the template definitions to have already
-appeared.
---- a/testsuite/backend/genesys/minigtest.cpp
-+++ b/testsuite/backend/genesys/minigtest.cpp
-@@ -18,10 +18,10 @@
- along with this program. If not, see <https://www.gnu.org/licenses/>.
- */
-
--#include "minigtest.h"
--
- #define DEBUG_DECLARE_ONLY
-
-+#include "minigtest.h"
-+
- size_t s_num_successes = 0;
- size_t s_num_failures = 0;
-
---- a/testsuite/backend/genesys/tests_image.cpp
-+++ b/testsuite/backend/genesys/tests_image.cpp
-@@ -21,8 +21,8 @@
- #define DEBUG_DECLARE_ONLY
-
- #include "tests.h"
--#include "minigtest.h"
- #include "tests_printers.h"
-+#include "minigtest.h"
-
- #include "../../../backend/genesys/image.h"
- #include "../../../backend/genesys/image_pipeline.h"
---- a/testsuite/backend/genesys/tests_image_pipeline.cpp
-+++ b/testsuite/backend/genesys/tests_image_pipeline.cpp
-@@ -21,8 +21,8 @@
- #define DEBUG_DECLARE_ONLY
-
- #include "tests.h"
--#include "minigtest.h"
- #include "tests_printers.h"
-+#include "minigtest.h"
-
- #include "../../../backend/genesys/image_pipeline.h"
-
---- a/testsuite/backend/genesys/tests_motor.cpp
-+++ b/testsuite/backend/genesys/tests_motor.cpp
-@@ -21,8 +21,8 @@
- #define DEBUG_DECLARE_ONLY
-
- #include "tests.h"
--#include "minigtest.h"
- #include "tests_printers.h"
-+#include "minigtest.h"
-
- #include "../../../backend/genesys/low.h"
- #include "../../../backend/genesys/enums.h"
---- a/testsuite/backend/genesys/tests_utilities.cpp
-+++ b/testsuite/backend/genesys/tests_utilities.cpp
-@@ -21,8 +21,8 @@
- #define DEBUG_DECLARE_ONLY
-
- #include "tests.h"
--#include "minigtest.h"
- #include "tests_printers.h"
-+#include "minigtest.h"
-
- #include "../../../backend/genesys/utilities.h"
-
-GitLab
diff --git a/media-gfx/sane-backends/files/sane-backends-1.1.1-genesys-gl845-crash.patch b/media-gfx/sane-backends/files/sane-backends-1.1.1-genesys-gl845-crash.patch
deleted file mode 100644
index f63a8e2100b9..000000000000
--- a/media-gfx/sane-backends/files/sane-backends-1.1.1-genesys-gl845-crash.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/backend/genesys/genesys.cpp b/backend/genesys/genesys.cpp
-index 9552fa9..c95de7b 100644
---- a/backend/genesys/genesys.cpp
-+++ b/backend/genesys/genesys.cpp
-@@ -367,6 +367,7 @@ void sanei_genesys_create_default_gamma_table(Genesys_Device* dev,
- }
- max = size - 1;
- } else if (dev->model->asic_type == AsicType::GL124 ||
-+ dev->model->asic_type == AsicType::GL845 ||
- dev->model->asic_type == AsicType::GL846 ||
- dev->model->asic_type == AsicType::GL847) {
- size = 257;
diff --git a/media-gfx/sane-backends/files/sane-backends-1.1.1-musl.patch b/media-gfx/sane-backends/files/sane-backends-1.1.1-musl.patch
deleted file mode 100644
index 8aebb50672a1..000000000000
--- a/media-gfx/sane-backends/files/sane-backends-1.1.1-musl.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-https://gitlab.com/sane-project/backends/-/commit/12560890a6e298091bd63b8093a35604416eb92a
-
-From 12560890a6e298091bd63b8093a35604416eb92a Mon Sep 17 00:00:00 2001
-From: David Ward <david.ward@gatech.edu>
-Date: Thu, 21 Apr 2022 23:37:33 -0400
-Subject: [PATCH] Fix header file used for poll()
-
-POSIX specifies the header to include is <poll.h>, not <sys/poll.h>.
-This results in a compiler warning with musl libc (on Alpine Linux).
---- a/configure.ac
-+++ b/configure.ac
-@@ -202,7 +202,7 @@ AC_HEADER_STDC
- AC_CHECK_HEADERS(fcntl.h unistd.h libc.h sys/dsreq.h sys/select.h \
- sys/time.h sys/shm.h sys/ipc.h sys/scanio.h os2.h \
- sys/socket.h sys/io.h sys/hw.h sys/types.h linux/ppdev.h \
-- dev/ppbus/ppi.h machine/cpufunc.h sys/sem.h sys/poll.h \
-+ dev/ppbus/ppi.h machine/cpufunc.h sys/sem.h poll.h \
- windows.h be/kernel/OS.h limits.h sys/ioctl.h asm/types.h\
- netinet/in.h tiffio.h ifaddrs.h pwd.h getopt.h)
- AC_CHECK_HEADERS([asm/io.h],,,[#include <sys/types.h>])
---- a/frontend/saned.c
-+++ b/frontend/saned.c
-@@ -84,8 +84,8 @@
-
- #include "lgetopt.h"
-
--#if defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL)
--# include <sys/poll.h>
-+#if defined(HAVE_POLL_H) && defined(HAVE_POLL)
-+# include <poll.h>
- #else
- /*
- * This replacement poll() using select() is only designed to cover
-GitLab
diff --git a/media-gfx/sane-backends/sane-backends-1.1.1-r11.ebuild b/media-gfx/sane-backends/sane-backends-1.1.1-r11.ebuild
deleted file mode 100644
index 7cda923f849d..000000000000
--- a/media-gfx/sane-backends/sane-backends-1.1.1-r11.ebuild
+++ /dev/null
@@ -1,360 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_10 )
-
-# python-any-r1 required for a script in
-# backends/pixma/scripts/
-inherit autotools flag-o-matic multilib-minimal optfeature python-any-r1 systemd toolchain-funcs udev
-
-# gphoto and v4l are handled by their usual USE flags.
-# The pint backend was disabled because I could not get it to compile.
-IUSE_SANE_BACKENDS=(
- abaton
- agfafocus
- apple
- artec
- artec_eplus48u
- as6e
- avision
- bh
- canon
- canon630u
- canon_dr
- canon_lide70
- canon_pp
- cardscan
- coolscan
- coolscan2
- coolscan3
- dc210
- dc240
- dc25
- dell1600n_net
- dmc
- epjitsu
- epson
- epson2
- escl
- fujitsu
- genesys
- gt68xx
- hp
- hp3500
- hp3900
- hp4200
- hp5400
- hp5590
- hpljm1005
- hpsj5s
- hs2p
- ibm
- kodak
- kodakaio
- kvs1025
- kvs20xx
- kvs40xx
- leo
- lexmark
- ma1509
- magicolor
- matsushita
- microtek
- microtek2
- mustek
- mustek_pp
- mustek_usb
- mustek_usb2
- nec
- net
- niash
- p5
- pie
- pieusb
- pixma
- plustek
- plustek_pp
- pnm
- qcam
- ricoh
- ricoh2
- rts8891
- s9036
- sceptre
- sharp
- sm3600
- sm3840
- snapscan
- sp15c
- st400
- stv680
- tamarack
- teco1
- teco2
- teco3
- test
- u12
- umax
- umax1220u
- umax_pp
- xerox_mfp
-)
-
-IUSE="gphoto2 ipv6 snmp systemd threads usb v4l xinetd +zeroconf"
-
-for GBACKEND in ${IUSE_SANE_BACKENDS[@]}; do
- case ${GBACKEND} in
- # Disable backends that require parallel ports as no one has those anymore.
- canon_pp|hpsj5s|mustek_pp|\
- pnm|mustek_usb2|kvs40xx)
- IUSE+=" sane_backends_${GBACKEND}"
- ;;
- *)
- IUSE+=" +sane_backends_${GBACKEND}"
- esac
-done
-
-REQUIRED_USE="
- sane_backends_escl? ( zeroconf )
- sane_backends_kvs40xx? ( threads )
- sane_backends_mustek_usb2? ( threads )
-"
-
-DESCRIPTION="Scanner Access Now Easy - Backends"
-HOMEPAGE="http://www.sane-project.org/"
-SRC_URI="https://gitlab.com/sane-project/backends/uploads/7d30fab4e115029d91027b6a58d64b43/${P}.tar.gz"
-
-LICENSE="GPL-2 public-domain"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
-
-# For pixma: see https://gitlab.com/sane-project/backends/-/releases/1.0.28#build
-RDEPEND="
- acct-user/saned
- gphoto2? (
- media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}]
- >=media-libs/libgphoto2-2.5.3.1:=[${MULTILIB_USEDEP}]
- )
- sane_backends_canon_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
- sane_backends_dc210? ( media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}] )
- sane_backends_dc240? ( media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}] )
- sane_backends_dell1600n_net? (
- media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}]
- >=media-libs/tiff-3.9.7-r1:=[${MULTILIB_USEDEP}]
- )
- sane_backends_escl? (
- app-text/poppler[cairo]
- || (
- net-dns/avahi[dbus]
- net-dns/avahi[gtk]
- )
- net-dns/avahi[${MULTILIB_USEDEP}]
- net-misc/curl[${MULTILIB_USEDEP}]
- )
- sane_backends_hpsj5s? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
- sane_backends_mustek_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
- sane_backends_pixma? ( media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}] )
- snmp? ( net-analyzer/net-snmp:= )
- systemd? ( sys-apps/systemd:= )
- usb? ( >=virtual/libusb-1-r1:1=[${MULTILIB_USEDEP}] )
- v4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] )
- xinetd? ( sys-apps/xinetd )
- zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] )
-"
-
-DEPEND="${RDEPEND}
- dev-libs/libxml2
- v4l? ( sys-kernel/linux-headers )
-"
-BDEPEND="
- ${PYTHON_DEPS}
- dev-build/autoconf-archive
- sys-devel/gettext
- virtual/pkgconfig
-"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-1.0.24-saned_pidfile_location.patch
- "${FILESDIR}"/${PN}-1.0.27-disable-usb-tests.patch
- "${FILESDIR}"/${PN}-1.0.30-add_hpaio_epkowa_dll.conf.patch
- # https://gitlab.com/sane-project/backends/-/merge_requests/688
- "${FILESDIR}"/${PN}-1.1.1-genesys-gl845-crash.patch
-)
-
-MULTILIB_CHOST_TOOLS=(
- /usr/bin/sane-config
-)
-
-src_prepare() {
- default
-
- eautoreconf
-
- # don't bleed user LDFLAGS into pkgconfig files
- sed 's|@LDFLAGS@ ||' -i tools/*.pc.in || die
-
- # Needed for udev rules generation/installation
- multilib_copy_sources
-}
-
-src_configure() {
- # From Fedora
- append-flags -fno-strict-aliasing
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- # the blank is intended - an empty string would result in building ALL backends.
- local lbackends=" "
-
- use gphoto2 && lbackends="gphoto2"
- use v4l && lbackends+=" v4l"
- use sane_backends_escl && multilib_is_native_abi && lbackends+=" escl"
- local backend
- for backend in ${IUSE_SANE_BACKENDS[@]} ; do
- if use "sane_backends_${backend}" && [[ "${backend}" != pnm ]] && [[ "${backend}" != escl ]] ; then
- lbackends+=" ${backend}"
- fi
- done
-
- local myconf=(
- $(use_with usb)
- $(multilib_native_use_with snmp)
-
- $(multilib_native_use_with sane_backends_escl poppler-glib)
- # you can only enable this backend, not disable it...
- $(usex sane_backends_pnm --enable-pnm-backend '')
- $(usex sane_backends_mustek_pp --enable-parport-directio '')
- )
-
- if ! { use sane_backends_canon_pp || use sane_backends_hpsj5s || use sane_backends_mustek_pp ; } ; then
- myconf+=( sane_cv_use_libieee1284=no )
- fi
-
- # relative path must be used for tests to work properly
- # All distributions pass --disable-locking because /var/lock/sane/ would be a world-writable directory
- # that break in many ways, bug #636202, #668232, #668350
- # People can refer to the "Programmer's Documentation" at http://www.sane-project.org/docs.html
- myconf+=(
- --disable-locking
- $(use_with gphoto2)
- $(multilib_native_use_with systemd)
- $(use_with v4l)
- $(use_enable ipv6)
- $(use_enable threads pthread)
- $(use_with zeroconf avahi)
- )
- ECONF_SOURCE="${S}" \
- SANEI_JPEG="sanei_jpeg.o" SANEI_JPEG_LO="sanei_jpeg.lo" \
- BACKENDS="${lbackends}" \
- econf "${myconf[@]}"
-}
-
-multilib_src_compile() {
- emake VARTEXFONTS="${T}/fonts"
-
- if tc-is-cross-compiler ; then
- pushd "${BUILD_DIR}"/tools >/dev/null || die
-
- # The build system sucks and doesn't handle this properly.
- # https://alioth.debian.org/tracker/index.php?func=detail&aid=314236&group_id=30186&atid=410366
- tc-export_build_env BUILD_CC
- ${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
- -I. -I../include -I"${S}"/include \
- "${S}"/sanei/sanei_config.c "${S}"/sanei/sanei_constrain_value.c \
- "${S}"/sanei/sanei_init_debug.c "${S}"/tools/sane-desc.c -o sane-desc || die
- local dirs=( hal hotplug hotplug-ng udev )
- local targets=(
- hal/libsane.fdi
- hotplug/libsane.usermap
- hotplug-ng/libsane.db
- udev/libsane.rules
- )
- mkdir -p "${dirs[@]}" || die
- emake "${targets[@]}"
-
- popd >/dev/null || die
- fi
-
- if use usb ; then
- sed -i -e '/^$/d' \
- tools/hotplug/libsane.usermap || die
- fi
-}
-
-multilib_src_install() {
- emake INSTALL_LOCKPATH="" DESTDIR="${D}" install \
- docdir="${EPREFIX}"/usr/share/doc/${PF}
-
- if multilib_is_native_abi ; then
- if use usb ; then
- insinto /etc/hotplug/usb
- doins tools/hotplug/libsane.usermap
- fi
-
- insinto "/usr/share/pkgconfig"
- doins tools/sane-backends.pc
-
- # From Fedora and Arch, prevent permission conflicts
- # https://github.com/OpenPrinting/cups/issues/314
- # https://gitlab.com/sane-project/backends/-/issues/546
- #
- # Generate udev udev+hwdb, not needing scanner group
- install -vdm 755 "${ED}/$(get_udevdir)/rules.d/" || die
- tools/sane-desc -m udev+hwdb -s doc/descriptions/ > "${ED}/$(get_udevdir)/rules.d/65-${PN}.rules" || die
- tools/sane-desc -m udev+hwdb -s doc/descriptions-external/ >> "${ED}/$(get_udevdir)/rules.d/65-${PN}.rules" || die
- # generate udev hwdb
- install -vdm 755 "${ED}/$(get_udevdir)/hwdb.d/" || die
- tools/sane-desc -m hwdb -s doc/descriptions/ > "${ED}/$(get_udevdir)/hwdb.d/20-${PN}.hwdb"
- # NOTE: an empty new line is required between the two .desc collections
- printf "\n" >> "${ED}/$(get_udevdir)/hwdb.d/20-${PN}.hwdb" || die
- tools/sane-desc -m hwdb -s doc/descriptions-external/ >> "${ED}/$(get_udevdir)/hwdb.d/20-${PN}.hwdb" || die
- # udev rule for saned (SANE scanning daemon) to be able to write on usb port
- udev_dorules "${FILESDIR}/66-saned.rules"
- fi
-}
-
-multilib_src_install_all() {
- dodir /etc/env.d
-
- if use systemd ; then
- systemd_newunit "${FILESDIR}"/saned_at.service "saned@.service"
- systemd_newunit "${FILESDIR}"/saned.socket saned.socket
- fi
-
- if use usb ; then
- exeinto /etc/hotplug/usb
- doexe tools/hotplug/libusbscanner
- newdoc tools/hotplug/README README.hotplug
- fi
-
- dodoc NEWS AUTHORS PROBLEMS README README.linux
- find "${ED}" -name '*.la' -delete || die
-
- if use xinetd ; then
- insinto /etc/xinetd.d
- doins "${FILESDIR}"/saned
- fi
-
- newinitd "${FILESDIR}"/saned.initd saned
- newconfd "${FILESDIR}"/saned.confd saned
-}
-
-pkg_postinst() {
- optfeature "Network scanner backend" media-gfx/sane-airscan
- optfeature "Epson-specific backend" media-gfx/iscan
- optfeature "HP-specific backend" net-print/hplip
-
- if use xinetd ; then
- elog "If you want remote clients to connect, edit"
- elog "/etc/sane.d/saned.conf and /etc/hosts.allow"
- fi
-
- udev_reload
-}
-
-pkg_postrm() {
- udev_reload
-}
diff --git a/media-gfx/sane-backends/sane-backends-1.1.1-r13.ebuild b/media-gfx/sane-backends/sane-backends-1.1.1-r13.ebuild
deleted file mode 100644
index cc8ec2c60f74..000000000000
--- a/media-gfx/sane-backends/sane-backends-1.1.1-r13.ebuild
+++ /dev/null
@@ -1,366 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_10 )
-
-# python-any-r1 required for a script in
-# backends/pixma/scripts/
-inherit autotools flag-o-matic multilib-minimal optfeature python-any-r1 systemd toolchain-funcs udev
-
-# gphoto and v4l are handled by their usual USE flags.
-# The pint backend was disabled because I could not get it to compile.
-IUSE_SANE_BACKENDS=(
- abaton
- agfafocus
- apple
- artec
- artec_eplus48u
- as6e
- avision
- bh
- canon
- canon630u
- canon_dr
- canon_lide70
- canon_pp
- cardscan
- coolscan
- coolscan2
- coolscan3
- dc210
- dc240
- dc25
- dell1600n_net
- dmc
- epjitsu
- epson
- epson2
- epsonds
- escl
- fujitsu
- genesys
- gt68xx
- hp
- hp3500
- hp3900
- hp4200
- hp5400
- hp5590
- hpljm1005
- hpsj5s
- hs2p
- ibm
- kodak
- kodakaio
- kvs1025
- kvs20xx
- kvs40xx
- leo
- lexmark
- ma1509
- magicolor
- matsushita
- microtek
- microtek2
- mustek
- mustek_pp
- mustek_usb
- mustek_usb2
- nec
- net
- niash
- p5
- pie
- pieusb
- pixma
- plustek
- plustek_pp
- pnm
- qcam
- ricoh
- ricoh2
- rts8891
- s9036
- sceptre
- sharp
- sm3600
- sm3840
- snapscan
- sp15c
- st400
- stv680
- tamarack
- teco1
- teco2
- teco3
- test
- u12
- umax
- umax1220u
- umax_pp
- xerox_mfp
-)
-
-IUSE="gphoto2 snmp systemd threads usb v4l xinetd +zeroconf"
-
-for GBACKEND in ${IUSE_SANE_BACKENDS[@]}; do
- case ${GBACKEND} in
- # Disable backends that require parallel ports as no one has those anymore.
- canon_pp|hpsj5s|mustek_pp|\
- pnm|mustek_usb2|kvs40xx)
- IUSE+=" sane_backends_${GBACKEND}"
- ;;
- *)
- IUSE+=" +sane_backends_${GBACKEND}"
- esac
-done
-
-REQUIRED_USE="
- sane_backends_escl? ( zeroconf )
- sane_backends_kvs40xx? ( threads )
- sane_backends_mustek_usb2? ( threads )
-"
-
-DESCRIPTION="Scanner Access Now Easy - Backends"
-HOMEPAGE="http://www.sane-project.org/"
-SRC_URI="https://gitlab.com/sane-project/backends/uploads/7d30fab4e115029d91027b6a58d64b43/${P}.tar.gz"
-
-LICENSE="GPL-2 public-domain"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux"
-
-# For pixma: see https://gitlab.com/sane-project/backends/-/releases/1.0.28#build
-RDEPEND="
- acct-user/saned
- acct-group/scanner
- gphoto2? (
- >=media-libs/libgphoto2-2.5.3.1:=[${MULTILIB_USEDEP}]
- media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}]
- )
- sane_backends_canon_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
- sane_backends_dc210? ( media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}] )
- sane_backends_dc240? ( media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}] )
- sane_backends_dell1600n_net? (
- >=media-libs/tiff-3.9.7-r1:=[${MULTILIB_USEDEP}]
- media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}]
- )
- sane_backends_escl? (
- app-text/poppler[cairo]
- || (
- net-dns/avahi[dbus]
- net-dns/avahi[gtk]
- )
- net-dns/avahi[${MULTILIB_USEDEP}]
- net-misc/curl[${MULTILIB_USEDEP}]
- )
- sane_backends_hpsj5s? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
- sane_backends_mustek_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
- sane_backends_pixma? ( media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}] )
- snmp? ( net-analyzer/net-snmp:= )
- systemd? ( sys-apps/systemd:= )
- usb? ( >=virtual/libusb-1-r1:1=[${MULTILIB_USEDEP}] )
- v4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] )
- xinetd? ( sys-apps/xinetd )
- zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] )
-"
-
-DEPEND="${RDEPEND}
- dev-libs/libxml2
- v4l? ( sys-kernel/linux-headers )
-"
-BDEPEND="
- ${PYTHON_DEPS}
- dev-build/autoconf-archive
- sys-devel/gettext
- virtual/pkgconfig
-"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-1.0.24-saned_pidfile_location.patch
- "${FILESDIR}"/${PN}-1.0.27-disable-usb-tests.patch
- "${FILESDIR}"/${PN}-1.0.30-add_hpaio_epkowa_dll.conf.patch
- # https://gitlab.com/sane-project/backends/-/merge_requests/688
- "${FILESDIR}"/${PN}-1.1.1-genesys-gl845-crash.patch
- "${FILESDIR}"/${P}-gcc12-tests.patch
- "${FILESDIR}"/${PN}-1.1.1-configure-clang16.patch
- "${FILESDIR}"/${P}-musl.patch
-)
-
-MULTILIB_CHOST_TOOLS=(
- /usr/bin/sane-config
-)
-
-src_prepare() {
- default
-
- eautoreconf
-
- # don't bleed user LDFLAGS into pkgconfig files
- sed 's|@LDFLAGS@ ||' -i tools/*.pc.in || die
-
- # Needed for udev rules generation/installation
- multilib_copy_sources
-}
-
-src_configure() {
- # From Fedora
- append-flags -fno-strict-aliasing
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- # the blank is intended - an empty string would result in building ALL backends.
- local lbackends=" "
-
- use gphoto2 && lbackends="gphoto2"
- use v4l && lbackends+=" v4l"
- use sane_backends_escl && multilib_is_native_abi && lbackends+=" escl"
- local backend
- for backend in ${IUSE_SANE_BACKENDS[@]} ; do
- if use "sane_backends_${backend}" && [[ "${backend}" != pnm ]] && [[ "${backend}" != escl ]] ; then
- lbackends+=" ${backend}"
- fi
- done
-
- local myconf=(
- $(use_with usb)
- $(multilib_native_use_with snmp)
-
- $(multilib_native_use_with sane_backends_escl poppler-glib)
- # you can only enable this backend, not disable it...
- $(usex sane_backends_pnm --enable-pnm-backend '')
- $(usex sane_backends_mustek_pp --enable-parport-directio '')
- )
-
- if ! { use sane_backends_canon_pp || use sane_backends_hpsj5s || use sane_backends_mustek_pp ; } ; then
- myconf+=( sane_cv_use_libieee1284=no )
- fi
-
- # relative path must be used for tests to work properly
- # All distributions pass --disable-locking because /var/lock/sane/ would be a world-writable directory
- # that break in many ways, bug #636202, #668232, #668350
- # People can refer to the "Programmer's Documentation" at http://www.sane-project.org/docs.html
- myconf+=(
- --enable-ipv6
- --disable-locking
- $(use_with gphoto2)
- $(multilib_native_use_with systemd)
- $(use_with v4l)
- $(use_enable threads pthread)
- $(use_with zeroconf avahi)
- )
-
- ECONF_SOURCE="${S}" \
- SANEI_JPEG="sanei_jpeg.o" SANEI_JPEG_LO="sanei_jpeg.lo" \
- BACKENDS="${lbackends}" \
- econf "${myconf[@]}"
-}
-
-multilib_src_compile() {
- emake VARTEXFONTS="${T}/fonts"
-
- if tc-is-cross-compiler ; then
- pushd "${BUILD_DIR}"/tools >/dev/null || die
-
- # The build system sucks and doesn't handle this properly.
- # https://alioth.debian.org/tracker/index.php?func=detail&aid=314236&group_id=30186&atid=410366
- tc-export_build_env BUILD_CC
- ${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
- -I. -I../include -I"${S}"/include \
- "${S}"/sanei/sanei_config.c "${S}"/sanei/sanei_constrain_value.c \
- "${S}"/sanei/sanei_init_debug.c "${S}"/tools/sane-desc.c -o sane-desc || die
- local dirs=( hal hotplug hotplug-ng udev )
- local targets=(
- hal/libsane.fdi
- hotplug/libsane.usermap
- hotplug-ng/libsane.db
- udev/libsane.rules
- )
- mkdir -p "${dirs[@]}" || die
- emake "${targets[@]}"
-
- popd >/dev/null || die
- fi
-
- if use usb ; then
- sed -i -e '/^$/d' \
- tools/hotplug/libsane.usermap || die
- fi
-}
-
-multilib_src_install() {
- emake INSTALL_LOCKPATH="" DESTDIR="${D}" install \
- docdir="${EPREFIX}"/usr/share/doc/${PF}
-
- if multilib_is_native_abi ; then
- if use usb ; then
- insinto /etc/hotplug/usb
- doins tools/hotplug/libsane.usermap
- fi
-
- insinto "/usr/share/pkgconfig"
- doins tools/sane-backends.pc
-
- # From Fedora and Arch, prevent permission conflicts
- # https://github.com/OpenPrinting/cups/issues/314
- # https://gitlab.com/sane-project/backends/-/issues/546
- #
- # Generate udev udev+hwdb, not needing scanner group
- install -vdm 755 "${ED}/$(get_udevdir)/rules.d/" || die
- tools/sane-desc -m udev+hwdb -s doc/descriptions/ > "${ED}/$(get_udevdir)/rules.d/65-${PN}.rules" || die
- tools/sane-desc -m udev+hwdb -s doc/descriptions-external/ >> "${ED}/$(get_udevdir)/rules.d/65-${PN}.rules" || die
- # generate udev hwdb
- install -vdm 755 "${ED}/$(get_udevdir)/hwdb.d/" || die
- tools/sane-desc -m hwdb -s doc/descriptions/ > "${ED}/$(get_udevdir)/hwdb.d/20-${PN}.hwdb"
- # NOTE: an empty new line is required between the two .desc collections
- printf "\n" >> "${ED}/$(get_udevdir)/hwdb.d/20-${PN}.hwdb" || die
- tools/sane-desc -m hwdb -s doc/descriptions-external/ >> "${ED}/$(get_udevdir)/hwdb.d/20-${PN}.hwdb" || die
- # udev rule for saned (SANE scanning daemon) to be able to write on usb port
- udev_newrules "${FILESDIR}/66-saned.rules-r1" 66-saned.rules
- fi
-}
-
-multilib_src_install_all() {
- dodir /etc/env.d
-
- if use systemd ; then
- systemd_newunit "${FILESDIR}"/saned_at.service-r1 "saned@.service"
- systemd_newunit "${FILESDIR}"/saned.socket saned.socket
- fi
-
- if use usb ; then
- exeinto /etc/hotplug/usb
- doexe tools/hotplug/libusbscanner
- newdoc tools/hotplug/README README.hotplug
- fi
-
- dodoc NEWS AUTHORS PROBLEMS README README.linux
- find "${ED}" -name '*.la' -delete || die
-
- if use xinetd ; then
- insinto /etc/xinetd.d
- doins "${FILESDIR}"/saned
- fi
-
- newinitd "${FILESDIR}"/saned.initd saned
- newconfd "${FILESDIR}"/saned.confd saned
-}
-
-pkg_postrm() {
- udev_reload
-}
-
-pkg_postinst() {
- udev_reload
-
- optfeature "Network scanner backend" media-gfx/sane-airscan
- optfeature "Epson-specific backend" media-gfx/iscan
- optfeature "HP-specific backend" net-print/hplip
-
- if use xinetd ; then
- elog "If you want remote clients to connect, edit"
- elog "/etc/sane.d/saned.conf and /etc/hosts.allow"
- fi
-}
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/sane-backends/, media-gfx/sane-backends/files/
@ 2024-11-09 14:08 Michael Orlitzky
0 siblings, 0 replies; 10+ messages in thread
From: Michael Orlitzky @ 2024-11-09 14:08 UTC (permalink / raw
To: gentoo-commits
commit: 437a600eacc3aba6ed0527e5655b0a142921b4ae
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 9 12:59:26 2024 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Sat Nov 9 14:06:13 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=437a600e
media-gfx/sane-backends: add 1.3.1
Closes: https://bugs.gentoo.org/910100
Closes: https://bugs.gentoo.org/931886
Closes: https://bugs.gentoo.org/933236
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>
media-gfx/sane-backends/Manifest | 1 +
.../files/sane-backends-1.3.1-verfix.patch | 23 ++
media-gfx/sane-backends/sane-backends-1.3.1.ebuild | 362 +++++++++++++++++++++
3 files changed, 386 insertions(+)
diff --git a/media-gfx/sane-backends/Manifest b/media-gfx/sane-backends/Manifest
index d77bbff58364..b2d6f0408880 100644
--- a/media-gfx/sane-backends/Manifest
+++ b/media-gfx/sane-backends/Manifest
@@ -1 +1,2 @@
+DIST backends-1.3.1.tar.bz2 4409356 BLAKE2B 8cedc3adb21c481f346c20de5363439aecabbf81606e3fb81accf4a7af4433eb83cecb3f25be9f4944990651fc66a97ce5f2796cc80846c8e066e4f611c6f8ff SHA512 20774d7b81bbb6a5905f36a312be519e0f664a3fb90ff521f2196c341d80c1ef12164262f063ae0a7b449690213c1e3b8065ebfd6b1e1804cc1581d863f4b720
DIST sane-backends-1.2.1.tar.gz 7308040 BLAKE2B 8448a66e70548f159cfac63501e52417fb1d0599008ce7bf26bf2e7a25a946e688968f01ae64b72c3d5efce67cfbdc0e8e04d8ab3bc92dae0a7e01bc81bf0140 SHA512 3ffce67e409caa5d32684290a56a46a68fef6991a14858d89cbab5aeb364fbbfd6d7c85bcbc4932c9167073a3a6ba682b4730f11fb320f0c4de53a7e7d3edba1
diff --git a/media-gfx/sane-backends/files/sane-backends-1.3.1-verfix.patch b/media-gfx/sane-backends/files/sane-backends-1.3.1-verfix.patch
new file mode 100644
index 000000000000..32f22f6c181c
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backends-1.3.1-verfix.patch
@@ -0,0 +1,23 @@
+diff --git a/configure.ac b/configure.ac
+index ddb52b9..c3046b9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -16,13 +16,11 @@ AM_SILENT_RULES
+ dnl ******************************************************************
+ dnl Determine SANE version components and release status
+ dnl ******************************************************************
+-AS_IF([test x = "x$AWK"],[AC_PROG_AWK])
+-AS_IF([test x = "x`echo $VERSION | sed 's/[[.0-9]]//g'`"],
+- [is_release=yes],
+- [is_release=no])
+-V_MAJOR=`echo $VERSION | $AWK -F. '{print $1}'`
+-V_MINOR=`echo $VERSION | $AWK -F. '{print $2}'`
+-V_REV=`echo $VERSION | $AWK -F. '{print $3}' | sed 's/^\([[0-9]]*\).*/\1/'`;
++is_release=yes
++is_release=no
++V_MAJOR=1
++V_MINOR=3
++V_REV=1
+
+ AC_DEFINE_UNQUOTED(SANE_DLL_V_MAJOR, $V_MAJOR, [SANE DLL major number])
+ AC_DEFINE_UNQUOTED(SANE_DLL_V_MINOR, $V_MINOR, [SANE DLL minor number])
diff --git a/media-gfx/sane-backends/sane-backends-1.3.1.ebuild b/media-gfx/sane-backends/sane-backends-1.3.1.ebuild
new file mode 100644
index 000000000000..573d4ca4c003
--- /dev/null
+++ b/media-gfx/sane-backends/sane-backends-1.3.1.ebuild
@@ -0,0 +1,362 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..13} )
+
+# python-any-r1 required for a script in backends/pixma/scripts/
+inherit autotools flag-o-matic multilib-minimal optfeature python-any-r1 systemd toolchain-funcs udev
+
+MY_PN=backends
+MY_P="${MY_PN}-${PV}"
+DESCRIPTION="Scanner Access Now Easy - Backends"
+HOMEPAGE="http://www.sane-project.org/"
+SRC_URI="https://gitlab.com/sane-project/${MY_PN}/-/archive/${PV}/${MY_P}.tar.bz2"
+
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="GPL-2 public-domain"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+
+# gphoto and v4l are handled by their usual USE flags.
+# The pint backend was disabled because I could not get it to compile.
+IUSE_SANE_BACKENDS=(
+ abaton
+ agfafocus
+ apple
+ artec
+ artec_eplus48u
+ as6e
+ avision
+ bh
+ canon
+ canon630u
+ canon_dr
+ canon_lide70
+ canon_pp
+ cardscan
+ coolscan
+ coolscan2
+ coolscan3
+ dc210
+ dc240
+ dc25
+ dell1600n_net
+ dmc
+ epjitsu
+ epson
+ epson2
+ epsonds
+ escl
+ fujitsu
+ genesys
+ gt68xx
+ hp
+ hp3500
+ hp3900
+ hp4200
+ hp5400
+ hp5590
+ hpljm1005
+ hpsj5s
+ hs2p
+ ibm
+ kodak
+ kodakaio
+ kvs1025
+ kvs20xx
+ kvs40xx
+ leo
+ lexmark
+ ma1509
+ magicolor
+ matsushita
+ microtek
+ microtek2
+ mustek
+ mustek_pp
+ mustek_usb
+ mustek_usb2
+ nec
+ net
+ niash
+ p5
+ pie
+ pieusb
+ pixma
+ plustek
+ plustek_pp
+ pnm
+ qcam
+ ricoh
+ ricoh2
+ rts8891
+ s9036
+ sceptre
+ sharp
+ sm3600
+ sm3840
+ snapscan
+ sp15c
+ st400
+ stv680
+ tamarack
+ teco1
+ teco2
+ teco3
+ test
+ u12
+ umax
+ umax1220u
+ umax_pp
+ xerox_mfp
+)
+
+IUSE="gphoto2 snmp systemd threads +usb v4l xinetd +zeroconf"
+
+for GBACKEND in ${IUSE_SANE_BACKENDS[@]}; do
+ case ${GBACKEND} in
+ # Disable backends that require parallel ports as no one has those anymore.
+ canon_pp|hpsj5s|mustek_pp|\
+ pnm|mustek_usb2|kvs40xx)
+ IUSE+=" sane_backends_${GBACKEND}"
+ ;;
+ *)
+ IUSE+=" +sane_backends_${GBACKEND}"
+ esac
+done
+
+REQUIRED_USE="
+ sane_backends_escl? ( zeroconf )
+ sane_backends_kvs40xx? ( threads )
+ sane_backends_mustek_usb2? ( threads )
+"
+
+# For pixma: see https://gitlab.com/sane-project/backends/-/releases/1.0.28#build
+RDEPEND="
+ acct-user/saned
+ acct-group/scanner
+ gphoto2? (
+ >=media-libs/libgphoto2-2.5.3.1:=[${MULTILIB_USEDEP}]
+ media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}]
+ )
+ sane_backends_canon_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
+ sane_backends_dc210? ( media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}] )
+ sane_backends_dc240? ( media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}] )
+ sane_backends_dell1600n_net? (
+ >=media-libs/tiff-3.9.7-r1:=[${MULTILIB_USEDEP}]
+ media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}]
+ )
+ sane_backends_escl? (
+ app-text/poppler[cairo]
+ || (
+ net-dns/avahi[dbus]
+ net-dns/avahi[gtk]
+ )
+ net-dns/avahi[${MULTILIB_USEDEP}]
+ net-misc/curl[${MULTILIB_USEDEP}]
+ )
+ sane_backends_hpsj5s? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
+ sane_backends_mustek_pp? ( >=sys-libs/libieee1284-0.2.11-r3[${MULTILIB_USEDEP}] )
+ sane_backends_pixma? ( media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}] )
+ snmp? ( net-analyzer/net-snmp:= )
+ systemd? ( sys-apps/systemd:= )
+ usb? ( >=virtual/libusb-1-r1:1=[${MULTILIB_USEDEP}] )
+ v4l? ( >=media-libs/libv4l-0.9.5[${MULTILIB_USEDEP}] )
+ xinetd? ( sys-apps/xinetd )
+ zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] )
+"
+DEPEND="${RDEPEND}
+ dev-libs/libxml2
+ v4l? ( sys-kernel/linux-headers )
+"
+BDEPEND="${PYTHON_DEPS}
+ dev-build/autoconf-archive
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.0.24-saned_pidfile_location.patch
+ "${FILESDIR}"/${PN}-1.0.27-disable-usb-tests.patch
+ "${FILESDIR}"/${PN}-1.0.30-add_hpaio_epkowa_dll.conf.patch
+ "${FILESDIR}/${P}-verfix.patch"
+)
+
+# ./configure checks to see if these are defined in sys/io.h,
+# so if they're undefined... that's the point.
+QA_CONFIG_IMPL_DECL_SKIP=( inb outb )
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/sane-config
+)
+
+src_prepare() {
+ default
+
+ eautoreconf
+
+ # Needed for udev rules generation/installation
+ multilib_copy_sources
+}
+
+src_configure() {
+ # From Fedora
+ append-flags -fno-strict-aliasing
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ # the blank is intended - an empty string would result in building ALL backends.
+ local lbackends=" "
+
+ use gphoto2 && lbackends="gphoto2"
+ use v4l && lbackends+=" v4l"
+ use sane_backends_escl && multilib_is_native_abi && lbackends+=" escl"
+ local backend
+ for backend in ${IUSE_SANE_BACKENDS[@]} ; do
+ if use "sane_backends_${backend}" && [[ "${backend}" != pnm ]] && [[ "${backend}" != escl ]] ; then
+ lbackends+=" ${backend}"
+ fi
+ done
+
+ local myconf=(
+ $(use_with usb)
+ $(multilib_native_use_with snmp)
+
+ $(multilib_native_use_with sane_backends_escl poppler-glib)
+ # you can only enable this backend, not disable it...
+ $(usex sane_backends_pnm --enable-pnm-backend '')
+ $(usex sane_backends_mustek_pp --enable-parport-directio '')
+ )
+
+ if ! { use sane_backends_canon_pp || use sane_backends_hpsj5s || use sane_backends_mustek_pp ; } ; then
+ myconf+=( sane_cv_use_libieee1284=no )
+ fi
+
+ # relative path must be used for tests to work properly
+ # All distributions pass --disable-locking because /var/lock/sane/ would be a world-writable directory
+ # that break in many ways, bug #636202, #668232, #668350
+ # People can refer to the "Programmer's Documentation" at http://www.sane-project.org/docs.html
+ myconf+=(
+ --enable-ipv6
+ --disable-locking
+ $(use_with gphoto2)
+ $(multilib_native_use_with systemd)
+ $(use_with v4l)
+ $(use_enable threads pthread)
+ $(use_with zeroconf avahi)
+ )
+
+ ECONF_SOURCE="${S}" SANEI_JPEG="sanei_jpeg.o" SANEI_JPEG_LO="sanei_jpeg.lo" \
+ BACKENDS="${lbackends}" econf "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ emake VARTEXFONTS="${T}/fonts"
+
+ if tc-is-cross-compiler ; then
+ pushd "${BUILD_DIR}"/tools >/dev/null || die
+
+ # The build system sucks and doesn't handle this properly.
+ # https://alioth.debian.org/tracker/index.php?func=detail&aid=314236&group_id=30186&atid=410366
+ tc-export_build_env BUILD_CC
+ ${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} \
+ -I. -I../include -I"${S}"/include \
+ "${S}"/sanei/sanei_config.c "${S}"/sanei/sanei_constrain_value.c \
+ "${S}"/sanei/sanei_init_debug.c "${S}"/tools/sane-desc.c -o sane-desc || die
+ local dirs=( hal hotplug hotplug-ng udev )
+ local targets=(
+ hal/libsane.fdi
+ hotplug/libsane.usermap
+ hotplug-ng/libsane.db
+ udev/libsane.rules
+ )
+ mkdir -p "${dirs[@]}" || die
+ emake "${targets[@]}"
+
+ popd >/dev/null || die
+ fi
+
+ if use usb ; then
+ sed -i -e '/^$/d' \
+ tools/hotplug/libsane.usermap || die
+ fi
+}
+
+multilib_src_install() {
+ emake INSTALL_LOCKPATH="" DESTDIR="${D}" install \
+ docdir="${EPREFIX}"/usr/share/doc/${PF}
+
+ if multilib_is_native_abi ; then
+ if use usb ; then
+ insinto /etc/hotplug/usb
+ doins tools/hotplug/libsane.usermap
+ fi
+
+ insinto "/usr/share/pkgconfig"
+ doins tools/sane-backends.pc
+
+ # From Fedora and Arch, prevent permission conflicts
+ # https://github.com/OpenPrinting/cups/issues/314
+ # https://gitlab.com/sane-project/backends/-/issues/546
+ #
+ # Generate udev udev+hwdb, not needing scanner group
+ install -vdm 755 "${ED}/$(get_udevdir)/rules.d/" || die
+ tools/sane-desc -m udev+hwdb -s doc/descriptions/ > "${ED}/$(get_udevdir)/rules.d/65-${PN}.rules" || die
+ tools/sane-desc -m udev+hwdb -s doc/descriptions-external/ >> "${ED}/$(get_udevdir)/rules.d/65-${PN}.rules" || die
+ # generate udev hwdb
+ install -vdm 755 "${ED}/$(get_udevdir)/hwdb.d/" || die
+ tools/sane-desc -m hwdb -s doc/descriptions/ > "${ED}/$(get_udevdir)/hwdb.d/20-${PN}.hwdb"
+ # NOTE: an empty new line is required between the two .desc collections
+ printf "\n" >> "${ED}/$(get_udevdir)/hwdb.d/20-${PN}.hwdb" || die
+ tools/sane-desc -m hwdb -s doc/descriptions-external/ >> "${ED}/$(get_udevdir)/hwdb.d/20-${PN}.hwdb" || die
+ # udev rule for saned (SANE scanning daemon) to be able to write on usb port
+ udev_newrules "${FILESDIR}/66-saned.rules-r1" 66-saned.rules
+ fi
+}
+
+multilib_src_install_all() {
+ dodir /etc/env.d
+
+ if use systemd ; then
+ systemd_newunit "${FILESDIR}"/saned_at.service-r1 "saned@.service"
+ systemd_newunit "${FILESDIR}"/saned.socket saned.socket
+ fi
+
+ if use usb ; then
+ exeinto /etc/hotplug/usb
+ doexe tools/hotplug/libusbscanner
+ newdoc tools/hotplug/README README.hotplug
+ fi
+
+ dodoc NEWS AUTHORS PROBLEMS README README.linux
+ find "${ED}" -name '*.la' -delete || die
+
+ if use xinetd ; then
+ insinto /etc/xinetd.d
+ doins "${FILESDIR}"/saned
+ fi
+
+ newinitd "${FILESDIR}"/saned.initd saned
+ newconfd "${FILESDIR}"/saned.confd saned
+}
+
+pkg_postrm() {
+ udev_reload
+}
+
+pkg_postinst() {
+ udev_reload
+
+ optfeature "Network scanner backend" media-gfx/sane-airscan
+ optfeature "Epson-specific backend" media-gfx/iscan
+ optfeature "HP-specific backend" net-print/hplip
+
+ if use xinetd ; then
+ elog "If you want remote clients to connect, edit"
+ elog "/etc/sane.d/saned.conf and /etc/hosts.allow"
+ fi
+}
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/sane-backends/, media-gfx/sane-backends/files/
@ 2024-11-10 13:24 Sam James
0 siblings, 0 replies; 10+ messages in thread
From: Sam James @ 2024-11-10 13:24 UTC (permalink / raw
To: gentoo-commits
commit: be496324f0c3d87e83ce2cfb6da5210062dd0667
Author: Alfred Wingate <parona <AT> protonmail <DOT> com>
AuthorDate: Sun Nov 10 03:23:45 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Nov 10 13:23:35 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be496324
media-gfx/sane-backends: use multilib copied sources instead of mixing
Udev already needs them to be copied, so why insist on
ECONF_SOURCE="${S}" later. Mixing them causes issues if headers are
generated later on.
* Simplify version setting by using .tarball-version instead of patching
it.
Closes: https://bugs.gentoo.org/943150
Signed-off-by: Alfred Wingate <parona <AT> protonmail.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/sane-backends-1.3.1-verfix.patch | 23 ----------------------
...-1.3.1.ebuild => sane-backends-1.3.1-r1.ebuild} | 12 ++++-------
2 files changed, 4 insertions(+), 31 deletions(-)
diff --git a/media-gfx/sane-backends/files/sane-backends-1.3.1-verfix.patch b/media-gfx/sane-backends/files/sane-backends-1.3.1-verfix.patch
deleted file mode 100644
index 32f22f6c181c..000000000000
--- a/media-gfx/sane-backends/files/sane-backends-1.3.1-verfix.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff --git a/configure.ac b/configure.ac
-index ddb52b9..c3046b9 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -16,13 +16,11 @@ AM_SILENT_RULES
- dnl ******************************************************************
- dnl Determine SANE version components and release status
- dnl ******************************************************************
--AS_IF([test x = "x$AWK"],[AC_PROG_AWK])
--AS_IF([test x = "x`echo $VERSION | sed 's/[[.0-9]]//g'`"],
-- [is_release=yes],
-- [is_release=no])
--V_MAJOR=`echo $VERSION | $AWK -F. '{print $1}'`
--V_MINOR=`echo $VERSION | $AWK -F. '{print $2}'`
--V_REV=`echo $VERSION | $AWK -F. '{print $3}' | sed 's/^\([[0-9]]*\).*/\1/'`;
-+is_release=yes
-+is_release=no
-+V_MAJOR=1
-+V_MINOR=3
-+V_REV=1
-
- AC_DEFINE_UNQUOTED(SANE_DLL_V_MAJOR, $V_MAJOR, [SANE DLL major number])
- AC_DEFINE_UNQUOTED(SANE_DLL_V_MINOR, $V_MINOR, [SANE DLL minor number])
diff --git a/media-gfx/sane-backends/sane-backends-1.3.1.ebuild b/media-gfx/sane-backends/sane-backends-1.3.1-r1.ebuild
similarity index 96%
rename from media-gfx/sane-backends/sane-backends-1.3.1.ebuild
rename to media-gfx/sane-backends/sane-backends-1.3.1-r1.ebuild
index 573d4ca4c003..d9c01b788ae2 100644
--- a/media-gfx/sane-backends/sane-backends-1.3.1.ebuild
+++ b/media-gfx/sane-backends/sane-backends-1.3.1-r1.ebuild
@@ -8,13 +8,10 @@ PYTHON_COMPAT=( python3_{10..13} )
# python-any-r1 required for a script in backends/pixma/scripts/
inherit autotools flag-o-matic multilib-minimal optfeature python-any-r1 systemd toolchain-funcs udev
-MY_PN=backends
-MY_P="${MY_PN}-${PV}"
DESCRIPTION="Scanner Access Now Easy - Backends"
HOMEPAGE="http://www.sane-project.org/"
-SRC_URI="https://gitlab.com/sane-project/${MY_PN}/-/archive/${PV}/${MY_P}.tar.bz2"
-
-S="${WORKDIR}/${MY_P}"
+SRC_URI="https://gitlab.com/sane-project/backends/-/archive/${PV}/backends-${PV}.tar.bz2"
+S="${WORKDIR}/backends-${PV}"
LICENSE="GPL-2 public-domain"
SLOT="0"
@@ -182,7 +179,6 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.0.24-saned_pidfile_location.patch
"${FILESDIR}"/${PN}-1.0.27-disable-usb-tests.patch
"${FILESDIR}"/${PN}-1.0.30-add_hpaio_epkowa_dll.conf.patch
- "${FILESDIR}/${P}-verfix.patch"
)
# ./configure checks to see if these are defined in sys/io.h,
@@ -196,6 +192,7 @@ MULTILIB_CHOST_TOOLS=(
src_prepare() {
default
+ echo "${PV}" > .tarball-version || die
eautoreconf
# Needed for udev rules generation/installation
@@ -250,8 +247,7 @@ multilib_src_configure() {
$(use_with zeroconf avahi)
)
- ECONF_SOURCE="${S}" SANEI_JPEG="sanei_jpeg.o" SANEI_JPEG_LO="sanei_jpeg.lo" \
- BACKENDS="${lbackends}" econf "${myconf[@]}"
+ SANEI_JPEG="sanei_jpeg.o" SANEI_JPEG_LO="sanei_jpeg.lo" BACKENDS="${lbackends}" econf "${myconf[@]}"
}
multilib_src_compile() {
^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2024-11-10 13:24 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-02 22:47 [gentoo-commits] repo/gentoo:master commit in: media-gfx/sane-backends/, media-gfx/sane-backends/files/ Mike Frysinger
-- strict thread matches above, loose matches on Subject: below --
2017-09-27 10:56 Pacho Ramos
2018-04-02 12:23 Pacho Ramos
2020-06-28 8:24 Jeroen Roovers
2020-09-17 23:20 Sam James
2022-01-29 8:42 Pacho Ramos
2022-11-04 4:19 Sam James
2024-05-31 7:17 Andreas Sturmlechner
2024-11-09 14:08 Michael Orlitzky
2024-11-10 13:24 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox