From dc2b59b0e5f4ce64a2a1f160eac0393412561317 Mon Sep 17 00:00:00 2001 From: amak Date: Thu, 8 Jul 2021 18:42:06 +1000 Subject: [PATCH] sane: add libcurl for escl backend, add runit service Avahi support is now optional. The escl backend is only available if Avahi is enabled. When SANE is built with Avahi support, saned will spawn a child process that is related to Avahi functionality. This process can't be stopped by sv and will remain after the main saned process is terminated. Reported upstream: https://gitlab.com/sane-project/backends/-/issues/499 --- srcpkgs/sane/files/saned/run | 3 +++ srcpkgs/sane/template | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 srcpkgs/sane/files/saned/run diff --git a/srcpkgs/sane/files/saned/run b/srcpkgs/sane/files/saned/run new file mode 100644 index 000000000000..18016ad066c4 --- /dev/null +++ b/srcpkgs/sane/files/saned/run @@ -0,0 +1,3 @@ +#!/bin/sh +[ -r ./conf ] && . ./conf +exec saned -l -u _saned ${OPTS} diff --git a/srcpkgs/sane/template b/srcpkgs/sane/template index 4e8cdab17d61..c21c9ea8aed1 100644 --- a/srcpkgs/sane/template +++ b/srcpkgs/sane/template @@ -9,20 +9,26 @@ configure_args="--disable-locking --enable-ipv6 --enable-pthread --with-usb --docdir=/usr/share/doc/sane ac_cv_func_mmap_fixed_mapped=yes $(vopt_with snmp)" hostmakedepends="pkg-config python3" -makedepends="avahi-libs-devel libjpeg-turbo-devel tiff-devel libgphoto2-devel - v4l-utils-devel libusb-devel openssl-devel libxml2-devel - $(vopt_if snmp net-snmp-devel)" +makedepends="libjpeg-turbo-devel tiff-devel libgphoto2-devel v4l-utils-devel + libusb-devel openssl-devel libxml2-devel $(vopt_if snmp net-snmp-devel) + $(vopt_if avahi 'avahi-libs-devel libcurl-devel')" depends="$(vopt_if snmp net-snmp)" conf_files="/etc/sane.d/*.conf" short_desc="Scanner Access Now Easy" maintainer="Piraty " license="custom:GPL-2.0-or-later-with-SANE-exception" homepage="http://www.sane-project.org/" +changelog="https://gitlab.com/sane-project/backends/-/raw/master/NEWS" distfiles="https://gitlab.com/sane-project/backends/uploads/${_gitlab_release_hash}/sane-backends-${version}.tar.gz" checksum=3a28c237c0a72767086202379f6dc92dbb63ec08dfbab22312cba80e238bb114 noshlibprovides="avoid false detection of device drivers" -build_options="snmp" +# additional group 'lp' is required by saned to access some all-in-one devices +system_accounts="_saned" +_saned_groups="lp,scanner" + +build_options="avahi snmp" +build_options_default="avahi" # tests broken on 32bit. https://gitlab.com/sane-project/backends/-/issues/157 if [ "$XBPS_TARGET_WORDSIZE" = "32" ]; then @@ -47,6 +53,8 @@ post_install() { sed -n \ -e "/\/* sane - Scanner Access Now Easy./,/dynamic linking to load backends on demand./p" \ "${wrksrc}/backend/dll.c" > "${DESTDIR}/usr/share/licenses/sane/SANE-EXCEPTION" + + vsv saned } libsane_package() {