pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/graphics/sane-airscan



Module Name:    pkgsrc
Committed By:   ryoon
Date:           Wed Dec  9 12:05:58 UTC 2020

Added Files:
        pkgsrc/graphics/sane-airscan: DESCR Makefile PLIST distinfo
        pkgsrc/graphics/sane-airscan/patches: patch-airscan-netif.c
            patch-airscan-os.c patch-meson.build

Log Message:
graphics/sane-airscan: import sane-airscan-0.99.21

SANE backend for Apple AirScan (eSCL) and WSD scanners.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/graphics/sane-airscan/DESCR \
    pkgsrc/graphics/sane-airscan/Makefile pkgsrc/graphics/sane-airscan/PLIST \
    pkgsrc/graphics/sane-airscan/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/graphics/sane-airscan/patches/patch-airscan-netif.c \
    pkgsrc/graphics/sane-airscan/patches/patch-airscan-os.c \
    pkgsrc/graphics/sane-airscan/patches/patch-meson.build

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: pkgsrc/graphics/sane-airscan/DESCR
diff -u /dev/null pkgsrc/graphics/sane-airscan/DESCR:1.1
--- /dev/null   Wed Dec  9 12:05:58 2020
+++ pkgsrc/graphics/sane-airscan/DESCR  Wed Dec  9 12:05:58 2020
@@ -0,0 +1 @@
+SANE backend for Apple AirScan (eSCL) and WSD scanners.
Index: pkgsrc/graphics/sane-airscan/Makefile
diff -u /dev/null pkgsrc/graphics/sane-airscan/Makefile:1.1
--- /dev/null   Wed Dec  9 12:05:58 2020
+++ pkgsrc/graphics/sane-airscan/Makefile       Wed Dec  9 12:05:58 2020
@@ -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"
Index: pkgsrc/graphics/sane-airscan/PLIST
diff -u /dev/null pkgsrc/graphics/sane-airscan/PLIST:1.1
--- /dev/null   Wed Dec  9 12:05:58 2020
+++ pkgsrc/graphics/sane-airscan/PLIST  Wed Dec  9 12:05:58 2020
@@ -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
Index: pkgsrc/graphics/sane-airscan/distinfo
diff -u /dev/null pkgsrc/graphics/sane-airscan/distinfo:1.1
--- /dev/null   Wed Dec  9 12:05:58 2020
+++ pkgsrc/graphics/sane-airscan/distinfo       Wed Dec  9 12:05:58 2020
@@ -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

Index: pkgsrc/graphics/sane-airscan/patches/patch-airscan-netif.c
diff -u /dev/null pkgsrc/graphics/sane-airscan/patches/patch-airscan-netif.c:1.1
--- /dev/null   Wed Dec  9 12:05:58 2020
+++ pkgsrc/graphics/sane-airscan/patches/patch-airscan-netif.c  Wed Dec  9 12:05:58 2020
@@ -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;
Index: pkgsrc/graphics/sane-airscan/patches/patch-airscan-os.c
diff -u /dev/null pkgsrc/graphics/sane-airscan/patches/patch-airscan-os.c:1.1
--- /dev/null   Wed Dec  9 12:05:58 2020
+++ pkgsrc/graphics/sane-airscan/patches/patch-airscan-os.c     Wed Dec  9 12:05:58 2020
@@ -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
Index: pkgsrc/graphics/sane-airscan/patches/patch-meson.build
diff -u /dev/null pkgsrc/graphics/sane-airscan/patches/patch-meson.build:1.1
--- /dev/null   Wed Dec  9 12:05:58 2020
+++ pkgsrc/graphics/sane-airscan/patches/patch-meson.build      Wed Dec  9 12:05:58 2020
@@ -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