pkgsrc-WIP-changes archive

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

argyllcms: enable NetBSD ttys for instrument access



Module Name:	pkgsrc-wip
Committed By:	Jonathan A. Kollasch <jakllsch%kollasch.net@localhost>
Pushed By:	jakllsch
Date:		Thu Jan 31 14:08:47 2019 -0600
Changeset:	f88fcc1f08179d0dcec134d0435f9a9805818d20

Modified Files:
	argyllcms/distinfo
Added Files:
	argyllcms/patches/patch-spectro_icoms__ux.c

Log Message:
argyllcms: enable NetBSD ttys for instrument access

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f88fcc1f08179d0dcec134d0435f9a9805818d20

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

diffstat:
 argyllcms/distinfo                          |  1 +
 argyllcms/patches/patch-spectro_icoms__ux.c | 36 +++++++++++++++++++++++++++++
 2 files changed, 37 insertions(+)

diffs:
diff --git a/argyllcms/distinfo b/argyllcms/distinfo
index 37a096d3b8..9e4b2117b7 100644
--- a/argyllcms/distinfo
+++ b/argyllcms/distinfo
@@ -6,4 +6,5 @@ SHA512 (Argyll_V2.0.1_src.zip) = d0755d1837fa000278f390d9d101c1e9de3f2e294583c8b
 Size (Argyll_V2.0.1_src.zip) = 13606682 bytes
 SHA1 (patch-Jamtop) = 397fb2370b444a4c28d2d617519d626eb7eee1a5
 SHA1 (patch-spectro_hidio.c) = b0190685bc8a7a4b0f2025562f143eb1887971dd
+SHA1 (patch-spectro_icoms__ux.c) = 729883ffb5c7060a9b87b23f8eb79fd6458e13f4
 SHA1 (patch-spectro_usbio.c) = 84570916fa25b14f27c607cba188d3836b5505e3
diff --git a/argyllcms/patches/patch-spectro_icoms__ux.c b/argyllcms/patches/patch-spectro_icoms__ux.c
new file mode 100644
index 0000000000..2fe1c7bd9a
--- /dev/null
+++ b/argyllcms/patches/patch-spectro_icoms__ux.c
@@ -0,0 +1,36 @@
+$NetBSD$
+
+Add (some) serial port handling for NetBSD; neutralize serial port probing on NetBSD.
+
+--- spectro/icoms_ux.c.orig	2018-07-09 02:57:13.000000000 +0000
++++ spectro/icoms_ux.c
+@@ -242,6 +242,13 @@ int serial_get_paths(icompaths *p, icom_
+ 			   /* This should match uart & USB devs. */
+ 				( strncmp (de->d_name, "cua", 3) == 0
+ 				&& strlen (de->d_name) < 7)
++#elif defined(__NetBSD__)
++			    (   strncmp(de->d_name, "tty", 3) == 0
++			     && isdigit((unsigned char)de->d_name[3]))
++			 || (   strncmp(de->d_name, "ttyU", 4) == 0
++			     && isdigit((unsigned char)de->d_name[4]))
++			 || (   strncmp(de->d_name, "ttyY", 4) == 0
++			     && isdigit((unsigned char)de->d_name[4]))
+ #else
+ 				/* Presumably Linux.. */
+ 			    (   strncmp(de->d_name, "ttyS", 4) == 0
+@@ -261,6 +268,7 @@ int serial_get_paths(icompaths *p, icom_
+ 			strcpy(dpath, dirn);
+ 			strcat(dpath, de->d_name);
+ 
++#if !defined(__NetBSD__)
+ 			/* See if the (not fast) serial port is real */
+ 			if (strncmp(de->d_name, "ttyUSB", 6) != 0
+ 			 && strncmp(de->d_name, "ttyHS", 5) != 0
+@@ -300,6 +308,7 @@ int serial_get_paths(icompaths *p, icom_
+ 				dctype |= icomt_fastserial;
+ 				dctype |= icomt_btserial;
+ 			}
++#endif
+ 
+ #ifndef ENABLE_SERIAL
+ 			if (dctype & icomt_fastserial) {		/* Only add fast ports if !ENABLE_SERIAL */


Home | Main Index | Thread Index | Old Index