* [gentoo-commits] repo/gentoo:master commit in: media-gfx/sane-backends/files/, media-gfx/sane-backends/
@ 2016-04-26 22:27 Austin English
0 siblings, 0 replies; 8+ messages in thread
From: Austin English @ 2016-04-26 22:27 UTC (permalink / raw
To: gentoo-commits
commit: cf91e550fe6c0291c39179dc3eb044b2a81af183
Author: Austin English <wizardedit <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 26 21:07:42 2016 +0000
Commit: Austin English <wizardedit <AT> gentoo <DOT> org>
CommitDate: Tue Apr 26 22:26:32 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf91e550
media-gfx/sane-backends: use #!/sbin/openrc-run instead of #!/sbin/runscript
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=573846
Package-Manager: portage-2.2.26
media-gfx/sane-backends/files/saned.initd | 4 +-
.../sane-backends/sane-backends-1.0.24-r6.ebuild | 329 +++++++++++++++++++
.../sane-backends/sane-backends-1.0.25-r1.ebuild | 347 +++++++++++++++++++++
3 files changed, 678 insertions(+), 2 deletions(-)
diff --git a/media-gfx/sane-backends/files/saned.initd b/media-gfx/sane-backends/files/saned.initd
index dd07f0a..3431cb5 100644
--- a/media-gfx/sane-backends/files/saned.initd
+++ b/media-gfx/sane-backends/files/saned.initd
@@ -1,5 +1,5 @@
-#!/sbin/runscript
-# Copyright 1999-2013 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
diff --git a/media-gfx/sane-backends/sane-backends-1.0.24-r6.ebuild b/media-gfx/sane-backends/sane-backends-1.0.24-r6.ebuild
new file mode 100644
index 0000000..83a7cb4
--- /dev/null
+++ b/media-gfx/sane-backends/sane-backends-1.0.24-r6.ebuild
@@ -0,0 +1,329 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit autotools eutils flag-o-matic multilib multilib-minimal udev user toolchain-funcs
+
+# 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="avahi doc gphoto2 ipv6 threads usb v4l xinetd snmp systemd"
+
+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/"
+SRC_URI="https://alioth.debian.org/frs/download.php/file/3958/${P}.tar.gz"
+
+LICENSE="GPL-2 public-domain"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
+
+RDEPEND="
+ sane_backends_dc210? ( >=virtual/jpeg-0-r2[${MULTILIB_USEDEP}] )
+ sane_backends_dc240? ( >=virtual/jpeg-0-r2[${MULTILIB_USEDEP}] )
+ sane_backends_dell1600n_net? ( >=virtual/jpeg-0-r2[${MULTILIB_USEDEP}]
+ >=media-libs/tiff-3.9.7-r1[${MULTILIB_USEDEP}] )
+ avahi? ( >=net-dns/avahi-0.6.31-r2[${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[${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= )
+"
+
+DEPEND="${RDEPEND}
+ v4l? ( sys-kernel/linux-headers )
+ doc? (
+ virtual/latex-base
+ dev-texlive/texlive-latexextra
+ )
+ >=sys-apps/sed-4
+
+ >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
+
+# We now use new syntax construct (SUBSYSTEMS!="usb|usb_device)
+RDEPEND="${RDEPEND}
+ !<sys-fs/udev-114
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-medialibs-20140508
+ !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
+ )"
+
+MULTILIB_CHOST_TOOLS=(
+ /usr/bin/sane-config
+)
+
+pkg_setup() {
+ enewgroup scanner
+ enewuser saned -1 -1 -1 scanner
+}
+
+src_prepare() {
+ 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
+ epatch "${FILESDIR}"/niash_array_index.patch \
+ "${FILESDIR}"/${P}-unused-cups.patch \
+ "${FILESDIR}"/${P}-automagic_systemd.patch \
+ "${FILESDIR}"/${P}-systemd_pkgconfig.patch \
+ "${FILESDIR}"/${P}-kodakaio_avahi.patch \
+ "${FILESDIR}"/${P}-saned_pidfile_location.patch \
+ "${FILESDIR}"/${P}-cross-compile.patch
+ # Fix for "make check".
+ sed -i -e 's/sane-backends 1.0.24git/sane-backends 1.0.24/' testsuite/tools/data/html*
+ AT_NOELIBTOOLIZE=yes eautoreconf
+}
+
+src_configure() {
+ 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 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_enable usb libusb_1_0)
+ $(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 doc; then
+ myconf+=( --disable-latex )
+ 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
+ # if LINGUAS is set, just use the listed and supported localizations.
+ if [ "${LINGUAS-NoLocalesSet}" != NoLocalesSet ]; then
+ mkdir -p po || die
+ echo > po/LINGUAS
+ for lang in ${LINGUAS}; do
+ if [ -a "${S}"/po/${lang}.po ]; then
+ echo ${lang} >> po/LINGUAS
+ fi
+ done
+ fi
+
+ # relative path must be used for tests to work properly
+ ECONF_SOURCE=../${P} \
+ 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 avahi) \
+ $(use_enable ipv6) \
+ $(use_enable threads pthread) \
+ "${myconf[@]}"
+}
+
+multilib_src_compile() {
+ emake VARTEXFONTS="${T}/fonts"
+
+ if use usb; then
+ cd tools/hotplug || die
+ sed -i -e '/^$/d' libsane.usermap || die
+ fi
+
+ if tc-is-cross-compiler; then
+ # 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
+ cd "${BUILD_DIR}"/tools || die
+ ${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} -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[@]}"
+ 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 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 --all
+ 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."
+}
diff --git a/media-gfx/sane-backends/sane-backends-1.0.25-r1.ebuild b/media-gfx/sane-backends/sane-backends-1.0.25-r1.ebuild
new file mode 100644
index 0000000..0fa014d
--- /dev/null
+++ b/media-gfx/sane-backends/sane-backends-1.0.25-r1.ebuild
@@ -0,0 +1,347 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils flag-o-matic multilib multilib-minimal udev user toolchain-funcs
+
+# 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="avahi doc gphoto2 ipv6 nls snmp systemd threads usb v4l xinetd"
+
+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="4146"
+ 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}]
+ )
+ avahi? ( >=net-dns/avahi-0.6.31-r2[${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= )
+"
+
+DEPEND="${RDEPEND}
+ v4l? ( sys-kernel/linux-headers )
+ doc? (
+ virtual/latex-base
+ dev-texlive/texlive-latexextra
+ )
+ >=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() {
+ 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
+ epatch "${FILESDIR}"/${PN}-1.0.24-saned_pidfile_location.patch
+ epatch "${FILESDIR}"/${PN}-1.0.25-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
+
+ # 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_enable usb libusb_1_0)
+ $(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 doc; then
+ myconf+=( --disable-latex )
+ 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 avahi) \
+ $(use_enable ipv6) \
+ $(use_enable nls translations) \
+ $(use_enable threads pthread) \
+ "${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 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 --all
+ 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] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/sane-backends/files/, media-gfx/sane-backends/
@ 2017-09-27 10:56 Pacho Ramos
0 siblings, 0 replies; 8+ messages in thread
From: Pacho Ramos @ 2017-09-27 10:56 UTC (permalink / raw
To: gentoo-commits
commit: 50d84fcbe8ba2690bd57677169da377e493fd799
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 27 10:56:10 2017 +0000
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Wed Sep 27 10:56:10 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50d84fcb
media-gfx/sane-backends: Drop old
Package-Manager: Portage-2.3.10, Repoman-2.3.3
media-gfx/sane-backends/Manifest | 1 -
.../sane-backends/files/niash_array_index.patch | 140 ---------
.../sane-backends-1.0.24-automagic_systemd.patch | 56 ----
.../files/sane-backends-1.0.24-cross-compile.patch | 30 --
.../sane-backends-1.0.24-kodakaio_avahi.patch | 105 -------
.../sane-backends-1.0.24-systemd_pkgconfig.patch | 54 ----
.../files/sane-backends-1.0.24-unused-cups.patch | 62 ----
.../sane-backends/sane-backends-1.0.24-r6.ebuild | 328 ---------------------
8 files changed, 776 deletions(-)
diff --git a/media-gfx/sane-backends/Manifest b/media-gfx/sane-backends/Manifest
index 9844b23bfd8..13d8fc209d1 100644
--- a/media-gfx/sane-backends/Manifest
+++ b/media-gfx/sane-backends/Manifest
@@ -1,3 +1,2 @@
-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/niash_array_index.patch b/media-gfx/sane-backends/files/niash_array_index.patch
deleted file mode 100644
index 236c4598b58..00000000000
--- a/media-gfx/sane-backends/files/niash_array_index.patch
+++ /dev/null
@@ -1,140 +0,0 @@
---- backend/niash.c 2010-12-02 00:49:58.000000000 +0100
-+++ backend/niash.c.new 2011-09-21 20:09:07.000000000 +0200
-@@ -82,14 +82,7 @@
- optThreshold,
-
-
-- optLast,
--/* put temporarily disabled options here after optLast */
--
-- optGroupMisc,
-- optLamp,
--
-- optCalibrate,
-- optGamma /* analog gamma = single number */
-+ optLast
- } EOptionIndex;
-
-
-@@ -685,17 +678,6 @@
- pDesc->size = 0;
- break;
-
-- case optGamma:
-- pDesc->name = SANE_NAME_ANALOG_GAMMA;
-- pDesc->title = SANE_TITLE_ANALOG_GAMMA;
-- pDesc->desc = SANE_DESC_ANALOG_GAMMA;
-- pDesc->type = SANE_TYPE_FIXED;
-- pDesc->constraint_type = SANE_CONSTRAINT_RANGE;
-- pDesc->constraint.range = &rangeGamma;
-- pDesc->cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT;
-- pVal->w = startUpGamma;
-- break;
--
- case optGammaTable:
- pDesc->name = SANE_NAME_GAMMA_VECTOR;
- pDesc->title = SANE_TITLE_GAMMA_VECTOR;
-@@ -707,31 +689,6 @@
- pVal->wa = s->aGammaTable;
- break;
-
-- case optGroupMisc:
-- pDesc->title = SANE_I18N ("Miscellaneous");
-- pDesc->type = SANE_TYPE_GROUP;
-- pDesc->size = 0;
-- break;
--
-- case optLamp:
-- pDesc->name = "lamp";
-- pDesc->title = SANE_I18N ("Lamp status");
-- pDesc->desc = SANE_I18N ("Switches the lamp on or off.");
-- pDesc->type = SANE_TYPE_BOOL;
-- pDesc->cap = SANE_CAP_SOFT_SELECT | SANE_CAP_SOFT_DETECT;
-- /* switch the lamp on when starting for first the time */
-- pVal->w = SANE_TRUE;
-- break;
--
-- case optCalibrate:
-- pDesc->name = "calibrate";
-- pDesc->title = SANE_I18N ("Calibrate");
-- pDesc->desc = SANE_I18N ("Calibrates for black and white level.");
-- pDesc->type = SANE_TYPE_BUTTON;
-- pDesc->cap = SANE_CAP_SOFT_SELECT;
-- pDesc->size = 0;
-- break;
--
- case optGroupMode:
- pDesc->title = SANE_I18N ("Scan Mode");
- pDesc->desc = "";
-@@ -1007,7 +964,6 @@
- /* Get options of type SANE_Word */
- case optCount:
- case optDPI:
-- case optGamma:
- case optTLX:
- case optTLY:
- case optBRX:
-@@ -1031,17 +987,6 @@
- strcpy ((char *) pVal, modeList[s->aValues[optMode].w]);
- break;
-
-- /* Get options of type SANE_Bool */
-- case optLamp:
-- GetLamp (&s->HWParams, &fLampIsOn);
-- *(SANE_Bool *) pVal = fLampIsOn;
-- break;
--
-- case optCalibrate:
-- /* although this option has nothing to read,
-- it's added here to avoid a warning when running scanimage --help */
-- break;
--
- default:
- DBG (DBG_MSG, "SANE_ACTION_GET_VALUE: Invalid option (%d)\n", n);
- }
-@@ -1061,7 +1006,6 @@
- case optCount:
- return SANE_STATUS_INVAL;
-
-- case optGamma:
- case optThreshold:
- case optDPI:
-
-@@ -1089,15 +1033,7 @@
- DBG (DBG_MSG,
- "sane_control_option: SANE_ACTION_SET_VALUE %d = %d\n", n,
- (int) s->aValues[n].w);
-- if (n == optGamma)
-- {
-- if (!fSame && optLast > optGammaTable)
-- {
-- info |= SANE_INFO_RELOAD_OPTIONS;
-- }
-- _SetScalarGamma (s->aGammaTable, s->aValues[n].w);
-- }
-- break;
-+ break;
-
- case optGammaTable:
- DBG (DBG_MSG, "Writing gamma table\n");
-@@ -1158,20 +1094,6 @@
- break;
-
-
--
-- case optLamp:
-- fVal = *(SANE_Bool *) pVal;
-- DBG (DBG_MSG, "lamp %s\n", fVal ? "on" : "off");
-- if (fVal)
-- _WarmUpLamp (s, WARMUP_INSESSION);
-- else
-- SetLamp (&s->HWParams, SANE_FALSE);
-- break;
--
-- case optCalibrate:
--/* SimpleCalib(&s->HWParams); */
-- break;
--
- default:
- DBG (DBG_ERR, "SANE_ACTION_SET_VALUE: Invalid option (%d)\n", n);
- }
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.24-automagic_systemd.patch b/media-gfx/sane-backends/files/sane-backends-1.0.24-automagic_systemd.patch
deleted file mode 100644
index 7db51b061c1..00000000000
--- a/media-gfx/sane-backends/files/sane-backends-1.0.24-automagic_systemd.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-sent upstream:
-https://lists.alioth.debian.org/pipermail/sane-devel/2015-July/033601.html
-
-From 867c8fcde5cf54afae7f9ae8f855605b891708a7 Mon Sep 17 00:00:00 2001
-From: Christopher Brannon <teiresias@gentoo.org>
-Date: Wed, 8 Jul 2015 06:37:14 -0400
-Subject: [PATCH] add a configure flag to control systemd support
-
-This way people can easily disable systemd support locally.
----
- configure.in | 29 ++++++++++++++++++-----------
- 1 file changed, 18 insertions(+), 11 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index 059058b..b539cda 100644
---- a/configure.in
-+++ b/configure.in
-@@ -343,17 +343,24 @@ dnl $as_echo "in order to autodetect network scanners in kodakaio."
- dnl with_cups="no"
- dnl fi
-
--dnl added by llagendijk 12/7/2012 to detect systemd for saned
--$as_echo_n "Checking for systemd..."
--if test -e /usr/include/systemd/sd-daemon.h ; then
-- AC_DEFINE(HAVE_SYSTEMD, 1, [Is /usr/include/systemd/sd-daemon.h available?])
-- with_systemd="yes"
-- SYSTEMD_LIBS=" -lsystemd-daemon"
-- AC_SUBST(SYSTEMD_LIBS)
-- $as_echo "yes"
--else
-- with_systemd="no"
-- $as_echo "no"
-+AC_ARG_WITH(systemd,
-+ AC_HELP_STRING([--with-systemd], [enable systemd support @<:@default=yes@:>@]))
-+if test "x$with_systemd" != xno ; then
-+ dnl added by llagendijk 12/7/2012 to detect systemd for saned
-+ $as_echo_n "Checking for systemd..."
-+ if test -e /usr/include/systemd/sd-daemon.h ; then
-+ AC_DEFINE(HAVE_SYSTEMD, 1, [Is /usr/include/systemd/sd-daemon.h available?])
-+ have_systemd="yes"
-+ SYSTEMD_LIBS=" -lsystemd-daemon"
-+ AC_SUBST(SYSTEMD_LIBS)
-+ $as_echo "yes"
-+ else
-+ have_systemd="no"
-+ $as_echo "no"
-+ if test "x$with_systemd" = xyes; then
-+ AC_MSG_ERROR([Systemd support was requested but systemd was not found])
-+ fi
-+ fi
- fi
-
- dnl ***********
---
-2.4.4
-
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.24-cross-compile.patch b/media-gfx/sane-backends/files/sane-backends-1.0.24-cross-compile.patch
deleted file mode 100644
index d66edacbae8..00000000000
--- a/media-gfx/sane-backends/files/sane-backends-1.0.24-cross-compile.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-sent upstream:
-https://lists.alioth.debian.org/pipermail/sane-devel/2015-July/033600.html
-
-From c8df148e2b9784be1827e33224baa1cb5066a383 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@chromium.org>
-Date: Wed, 8 Jul 2015 06:31:12 -0400
-Subject: [PATCH] fix cross-compiling paths
-
-There's no reason to hardcode -I paths to /usr/local. Doing so breaks
-cross-compiling when incompatible headers live in there or the toolchain
-is set up to throw errors with those flags.
----
- configure.in | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/configure.in b/configure.in
-index 48953d2..059058b 100644
---- a/configure.in
-+++ b/configure.in
-@@ -82,7 +82,6 @@ AM_CONDITIONAL(CROSS_COMPILING, test x$cross_compiling = xyes)
- dnl ***********************************************************************
- dnl set compiler/linker flags
- dnl ***********************************************************************
--INCLUDES="${INCLUDES} -I/usr/local/include"
- AC_SUBST(INCLUDES)
- SANE_SET_CFLAGS([$is_release])
- SANE_SET_LDFLAGS
---
-2.4.4
-
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.24-kodakaio_avahi.patch b/media-gfx/sane-backends/files/sane-backends-1.0.24-kodakaio_avahi.patch
deleted file mode 100644
index 80b12f01121..00000000000
--- a/media-gfx/sane-backends/files/sane-backends-1.0.24-kodakaio_avahi.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-taken from upstream
-
-From 37523b867d411c2f82d08128246be7e38bc9812c Mon Sep 17 00:00:00 2001
-From: Paul Newall <quandry@ntlworld.com>
-Date: Mon, 14 Oct 2013 22:22:53 +0100
-Subject: [PATCH] Bugfix in kodakaio.c to fix segfault when non kodak scanners
- return unexpected data via avahi auto discovery
-
----
- ChangeLog | 4 ++++
- backend/kodakaio.c | 43 +++++++++++++++++++++++++++++++-----------
- doc/descriptions/kodakaio.desc | 2 +-
- 3 files changed, 37 insertions(+), 12 deletions(-)
-
-2013-10-14 Paul Newall <quandry@ntlworld.com>
- * backend/kodakaio.c: fix bug #314301,
- Segfault when unexpected data returned by avahi auto discovery.
-
-diff --git a/backend/kodakaio.c b/backend/kodakaio.c
-index 8c4583a..b442e50 100644
---- a/backend/kodakaio.c
-+++ b/backend/kodakaio.c
-@@ -127,7 +127,7 @@ for ubuntu 12.10
-
- #define KODAKAIO_VERSION 02
- #define KODAKAIO_REVISION 4
--#define KODAKAIO_BUILD 6
-+#define KODAKAIO_BUILD 7
-
- /* for usb (but also used for net though it's not required). */
- #define MAX_BLOCK_SIZE 32768
-@@ -2184,6 +2184,7 @@ static void resolve_callback(
- AvahiLookupResultFlags flags,
- AVAHI_GCC_UNUSED void* userdata) {
-
-+ AvahiStringList *vid_pair_list = NULL, *pid_pair_list = NULL;
- char *pidkey, *pidvalue;
- char *vidkey, *vidvalue;
- size_t valuesize;
-@@ -2204,20 +2205,40 @@ static void resolve_callback(
- avahi_address_snprint(a, sizeof(a), address);
-
- /* Output short for Kodak ESP */
-- DBG(min(10,DBG_AUTO), "%s:%u %s ", a,port,host_name);
-- avahi_string_list_get_pair(avahi_string_list_find(txt, "vid"),
-- &vidkey, &vidvalue, &valuesize);
-- DBG(min(10,DBG_AUTO), "%s=%s ", vidkey, vidvalue);
-- avahi_string_list_get_pair(avahi_string_list_find(txt, "pid"),
-- &pidkey, &pidvalue, &valuesize);
-- DBG(min(10,DBG_AUTO), "%s=%s\n", pidkey, pidvalue);
-+ DBG(min(10,DBG_AUTO), "%s:%u %s\n", a,port,host_name);
-
-+ vid_pair_list = avahi_string_list_find(txt, "vid");
-+ if(vid_pair_list != NULL) {
-+ avahi_string_list_get_pair(vid_pair_list, &vidkey, &vidvalue, &valuesize);
-+ DBG(min(10,DBG_AUTO), "%s=%s ", vidkey, vidvalue);
-+ }
-+ else DBG(min(10,DBG_AUTO), "failed to find key vid\n");
-+
-+ pid_pair_list = avahi_string_list_find(txt, "pid");
-+ if(pid_pair_list != NULL) {
-+ avahi_string_list_get_pair(pid_pair_list, &pidkey, &pidvalue, &valuesize);
-+ DBG(min(10,DBG_AUTO), "%s=%s\n", pidkey, pidvalue);
-+ }
-+ else DBG(min(10,DBG_AUTO), "failed to find key pid\n");
-+
-+ if(pid_pair_list != NULL && vid_pair_list != NULL) {
- ProcessAvahiDevice(name, vidvalue, pidvalue, a);
-- avahi_free(vidkey); avahi_free(vidvalue);
-- avahi_free(pidkey); avahi_free(pidvalue);
-+ }
-+ else DBG(min(10,DBG_AUTO), "didn't call ProcessAvahiDevice\n");
-+
-+ if(vid_pair_list != NULL) {
-+ avahi_free(vidkey);
-+ avahi_free(vidvalue);
-+ DBG(min(15,DBG_AUTO), "vidkey and vidvalue freed\n");
-+ }
-+ if(pid_pair_list != NULL) {
-+ avahi_free(pidkey);
-+ avahi_free(pidvalue);
-+ DBG(min(15,DBG_AUTO), "pidkey and pidvalue freed\n");
-+ }
- }
- }
--
-+ DBG(min(10,DBG_AUTO), "ending resolve_callback\n");
- avahi_service_resolver_free(r);
- }
-
-diff --git a/doc/descriptions/kodakaio.desc b/doc/descriptions/kodakaio.desc
-index 7882513..5fb18ed 100644
---- a/doc/descriptions/kodakaio.desc
-+++ b/doc/descriptions/kodakaio.desc
-@@ -1,6 +1,6 @@
- :backend "kodakaio"
- :url "http://sourceforge.net/projects/cupsdriverkodak/"
--:version "2.4.6"
-+:version "2.4.7"
- :manpage "sane-kodakaio"
- :comment "Backend for Kodak AiO ESP and Hero printers. Also possibly Advent AWL10"
- :devicetype :scanner
---
-2.4.4
-
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.24-systemd_pkgconfig.patch b/media-gfx/sane-backends/files/sane-backends-1.0.24-systemd_pkgconfig.patch
deleted file mode 100644
index b87ca8a3063..00000000000
--- a/media-gfx/sane-backends/files/sane-backends-1.0.24-systemd_pkgconfig.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-sent upstream:
-https://lists.alioth.debian.org/pipermail/sane-devel/2015-July/033602.html
-
-From 1dcfb42608a27fbdebdaa721b4e48354850a7dcc Mon Sep 17 00:00:00 2001
-From: Christopher Brannon <teiresias@gentoo.org>
-Date: Wed, 8 Jul 2015 06:38:50 -0400
-Subject: [PATCH] use pkg-config to look up systemd paths
-
-Since systemd has always shipped pkg-config files, we should use them.
-This also fixes cross-compiling by not relying on hardcoded host paths.
----
- configure.in | 25 +++++++++++--------------
- 1 file changed, 11 insertions(+), 14 deletions(-)
-
-diff --git a/configure.in b/configure.in
-index b539cda..5e703a8 100644
---- a/configure.in
-+++ b/configure.in
-@@ -346,21 +346,18 @@ dnl fi
- AC_ARG_WITH(systemd,
- AC_HELP_STRING([--with-systemd], [enable systemd support @<:@default=yes@:>@]))
- if test "x$with_systemd" != xno ; then
-- dnl added by llagendijk 12/7/2012 to detect systemd for saned
-- $as_echo_n "Checking for systemd..."
-- if test -e /usr/include/systemd/sd-daemon.h ; then
-- AC_DEFINE(HAVE_SYSTEMD, 1, [Is /usr/include/systemd/sd-daemon.h available?])
-- have_systemd="yes"
-- SYSTEMD_LIBS=" -lsystemd-daemon"
-- AC_SUBST(SYSTEMD_LIBS)
-- $as_echo "yes"
-- else
-- have_systemd="no"
-- $as_echo "no"
-- if test "x$with_systemd" = xyes; then
-- AC_MSG_ERROR([Systemd support was requested but systemd was not found])
-- fi
-+ PKG_CHECK_MODULES(SYSTEMD, [libsystemd], have_systemd=yes, have_systemd=no)
-+ if test "x$have_systemd" = xno; then
-+ PKG_CHECK_MODULES(SYSTEMD, [libsystemd-daemon], have_systemd=yes, have_systemd=no)
-+ fi
-+ if test "x$have_systemd" = xyes; then
-+ AC_DEFINE(HAVE_SYSTEMD, 1, [Is /usr/include/systemd/sd-daemon.h available?])
-+ AC_SUBST(SYSTEMD_LIBS)
-+ else
-+ if test "x$with_systemd" = xyes; then
-+ AC_MSG_ERROR([Systemd support was requested but systemd was not found])
- fi
-+ fi
- fi
-
- dnl ***********
---
-2.4.4
-
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.24-unused-cups.patch b/media-gfx/sane-backends/files/sane-backends-1.0.24-unused-cups.patch
deleted file mode 100644
index a7c95d991bb..00000000000
--- a/media-gfx/sane-backends/files/sane-backends-1.0.24-unused-cups.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-taken from upstream
-
-From efb04936b8ad3bf313c289a522ae5832e22c1b7e Mon Sep 17 00:00:00 2001
-From: Paul Newall <quandry@ntlworld.com>
-Date: Tue, 15 Oct 2013 22:20:15 +0100
-Subject: [PATCH] detection of cups commented out in configure.in it is no
- longer used by kodakaio.
-
----
- ChangeLog | 4 ++++
- configure.in | 24 ++++++++++++------------
- 2 files changed, 16 insertions(+), 12 deletions(-)
-
-2013-10-15 Paul Newall <quandry@ntlworld.com>
- * configue.in: detection of cups was commented out. Avahi is now used
- for autodetection in kodakaio so the detection of cups is no longer required.
-
-diff --git a/configure.in b/configure.in
-index e13888c..4365868 100644
---- a/configure.in
-+++ b/configure.in
-@@ -332,17 +332,17 @@ if test -c /dev/urandom ; then
- AC_DEFINE(HAVE_DEV_URANDOM, 1, [Is /dev/urandom available?])
- fi
-
--dnl added by PN 3/2/12 to detect cups
--$as_echo "checking for cups"
--if test -e /usr/include/cups/cups.h ; then
-- AC_DEFINE(HAVE_CUPS, 1, [Is /usr/include/cups/cups.h available?])
-- with_cups="yes"
-- LIBS="-lcups $LIBS"
--else
-- $as_echo "cups.h not found, you may want to install a cups development package"
-- $as_echo "in order to autodetect network scanners in kodakaio."
-- with_cups="no"
--fi
-+dnl added by PN 3/2/12 to detect cups commented out 15/10/13 since avahi is now used instead
-+dnl $as_echo "checking for cups"
-+dnl if test -e /usr/include/cups/cups.h ; then
-+dnl AC_DEFINE(HAVE_CUPS, 1, [Is /usr/include/cups/cups.h available?])
-+dnl with_cups="yes"
-+dnl LIBS="-lcups $LIBS"
-+dnl else
-+dnl $as_echo "cups.h not found, you may want to install a cups development package"
-+dnl $as_echo "in order to autodetect network scanners in kodakaio."
-+dnl with_cups="no"
-+dnl fi
-
- dnl added by llagendijk 12/7/2012 to detect systemd for saned
- $as_echo_n "Checking for systemd..."
-@@ -816,7 +816,7 @@ fi
- echo "IPv6 support: `eval eval echo ${ipv6}`"
- echo "Avahi support: `eval eval echo ${enable_avahi}`"
- echo "SNMP support: `eval eval echo ${with_snmp}`"
--echo "CUPS support: `eval eval echo ${with_cups}`"
-+dnl echo "CUPS support: `eval eval echo ${with_cups}`" commented out 15/10/13
- echo "-> The following backends will be built:"
- for backend in ${BACKENDS} ; do
- echo $ECHO_N "${backend} "
---
-2.4.4
-
diff --git a/media-gfx/sane-backends/sane-backends-1.0.24-r6.ebuild b/media-gfx/sane-backends/sane-backends-1.0.24-r6.ebuild
deleted file mode 100644
index 29cdb8f90d0..00000000000
--- a/media-gfx/sane-backends/sane-backends-1.0.24-r6.ebuild
+++ /dev/null
@@ -1,328 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-inherit autotools eutils flag-o-matic multilib multilib-minimal udev user toolchain-funcs
-
-# 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="avahi doc gphoto2 ipv6 threads usb v4l xinetd snmp systemd"
-
-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/"
-SRC_URI="https://alioth.debian.org/frs/download.php/file/3958/${P}.tar.gz"
-
-LICENSE="GPL-2 public-domain"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux"
-
-RDEPEND="
- sane_backends_dc210? ( >=virtual/jpeg-0-r2[${MULTILIB_USEDEP}] )
- sane_backends_dc240? ( >=virtual/jpeg-0-r2[${MULTILIB_USEDEP}] )
- sane_backends_dell1600n_net? ( >=virtual/jpeg-0-r2[${MULTILIB_USEDEP}]
- >=media-libs/tiff-3.9.7-r1[${MULTILIB_USEDEP}] )
- avahi? ( >=net-dns/avahi-0.6.31-r2[${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[${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= )
-"
-
-DEPEND="${RDEPEND}
- v4l? ( sys-kernel/linux-headers )
- doc? (
- virtual/latex-base
- dev-texlive/texlive-latexextra
- )
- >=sys-apps/sed-4
-
- >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]"
-
-# We now use new syntax construct (SUBSYSTEMS!="usb|usb_device)
-RDEPEND="${RDEPEND}
- !<sys-fs/udev-114
- abi_x86_32? (
- !<=app-emulation/emul-linux-x86-medialibs-20140508
- !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)]
- )"
-
-MULTILIB_CHOST_TOOLS=(
- /usr/bin/sane-config
-)
-
-pkg_setup() {
- enewgroup scanner
- enewuser saned -1 -1 -1 scanner
-}
-
-src_prepare() {
- 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
- epatch "${FILESDIR}"/niash_array_index.patch \
- "${FILESDIR}"/${P}-unused-cups.patch \
- "${FILESDIR}"/${P}-automagic_systemd.patch \
- "${FILESDIR}"/${P}-systemd_pkgconfig.patch \
- "${FILESDIR}"/${P}-kodakaio_avahi.patch \
- "${FILESDIR}"/${P}-saned_pidfile_location.patch \
- "${FILESDIR}"/${P}-cross-compile.patch
- # Fix for "make check".
- sed -i -e 's/sane-backends 1.0.24git/sane-backends 1.0.24/' testsuite/tools/data/html*
- AT_NOELIBTOOLIZE=yes eautoreconf
-}
-
-src_configure() {
- 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 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_enable usb libusb_1_0)
- $(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 doc; then
- myconf+=( --disable-latex )
- 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
- # if LINGUAS is set, just use the listed and supported localizations.
- if [ "${LINGUAS-NoLocalesSet}" != NoLocalesSet ]; then
- mkdir -p po || die
- echo > po/LINGUAS
- for lang in ${LINGUAS}; do
- if [ -a "${S}"/po/${lang}.po ]; then
- echo ${lang} >> po/LINGUAS
- fi
- done
- fi
-
- # relative path must be used for tests to work properly
- ECONF_SOURCE=../${P} \
- 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 avahi) \
- $(use_enable ipv6) \
- $(use_enable threads pthread) \
- "${myconf[@]}"
-}
-
-multilib_src_compile() {
- emake VARTEXFONTS="${T}/fonts"
-
- if use usb; then
- cd tools/hotplug || die
- sed -i -e '/^$/d' libsane.usermap || die
- fi
-
- if tc-is-cross-compiler; then
- # 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
- cd "${BUILD_DIR}"/tools || die
- ${BUILD_CC} ${BUILD_CPPFLAGS} ${BUILD_CFLAGS} -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[@]}"
- 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 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 --all
- 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] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/sane-backends/files/, media-gfx/sane-backends/
@ 2018-10-20 16:36 Pacho Ramos
0 siblings, 0 replies; 8+ messages in thread
From: Pacho Ramos @ 2018-10-20 16:36 UTC (permalink / raw
To: gentoo-commits
commit: b4a4aa9c04d755547aa82b881499fd7a6172bfc9
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 20 15:11:29 2018 +0000
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sat Oct 20 16:35:31 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4a4aa9c
media-gfx/sane-backends: Fixes from Fedora and Debian...
They fix an important bug with Samsung devices not being properly recognized
and noises in some devices.
We also start disabling locking as all the other distributions and stop
trying to randomly generate extra documentation files that are not really
needed and add a lot of hidden dependencies tend to break in several ways.
Closes: https://bugs.gentoo.org/636202
Closes: https://bugs.gentoo.org/653300
Closes: https://bugs.gentoo.org/668232
Closes: https://bugs.gentoo.org/668350
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11
.../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-r2.ebuild | 344 +++++++++++++++++
3 files changed, 775 insertions(+)
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
new file mode 100644
index 00000000000..af3e141a010
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backends-1.0.27-revert-samsung.patch
@@ -0,0 +1,406 @@
+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
new file mode 100644
index 00000000000..0311975c0ce
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backends-1.0.27-uninitialized-variable.patch
@@ -0,0 +1,25 @@
+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-r2.ebuild b/media-gfx/sane-backends/sane-backends-1.0.27-r2.ebuild
new file mode 100644
index 00000000000..4ce3733007d
--- /dev/null
+++ b/media-gfx/sane-backends/sane-backends-1.0.27-r2.ebuild
@@ -0,0 +1,344 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit 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 ~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}]
+"
+
+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
+ ECONF_SOURCE=${S} \
+ SANEI_JPEG="sanei_jpeg.o" SANEI_JPEG_LO="sanei_jpeg.lo" \
+ BACKENDS="${BACKENDS}" \
+ # 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 \
+ --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] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/sane-backends/files/, media-gfx/sane-backends/
@ 2020-06-26 22:34 Thomas Deutschmann
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Deutschmann @ 2020-06-26 22:34 UTC (permalink / raw
To: gentoo-commits
commit: 2359950077b026cc6bbe861b1126f5d34b6eac45
Author: Sam James (sam_c) <sam <AT> cmpct <DOT> info>
AuthorDate: Mon Jun 22 21:42:47 2020 +0000
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Fri Jun 26 22:34:03 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=23599500
media-gfx/sane-backends: security bump to 1.0.30
Closes: https://bugs.gentoo.org/691204
Bug: https://bugs.gentoo.org/729312
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Sam James (sam_c) <sam <AT> cmpct.info>
Closes: https://github.com/gentoo/gentoo/pull/16384
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
media-gfx/sane-backends/Manifest | 1 +
...ne-backends-1.0.30-missing-stdint-include.patch | 14 +
.../sane-backends/sane-backends-1.0.30.ebuild | 344 +++++++++++++++++++++
3 files changed, 359 insertions(+)
diff --git a/media-gfx/sane-backends/Manifest b/media-gfx/sane-backends/Manifest
index 44566ad3544..1e5f15e24b2 100644
--- a/media-gfx/sane-backends/Manifest
+++ b/media-gfx/sane-backends/Manifest
@@ -1 +1,2 @@
+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.30-missing-stdint-include.patch b/media-gfx/sane-backends/files/sane-backends-1.0.30-missing-stdint-include.patch
new file mode 100644
index 00000000000..14c97ae95bf
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backends-1.0.30-missing-stdint-include.patch
@@ -0,0 +1,14 @@
+https://gitlab.com/sane-project/backends/-/issues/314
+https://gitlab.com/sane-project/backends/-/commit/6bb87fdf1f3dc190cfc4b7d64b0c8c8c3d10151b.diff
+--- a/sanei/sanei_usb.c
++++ b/sanei/sanei_usb.c
+@@ -48,6 +48,9 @@
+
+ #include "../include/sane/config.h"
+
++#ifdef HAVE_STDINT_H
++# include <stdint.h>
++#endif
+ #include <stdlib.h>
+ #include <ctype.h>
+ #include <sys/types.h>
diff --git a/media-gfx/sane-backends/sane-backends-1.0.30.ebuild b/media-gfx/sane-backends/sane-backends-1.0.30.ebuild
new file mode 100644
index 00000000000..19095de1445
--- /dev/null
+++ b/media-gfx/sane-backends/sane-backends-1.0.30.ebuild
@@ -0,0 +1,344 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools 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 )
+"
+
+MY_PN=${PN//sane-/}
+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.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
+"
+
+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
+)
+
+S="${WORKDIR}/${MY_P}"
+
+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
+
+ # Patch out the git reference so we can run eautoreconf
+ sed -i -e "s/m4_esyscmd_s(\[git describe --dirty\])/${PV}/" 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
+
+}
+
+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 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] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/sane-backends/files/, media-gfx/sane-backends/
@ 2021-04-05 9:12 Andreas Sturmlechner
0 siblings, 0 replies; 8+ messages in thread
From: Andreas Sturmlechner @ 2021-04-05 9:12 UTC (permalink / raw
To: gentoo-commits
commit: 13e43411abc6f410a4d227395767d8886d107fa3
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 5 09:07:10 2021 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Mon Apr 5 09:12:22 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13e43411
media-gfx/sane-backends: Drop 1.0.30-r2
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
media-gfx/sane-backends/Manifest | 1 -
.../sane-backends-1.0.30-bigendian-depth.patch | 14 -
...ne-backends-1.0.30-missing-stdint-include.patch | 14 -
.../sane-backends/sane-backends-1.0.30-r2.ebuild | 350 ---------------------
4 files changed, 379 deletions(-)
diff --git a/media-gfx/sane-backends/Manifest b/media-gfx/sane-backends/Manifest
index ab68444f748..789686c7720 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 backends-1.0.31.tar.gz 5731445 BLAKE2B d70691acbd3f5788a26bab6b35eeb243801b435272b57e3fa568127562ff57797452e396e6e5f058c33d3bce0f99b672542fb89bc8eb4d36cbe82ccc20b8f298 SHA512 d8ef05cc3aa9c4fa42c9241e1e61fc93e7959df3746a3a2cfaa6e4fb26dfd0911b4d3227b2da28852f8630fa17ad3432a1230a6f4425340e79a3b82ec5eaa9eb
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
deleted file mode 100644
index bac06593b9e..00000000000
--- a/media-gfx/sane-backends/files/sane-backends-1.0.30-bigendian-depth.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-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/files/sane-backends-1.0.30-missing-stdint-include.patch b/media-gfx/sane-backends/files/sane-backends-1.0.30-missing-stdint-include.patch
deleted file mode 100644
index 14c97ae95bf..00000000000
--- a/media-gfx/sane-backends/files/sane-backends-1.0.30-missing-stdint-include.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-https://gitlab.com/sane-project/backends/-/issues/314
-https://gitlab.com/sane-project/backends/-/commit/6bb87fdf1f3dc190cfc4b7d64b0c8c8c3d10151b.diff
---- a/sanei/sanei_usb.c
-+++ b/sanei/sanei_usb.c
-@@ -48,6 +48,9 @@
-
- #include "../include/sane/config.h"
-
-+#ifdef HAVE_STDINT_H
-+# include <stdint.h>
-+#endif
- #include <stdlib.h>
- #include <ctype.h>
- #include <sys/types.h>
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
deleted file mode 100644
index 58731276dda..00000000000
--- a/media-gfx/sane-backends/sane-backends-1.0.30-r2.ebuild
+++ /dev/null
@@ -1,350 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools flag-o-matic multilib-minimal optfeature 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
- 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
- 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 )
-"
-
-MY_PN=${PN//sane-/}
-MY_P="${MY_PN}-${PV}"
-
-DESCRIPTION="Scanner Access Now Easy - Backends"
-HOMEPAGE="http://www.sane-project.org/"
-SRC_URI="https://gitlab.com/sane-project/backends/-/archive/${PV}/${MY_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"
-
-# For pixma: see https://gitlab.com/sane-project/backends/-/releases/1.0.28#build
-RDEPEND="
- 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? (
- || (
- net-dns/avahi[dbus]
- net-dns/avahi[gtk]
- net-dns/avahi[gtk2]
- )
- 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="
- 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}"/${P}-missing-stdint-include.patch
- "${FILESDIR}"/${PN}-1.0.30-add_hpaio_epkowa_dll.conf.patch
- "${FILESDIR}"/${PN}-1.0.30-bigendian-depth.patch
-)
-
-S="${WORKDIR}/${MY_P}"
-
-MULTILIB_CHOST_TOOLS=(
- /usr/bin/sane-config
-)
-
-pkg_setup() {
- enewgroup scanner
- enewuser saned -1 -1 -1 scanner
-}
-
-src_prepare() {
- default
-
- # Patch out the git reference so we can run eautoreconf
- sed -i -e "s/m4_esyscmd_s(\[git describe --dirty\])/${PV}/" 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
-
-}
-
-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="${lbackends} v4l"
- for backend in ${IUSE_SANE_BACKENDS}; do
- if use "sane_backends_${backend}" && [ ${backend} != pnm ]; then
- lbackends="${lbackends} ${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="${lbackends}" \
- 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 || 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
-
- 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 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() {
- 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
-
- 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] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/sane-backends/files/, media-gfx/sane-backends/
@ 2022-01-22 11:20 Pacho Ramos
0 siblings, 0 replies; 8+ messages in thread
From: Pacho Ramos @ 2022-01-22 11:20 UTC (permalink / raw
To: gentoo-commits
commit: 15b01aed0650b4f7621558ca101573caae398297
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 22 11:19:47 2022 +0000
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sat Jan 22 11:20:07 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=15b01aed
media-gfx/sane-backends: Avoid scanner group usage
scanner group usage ends up breaking cups printing due to changing
permissions and owners of devices in an uncontrolled way (#644636)
Follow CUPS upstream suggestion to generate udev rules as other
distributions (Fedora or Arch, for example) to avoid this issue.
https://github.com/OpenPrinting/cups/issues/314
https://gitlab.com/sane-project/backends/-/issues/546
https://wiki.gentoo.org/wiki/Printing#USB_Printer_is_not_detected
Bug: https://bugs.gentoo.org/644636
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
media-gfx/sane-backends/files/66-saned.rules | 2 +
.../sane-backends/sane-backends-1.1.1-r1.ebuild | 363 +++++++++++++++++++++
2 files changed, 365 insertions(+)
diff --git a/media-gfx/sane-backends/files/66-saned.rules b/media-gfx/sane-backends/files/66-saned.rules
new file mode 100644
index 000000000000..3c9ec85d4822
--- /dev/null
+++ b/media-gfx/sane-backends/files/66-saned.rules
@@ -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+="/usr/bin/setfacl -m g:saned:rw $env{DEVNAME}"
diff --git a/media-gfx/sane-backends/sane-backends-1.1.1-r1.ebuild b/media-gfx/sane-backends/sane-backends-1.1.1-r1.ebuild
new file mode 100644
index 000000000000..fd756b73c128
--- /dev/null
+++ b/media-gfx/sane-backends/sane-backends-1.1.1-r1.ebuild
@@ -0,0 +1,363 @@
+# 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
+)
+
+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] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/sane-backends/files/, media-gfx/sane-backends/
@ 2022-04-17 19:00 Sam James
0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2022-04-17 19:00 UTC (permalink / raw
To: gentoo-commits
commit: 24aa55dea52e68e4598c4216258030894bf04e31
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 17 18:57:53 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr 17 19:00:08 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=24aa55de
media-gfx/sane-backends: drop 1.0.31-r2, 1.0.32, 1.1.1, 1.1.1-r1
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-gfx/sane-backends/Manifest | 2 -
.../files/sane-backends-1.0.31-autoconf-2.70.patch | 93 ------
.../sane-backends-1.0.31-backend_pot_input.patch | 33 --
.../sane-backends-1.0.31-udev_rules_update.patch | 55 ----
.../sane-backends/sane-backends-1.0.31-r2.ebuild | 360 --------------------
.../sane-backends/sane-backends-1.0.32.ebuild | 353 --------------------
.../sane-backends/sane-backends-1.1.1-r1.ebuild | 363 ---------------------
media-gfx/sane-backends/sane-backends-1.1.1.ebuild | 353 --------------------
8 files changed, 1612 deletions(-)
diff --git a/media-gfx/sane-backends/Manifest b/media-gfx/sane-backends/Manifest
index 0d95dbf24774..1c5f2c1f96df 100644
--- a/media-gfx/sane-backends/Manifest
+++ b/media-gfx/sane-backends/Manifest
@@ -1,3 +1 @@
-DIST backends-1.0.31.tar.gz 5731445 BLAKE2B d70691acbd3f5788a26bab6b35eeb243801b435272b57e3fa568127562ff57797452e396e6e5f058c33d3bce0f99b672542fb89bc8eb4d36cbe82ccc20b8f298 SHA512 d8ef05cc3aa9c4fa42c9241e1e61fc93e7959df3746a3a2cfaa6e4fb26dfd0911b4d3227b2da28852f8630fa17ad3432a1230a6f4425340e79a3b82ec5eaa9eb
-DIST sane-backends-1.0.32.tar.gz 7349442 BLAKE2B 8841542ffd520b38bbeb532eaae7cce803f0bd868cae7edc28d2138729dcffb5a2a0908b56c16c25ffbba539525331c12c259e1768e105de1bdd1419d29efe83 SHA512 416757d9a69bbc18678d1f16a024ba5a949c571204a68f36009d416be28723886ccea71daaa7da90d20eac9696cd44e567802d6c21c3fc5914b97213bbedb6d5
DIST sane-backends-1.1.1.tar.gz 7447569 BLAKE2B 02ac1822beabb12f19ce2d7c053f0f727313d13e0f9380325492a2f0048094f78a118f7659b4c6e39b60c4ea319d862a242f8866a67c84e5649d9ae2691d9473 SHA512 25bd9f90d550cfe6a6d01c48e83716a53f4b0e3a294287e455ecb5e5b80c8fe1699f45c6c87f694475cceb85745c70597e18a7b1094669d5091c5fb183dfe94d
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.31-autoconf-2.70.patch b/media-gfx/sane-backends/files/sane-backends-1.0.31-autoconf-2.70.patch
deleted file mode 100644
index f1fe4765bdd5..000000000000
--- a/media-gfx/sane-backends/files/sane-backends-1.0.31-autoconf-2.70.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From 445b5bd7e19245c08de6a0e669dd9211d2597bfa Mon Sep 17 00:00:00 2001
-From: Olaf Meeuwissen <paddy-hack@member.fsf.org>
-Date: Fri, 1 Jan 2021 15:53:11 +0900
-Subject: [PATCH] Drop use of obsoleted autoconf AC_HEADER_STDC macro. Fixes
- #409
-
-Use of the STDC_HEADER pre-processor macro that the autoconf macro
-used to define has been removed. Conditionalized code is now used
-unconditionally. This should be fine as the macro checks for ANSI
-C, i.e. C89 (ISO C90), compliant headers. We already require C99.
----
- acinclude.m4 | 3 ---
- lib/md5.c | 10 ++--------
- sanei/sanei_pa4s2.c | 8 +++-----
- sanei/sanei_pp.c | 8 +++-----
- 4 files changed, 8 insertions(+), 21 deletions(-)
-
-diff --git a/acinclude.m4 b/acinclude.m4
-index e10f8ceb2..9393278c2 100644
---- a/acinclude.m4
-+++ b/acinclude.m4
-@@ -73,9 +73,6 @@ AC_DEFUN([SANE_CHECK_MISSING_HEADERS],
- if test "${ac_cv_header_unistd_h}" != "yes" ; then
- MISSING_HEADERS="${MISSING_HEADERS}\"unistd.h\" "
- fi
-- if test "${ac_cv_header_stdc}" != "yes" ; then
-- MISSING_HEADERS="${MISSING_HEADERS}\"ANSI C headers\" "
-- fi
- if test "${MISSING_HEADERS}" != "" ; then
- echo "*** The following essential header files couldn't be found:"
- echo "*** ${MISSING_HEADERS}"
-diff --git a/lib/md5.c b/lib/md5.c
-index 923a17c78..009c6d9a0 100644
---- a/lib/md5.c
-+++ b/lib/md5.c
-@@ -26,14 +26,8 @@
-
- #include <sys/types.h>
-
--#if STDC_HEADERS || defined _LIBC
--# include <stdlib.h>
--# include <string.h>
--#else
--# ifndef HAVE_MEMCPY
--# define memcpy(d, s, n) bcopy ((s), (d), (n))
--# endif
--#endif
-+#include <stdlib.h>
-+#include <string.h>
-
- #include "md5.h"
-
-diff --git a/sanei/sanei_pa4s2.c b/sanei/sanei_pa4s2.c
-index b1d95fe02..5365151fd 100644
---- a/sanei/sanei_pa4s2.c
-+++ b/sanei/sanei_pa4s2.c
-@@ -150,11 +150,9 @@ static int sanei_pa4s2_dbg_init_called = SANE_FALSE;
-
- #endif /* NDEBUG */
-
--#if defined(STDC_HEADERS)
--# include <errno.h>
--# include <stdio.h>
--# include <stdlib.h>
--#endif
-+#include <errno.h>
-+#include <stdio.h>
-+#include <stdlib.h>
- #if defined(HAVE_STRING_H)
- # include <string.h>
- #elif defined(HAVE_STRINGS_H)
-diff --git a/sanei/sanei_pp.c b/sanei/sanei_pp.c
-index 3077342e4..752945a89 100644
---- a/sanei/sanei_pp.c
-+++ b/sanei/sanei_pp.c
-@@ -135,11 +135,9 @@ inb( u_long port )
- #include "../include/sane/sanei_debug.h"
- #include "../include/sane/sanei_pp.h"
-
--#if defined(STDC_HEADERS)
--# include <errno.h>
--# include <stdio.h>
--# include <stdlib.h>
--#endif
-+#include <errno.h>
-+#include <stdio.h>
-+#include <stdlib.h>
- #if defined(HAVE_STRING_H)
- # include <string.h>
- #elif defined(HAVE_STRINGS_H)
---
-GitLab
-
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.31-backend_pot_input.patch b/media-gfx/sane-backends/files/sane-backends-1.0.31-backend_pot_input.patch
deleted file mode 100644
index 69585784c252..000000000000
--- a/media-gfx/sane-backends/files/sane-backends-1.0.31-backend_pot_input.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 4846d36ad1e9ca709cb3a2eaa839c8c79effe34b Mon Sep 17 00:00:00 2001
-From: Olaf Meeuwissen <paddy-hack@member.fsf.org>
-Date: Sun, 13 Sep 2020 17:56:40 +0900
-Subject: [PATCH] po: Make sure all sane-backends.pot input are available
-
----
- po/Makevars | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/po/Makevars b/po/Makevars
-index ebff23f90..86f423ef3 100644
---- a/po/Makevars
-+++ b/po/Makevars
-@@ -1,5 +1,6 @@
- # Makevars -- snippet for inclusion in po/ -*- Makefile -*-
--# Copyright (C) 2016, 2019 Olaf Meeuwissen and the SANE developers
-+# Copyright (C) 2016, 2019, 2020 Olaf Meeuwissen
-+# and the SANE developers
- #
- # This file is part of the SANE build infra-structure. See the
- # included LICENSE file for license information.
-@@ -47,3 +48,8 @@ width_options = --width=75
- # Locale categories, in addition to LC_MESSAGES, for which message
- # catalogs are to be used.
- EXTRA_LOCALE_CATEGORIES =
-+
-+# Selected files in POTFILES.in are generated. Make sure they are
-+# available when needed.
-+$(top_srcdir)/backend/pixma/pixma_sane_options.c:
-+ cd ../backend; make pixma/pixma_sane_options.c
---
-GitLab
-
diff --git a/media-gfx/sane-backends/files/sane-backends-1.0.31-udev_rules_update.patch b/media-gfx/sane-backends/files/sane-backends-1.0.31-udev_rules_update.patch
deleted file mode 100644
index 17ccb60755e0..000000000000
--- a/media-gfx/sane-backends/files/sane-backends-1.0.31-udev_rules_update.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-https://gitlab.com/sane-project/backends/-/merge_requests/541
-
---- sane-backends-1.0.31/testsuite/tools/data/udev+acl.ref
-+++ sane-backends-1.0.31/testsuite/tools/data/udev+acl.ref
-@@ -23,7 +23,7 @@
- # If the scanner is supported by sane-backends, please mail the entry to
- # the sane-devel mailing list (sane-devel@alioth-lists.debian.net).
- #
--ACTION!="add", GOTO="libsane_rules_end"
-+ACTION=="remove", GOTO="libsane_rules_end"
- ENV{DEVTYPE}=="usb_device", GOTO="libsane_create_usb_dev"
- SUBSYSTEMS=="scsi", GOTO="libsane_scsi_rules_begin"
- SUBSYSTEM=="usb_device", GOTO="libsane_usb_rules_begin"
---- sane-backends-1.0.31/testsuite/tools/data/udev+hwdb.ref
-+++ sane-backends-1.0.31/testsuite/tools/data/udev+hwdb.ref
-@@ -20,7 +20,7 @@
- # If the scanner is supported by sane-backends, please mail the entry to
- # the sane-devel mailing list (sane-devel@alioth-lists.debian.net).
- #
--ACTION!="add", GOTO="libsane_rules_end"
-+ACTION=="remove", GOTO="libsane_rules_end"
-
- # The following rule will disable USB autosuspend for the device
- ENV{DEVTYPE}=="usb_device", ENV{libsane_matched}=="yes", TEST=="power/control", ATTR{power/control}="on"
---- sane-backends-1.0.31/testsuite/tools/data/udev.ref
-+++ sane-backends-1.0.31/testsuite/tools/data/udev.ref
-@@ -23,7 +23,7 @@
- # If the scanner is supported by sane-backends, please mail the entry to
- # the sane-devel mailing list (sane-devel@alioth-lists.debian.net).
- #
--ACTION!="add", GOTO="libsane_rules_end"
-+ACTION=="remove", GOTO="libsane_rules_end"
- ENV{DEVTYPE}=="usb_device", GOTO="libsane_create_usb_dev"
- SUBSYSTEMS=="scsi", GOTO="libsane_scsi_rules_begin"
- SUBSYSTEM=="usb_device", GOTO="libsane_usb_rules_begin"
---- sane-backends-1.0.31/tools/sane-desc.c
-+++ sane-backends-1.0.31/tools/sane-desc.c
-@@ -3496,7 +3496,7 @@
- int i;
-
- print_udev_header ();
-- printf("ACTION!=\"add\", GOTO=\"libsane_rules_end\"\n"
-+ printf("ACTION==\"remove\", GOTO=\"libsane_rules_end\"\n"
- "ENV{DEVTYPE}==\"usb_device\", GOTO=\"libsane_create_usb_dev\"\n"
- "SUBSYSTEMS==\"scsi\", GOTO=\"libsane_scsi_rules_begin\"\n"
- "SUBSYSTEM==\"usb_device\", GOTO=\"libsane_usb_rules_begin\"\n"
-@@ -3679,7 +3679,7 @@
- int i;
-
- print_udevhwdb_header ();
-- printf("ACTION!=\"add\", GOTO=\"libsane_rules_end\"\n\n");
-+ printf("ACTION==\"remove\", GOTO=\"libsane_rules_end\"\n\n");
-
- printf("# The following rule will disable USB autosuspend for the device\n");
- printf("ENV{DEVTYPE}==\"usb_device\", ENV{libsane_matched}==\"yes\", TEST==\"power/control\", ATTR{power/control}=\"on\"\n\n");
diff --git a/media-gfx/sane-backends/sane-backends-1.0.31-r2.ebuild b/media-gfx/sane-backends/sane-backends-1.0.31-r2.ebuild
deleted file mode 100644
index fd7cd87c6000..000000000000
--- a/media-gfx/sane-backends/sane-backends-1.0.31-r2.ebuild
+++ /dev/null
@@ -1,360 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python3_{8..9} )
-
-# 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 )
-"
-
-MY_PN="${PN//sane-/}"
-MY_P="${MY_PN}-${PV}"
-
-DESCRIPTION="Scanner Access Now Easy - Backends"
-HOMEPAGE="http://www.sane-project.org/"
-SRC_URI="https://gitlab.com/sane-project/backends/-/archive/${PV}/${MY_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-group/scanner
- 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
- "${FILESDIR}"/${P}-autoconf-2.70.patch #750374
- "${FILESDIR}"/${P}-udev_rules_update.patch
- "${FILESDIR}"/${P}-backend_pot_input.patch
-)
-
-S="${WORKDIR}/${MY_P}"
-
-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
-}
-
-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
-
- 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 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 "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
-
- 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
-}
diff --git a/media-gfx/sane-backends/sane-backends-1.0.32.ebuild b/media-gfx/sane-backends/sane-backends-1.0.32.ebuild
deleted file mode 100644
index a1fde1572b8b..000000000000
--- a/media-gfx/sane-backends/sane-backends-1.0.32.ebuild
+++ /dev/null
@@ -1,353 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-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/104f09c07d35519cc8e72e604f11643f/${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-group/scanner
- 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
-)
-
-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
-}
-
-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
-
- 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 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
-
- 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
-}
diff --git a/media-gfx/sane-backends/sane-backends-1.1.1-r1.ebuild b/media-gfx/sane-backends/sane-backends-1.1.1-r1.ebuild
deleted file mode 100644
index fd756b73c128..000000000000
--- a/media-gfx/sane-backends/sane-backends-1.1.1-r1.ebuild
+++ /dev/null
@@ -1,363 +0,0 @@
-# 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
-)
-
-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
-}
diff --git a/media-gfx/sane-backends/sane-backends-1.1.1.ebuild b/media-gfx/sane-backends/sane-backends-1.1.1.ebuild
deleted file mode 100644
index 0453269675fb..000000000000
--- a/media-gfx/sane-backends/sane-backends-1.1.1.ebuild
+++ /dev/null
@@ -1,353 +0,0 @@
-# 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-group/scanner
- 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
-)
-
-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
-}
-
-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
-
- 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 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
-
- 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] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-gfx/sane-backends/files/, media-gfx/sane-backends/
@ 2022-11-04 3:59 Sam James
0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2022-11-04 3:59 UTC (permalink / raw
To: gentoo-commits
commit: 1ed286d1a7256205061253ffe58df0fc2a48f8ae
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 4 03:58:50 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Nov 4 03:58:50 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ed286d1
media-gfx/sane-backends: fix tests w/ gcc 12
Closes: https://bugs.gentoo.org/840137
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/sane-backends-1.1.1-gcc12-tests.patch | 78 ++++++++++++++++++++++
.../sane-backends/sane-backends-1.1.1-r4.ebuild | 1 +
2 files changed, 79 insertions(+)
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
new file mode 100644
index 000000000000..25a1e4db265e
--- /dev/null
+++ b/media-gfx/sane-backends/files/sane-backends-1.1.1-gcc12-tests.patch
@@ -0,0 +1,78 @@
+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/sane-backends-1.1.1-r4.ebuild b/media-gfx/sane-backends/sane-backends-1.1.1-r4.ebuild
index 6bff44a1f891..e34fadb86e95 100644
--- a/media-gfx/sane-backends/sane-backends-1.1.1-r4.ebuild
+++ b/media-gfx/sane-backends/sane-backends-1.1.1-r4.ebuild
@@ -182,6 +182,7 @@ PATCHES=(
"${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
)
MULTILIB_CHOST_TOOLS=(
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-11-04 3:59 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-20 16:36 [gentoo-commits] repo/gentoo:master commit in: media-gfx/sane-backends/files/, media-gfx/sane-backends/ Pacho Ramos
-- strict thread matches above, loose matches on Subject: below --
2022-11-04 3:59 Sam James
2022-04-17 19:00 Sam James
2022-01-22 11:20 Pacho Ramos
2021-04-05 9:12 Andreas Sturmlechner
2020-06-26 22:34 Thomas Deutschmann
2017-09-27 10:56 Pacho Ramos
2016-04-26 22:27 Austin English
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox