diff options
author | Sam James <sam@gentoo.org> | 2022-11-04 04:17:27 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-11-04 04:18:58 +0000 |
commit | 3865b4531959596959b487d84fd862e2aac4999f (patch) | |
tree | ef6378d26a038be7694795f3174d6c98ac203803 /media-gfx/sane-backends/files | |
parent | profiles/arch/amd64: stable mask www-client/qutebrowser pdf (diff) | |
download | gentoo-3865b4531959596959b487d84fd862e2aac4999f.tar.gz gentoo-3865b4531959596959b487d84fd862e2aac4999f.tar.bz2 gentoo-3865b4531959596959b487d84fd862e2aac4999f.zip |
media-gfx/sane-backends: fix configure w/ clang 16; fix service file & udev
- Fix configure with Clang 16
- Fix saned_at.service user name (scanner->saned, as scanner is the group)
- Fix path to setfacl in udev rule (previous one assumed /usr merge)
- Fix group name in udev rule (saned->scanner)
- Call udev_reload in pkg_post{rm,inst}
Closes: https://bugs.gentoo.org/876772
Closes: https://bugs.gentoo.org/859619
Closes: https://bugs.gentoo.org/849590
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-gfx/sane-backends/files')
4 files changed, 97 insertions, 0 deletions
diff --git a/media-gfx/sane-backends/files/66-saned.rules-r1 b/media-gfx/sane-backends/files/66-saned.rules-r1 new file mode 100644 index 000000000000..4e1fe9507eae --- /dev/null +++ b/media-gfx/sane-backends/files/66-saned.rules-r1 @@ -0,0 +1,2 @@ +# udev rule for saned (SANE scanning daemon) to be able to write on usb port +ENV{libsane_matched}=="yes", ENV{DEVNAME}!="", RUN+="/bin/setfacl -m g:scanner:rw $env{DEVNAME}" diff --git a/media-gfx/sane-backends/files/sane-backends-1.1.1-configure-clang16.patch b/media-gfx/sane-backends/files/sane-backends-1.1.1-configure-clang16.patch new file mode 100644 index 000000000000..cc8a48b18b67 --- /dev/null +++ b/media-gfx/sane-backends/files/sane-backends-1.1.1-configure-clang16.patch @@ -0,0 +1,43 @@ +https://gitlab.com/sane-project/backends/-/merge_requests/763 + +From 300b460970f538ab515835f14650785e88808a8f Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Fri, 4 Nov 2022 04:04:46 +0000 +Subject: [PATCH] acinclude.m4: fix -Wimplicit-function-declaration + +-Wimplicit-function-declaration will become an error by default +in Clang 16. + +Fixes errors like: +``` +error: call to undeclared library function 'exit' with type 'void (int) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] +``` + +Signed-off-by: Sam James <sam@gentoo.org> +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -471,6 +471,7 @@ AC_DEFUN([SANE_CHECK_IPV6], + if test "$ipv6" != "no" ; then + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #define INET6 ++ #include <stdlib.h> + #include <sys/types.h> + #include <sys/socket.h> ]], [[ + /* AF_INET6 available check */ +@@ -492,6 +493,7 @@ AC_DEFUN([SANE_CHECK_IPV6], + AC_MSG_CHECKING([whether struct sockaddr_storage has an ss_family member]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #define INET6 ++ #include <stdlib.h> + #include <sys/types.h> + #include <sys/socket.h> ]], [[ + /* test if the ss_family member exists in struct sockaddr_storage */ +@@ -504,6 +506,7 @@ AC_DEFUN([SANE_CHECK_IPV6], + ], [ + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #define INET6 ++ #include <stdlib.h> + #include <sys/types.h> + #include <sys/socket.h> ]], [[ + /* test if the __ss_family member exists in struct sockaddr_storage */ +GitLab diff --git a/media-gfx/sane-backends/files/sane-backends-1.1.1-musl.patch b/media-gfx/sane-backends/files/sane-backends-1.1.1-musl.patch new file mode 100644 index 000000000000..8aebb50672a1 --- /dev/null +++ b/media-gfx/sane-backends/files/sane-backends-1.1.1-musl.patch @@ -0,0 +1,34 @@ +https://gitlab.com/sane-project/backends/-/commit/12560890a6e298091bd63b8093a35604416eb92a + +From 12560890a6e298091bd63b8093a35604416eb92a Mon Sep 17 00:00:00 2001 +From: David Ward <david.ward@gatech.edu> +Date: Thu, 21 Apr 2022 23:37:33 -0400 +Subject: [PATCH] Fix header file used for poll() + +POSIX specifies the header to include is <poll.h>, not <sys/poll.h>. +This results in a compiler warning with musl libc (on Alpine Linux). +--- a/configure.ac ++++ b/configure.ac +@@ -202,7 +202,7 @@ AC_HEADER_STDC + AC_CHECK_HEADERS(fcntl.h unistd.h libc.h sys/dsreq.h sys/select.h \ + sys/time.h sys/shm.h sys/ipc.h sys/scanio.h os2.h \ + sys/socket.h sys/io.h sys/hw.h sys/types.h linux/ppdev.h \ +- dev/ppbus/ppi.h machine/cpufunc.h sys/sem.h sys/poll.h \ ++ dev/ppbus/ppi.h machine/cpufunc.h sys/sem.h poll.h \ + windows.h be/kernel/OS.h limits.h sys/ioctl.h asm/types.h\ + netinet/in.h tiffio.h ifaddrs.h pwd.h getopt.h) + AC_CHECK_HEADERS([asm/io.h],,,[#include <sys/types.h>]) +--- a/frontend/saned.c ++++ b/frontend/saned.c +@@ -84,8 +84,8 @@ + + #include "lgetopt.h" + +-#if defined(HAVE_SYS_POLL_H) && defined(HAVE_POLL) +-# include <sys/poll.h> ++#if defined(HAVE_POLL_H) && defined(HAVE_POLL) ++# include <poll.h> + #else + /* + * This replacement poll() using select() is only designed to cover +GitLab diff --git a/media-gfx/sane-backends/files/saned_at.service-r1 b/media-gfx/sane-backends/files/saned_at.service-r1 new file mode 100644 index 000000000000..b7d6179bba71 --- /dev/null +++ b/media-gfx/sane-backends/files/saned_at.service-r1 @@ -0,0 +1,18 @@ +[Unit] +Description=Scanner Service +Requires=saned.socket + +[Service] +ExecStart=/usr/sbin/saned +User=saned +Group=scanner +StandardInput=null +StandardOutput=syslog +StandardError=syslog +Environment=SANE_CONFIG_DIR=/etc/sane.d +# If you need to debug your configuration uncomment the next line and +# change it as appropriate to set the desired debug options +# Environment=SANE_DEBUG_DLL=255 SANE_DEBUG_NET=255 + +[Install] +Also=saned.socket |