pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/graphics/sane-airscan graphics/sane-airscan: import sa...
details: https://anonhg.NetBSD.org/pkgsrc/rev/6ed0f3a6c6b7
branches: trunk
changeset: 443255:6ed0f3a6c6b7
user: ryoon <ryoon%pkgsrc.org@localhost>
date: Wed Dec 09 12:05:58 2020 +0000
description:
graphics/sane-airscan: import sane-airscan-0.99.21
SANE backend for Apple AirScan (eSCL) and WSD scanners.
diffstat:
graphics/sane-airscan/DESCR | 1 +
graphics/sane-airscan/Makefile | 32 +++++++++++++++++++++
graphics/sane-airscan/PLIST | 8 +++++
graphics/sane-airscan/distinfo | 9 +++++
graphics/sane-airscan/patches/patch-airscan-netif.c | 21 +++++++++++++
graphics/sane-airscan/patches/patch-airscan-os.c | 30 +++++++++++++++++++
graphics/sane-airscan/patches/patch-meson.build | 15 +++++++++
7 files changed, 116 insertions(+), 0 deletions(-)
diffs (144 lines):
diff -r a83de4868efc -r 6ed0f3a6c6b7 graphics/sane-airscan/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/sane-airscan/DESCR Wed Dec 09 12:05:58 2020 +0000
@@ -0,0 +1,1 @@
+SANE backend for Apple AirScan (eSCL) and WSD scanners.
diff -r a83de4868efc -r 6ed0f3a6c6b7 graphics/sane-airscan/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/sane-airscan/Makefile Wed Dec 09 12:05:58 2020 +0000
@@ -0,0 +1,32 @@
+# $NetBSD: Makefile,v 1.1 2020/12/09 12:05:58 ryoon Exp $
+
+GITHUB_PROJECT= sane-airscan
+GITHUB_TAG= 0.99.21
+DISTNAME= sane-airscan-0.99.21
+CATEGORIES= graphics
+MASTER_SITES= ${MASTER_SITE_GITHUB:=alexpevzner/}
+
+MAINTAINER= ryoon%NetBSD.org@localhost
+HOMEPAGE= https://github.com/alexpevzner/sane-airscan/
+COMMENT= SANE backend for Apple AirScan (eSCL) and WSD
+LICENSE= gnu-gpl-v2
+
+USE_LANGUAGES= c c++
+
+SUBST_CLASSES+= prefix
+SUBST_STAGE.prefix= pre-configure
+SUBST_MESSAGE.prefix= Fix config install path
+SUBST_FILES.prefix= meson.build
+SUBST_VARS.prefix= PREFIX
+
+EGDIR= ${PREFIX}/share/examples/
+CONF_FILES= ${EGDIR}/airscan.conf ${PREFIX}/etc/sane.d/airscan.conf
+
+
+.include "../../devel/meson/build.mk"
+.include "../../graphics/sane-backends/buildlink3.mk"
+.include "../../net/avahi/buildlink3.mk"
+.include "../../security/gnutls/buildlink3.mk"
+.include "../../textproc/libxml2/buildlink3.mk"
+.include "../../mk/jpeg.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r a83de4868efc -r 6ed0f3a6c6b7 graphics/sane-airscan/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/sane-airscan/PLIST Wed Dec 09 12:05:58 2020 +0000
@@ -0,0 +1,8 @@
+@comment $NetBSD: PLIST,v 1.1 2020/12/09 12:05:58 ryoon Exp $
+bin/airscan-discover
+etc/sane.d/dll.d/airscan
+lib/sane/libsane-airscan.so
+lib/sane/libsane-airscan.so.1
+man/man1/airscan-discover.1
+man/man5/sane-airscan.5
+share/examples/airscan.conf
diff -r a83de4868efc -r 6ed0f3a6c6b7 graphics/sane-airscan/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/sane-airscan/distinfo Wed Dec 09 12:05:58 2020 +0000
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.1 2020/12/09 12:05:58 ryoon Exp $
+
+SHA1 (sane-airscan-0.99.21.tar.gz) = 679a0be46117b053c2479c57faaec358df2e742a
+RMD160 (sane-airscan-0.99.21.tar.gz) = cf2124e9bb4bc777ca56cd104ce621090d8a2fcc
+SHA512 (sane-airscan-0.99.21.tar.gz) = ab713995cfba6df4f627cf4bdf16222ddab64010c254d20b6a48f4aed22aef911c0b25c432983eee8ddf4b9d517224c62b032c02769943f2cca3dbdc6cf38010
+Size (sane-airscan-0.99.21.tar.gz) = 191255 bytes
+SHA1 (patch-airscan-netif.c) = 3b06cf883514c8804e2854a5e00ccd9fae957b7c
+SHA1 (patch-airscan-os.c) = 46e65e141d97356d2e6c7b16a4e78f53a83e9ec8
+SHA1 (patch-meson.build) = 0a8ff042c8baaa7be486d923d9ed67bd8edf4443
diff -r a83de4868efc -r 6ed0f3a6c6b7 graphics/sane-airscan/patches/patch-airscan-netif.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/sane-airscan/patches/patch-airscan-netif.c Wed Dec 09 12:05:58 2020 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-airscan-netif.c,v 1.1 2020/12/09 12:05:58 ryoon Exp $
+
+* Support NetBSD.
+
+--- airscan-netif.c.orig 2020-11-23 19:47:02.000000000 +0000
++++ airscan-netif.c
+@@ -578,9 +578,14 @@ netif_init (void)
+ return SANE_STATUS_IO_ERROR;
+ }
+
++#if defined(__NetBSD__)
++ unsigned char rtfilter[] = { RTM_NEWADDR, RTM_DELADDR };
++ if (setsockopt(netif_rtnetlink_sock, AF_ROUTE, RO_MSGFILTER,
++#else
+ unsigned int rtfilter =
+ ROUTE_FILTER(RTM_NEWADDR) | ROUTE_FILTER(RTM_DELADDR);
+ if (setsockopt(netif_rtnetlink_sock, AF_ROUTE, ROUTE_MSGFILTER,
++#endif
+ &rtfilter, sizeof(rtfilter)) < 0) {
+ log_debug(NULL, "can't set ROUTE_MSGFILTER: %s", strerror(errno));
+ return SANE_STATUS_IO_ERROR;
diff -r a83de4868efc -r 6ed0f3a6c6b7 graphics/sane-airscan/patches/patch-airscan-os.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/sane-airscan/patches/patch-airscan-os.c Wed Dec 09 12:05:58 2020 +0000
@@ -0,0 +1,30 @@
+$NetBSD: patch-airscan-os.c,v 1.1 2020/12/09 12:05:58 ryoon Exp $
+
+* Support NetBSD.
+
+--- airscan-os.c.orig 2020-11-23 19:47:02.000000000 +0000
++++ airscan-os.c
+@@ -17,7 +17,7 @@
+ #include <unistd.h>
+ #include <sys/stat.h>
+
+-#ifdef __OpenBSD__
++#if defined(__OpenBSD__) || defined(__NetBSD__)
+ # include <sys/types.h>
+ # include <sys/sysctl.h>
+ #endif
+@@ -92,6 +92,14 @@ os_progname_init (void)
+ return;
+ }
+ memmove(os_progname_buf, kp.p_comm, KI_MAXCOMLEN);
++#elif defined(__NetBSD__)
++ struct kinfo_proc2 kp;
++ int mib[] = {CTL_KERN, KERN_PROC2, KERN_PROC_PID, getpid(), sizeof(kp), 1};
++ size_t len = sizeof(kp);
++ int rc = sysctl(mib, 6, &kp, &len, NULL, 0);
++ if (rc == -1) {
++ return;
++ }
+ #else
+ /* This is nice to have but not critical. The caller already has
+ to handle os_progname returning NULL. The error is left as a
diff -r a83de4868efc -r 6ed0f3a6c6b7 graphics/sane-airscan/patches/patch-meson.build
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/sane-airscan/patches/patch-meson.build Wed Dec 09 12:05:58 2020 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-meson.build,v 1.1 2020/12/09 12:05:58 ryoon Exp $
+
+* Install configuration file under share/examples for pkgsrc.
+
+--- meson.build.orig 2020-11-23 19:47:02.000000000 +0000
++++ meson.build
+@@ -91,7 +91,7 @@ endforeach
+ install_man('sane-airscan.5')
+ install_man('airscan-discover.1')
+ install_data('airscan.conf',
+- install_dir: join_paths(get_option('sysconfdir'), 'sane.d')
++ install_dir: '@PREFIX@/share/examples'
+ )
+ install_data(dll_file,
+ install_dir: join_paths(get_option('sysconfdir'), 'sane.d', 'dll.d')
Home |
Main Index |
Thread Index |
Old Index