From owner-svn-ports-all@freebsd.org Tue Dec 3 04:33:35 2019 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 137401C7658; Tue, 3 Dec 2019 04:33:35 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47RpyQ6nGJz3MKH; Tue, 3 Dec 2019 04:33:34 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CC62DA43A; Tue, 3 Dec 2019 04:33:34 +0000 (UTC) (envelope-from jbeich@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xB34XYsJ055124; Tue, 3 Dec 2019 04:33:34 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xB34XYeI055122; Tue, 3 Dec 2019 04:33:34 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201912030433.xB34XYeI055122@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Tue, 3 Dec 2019 04:33:34 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r518908 - head/sysutils/uhidd/files X-SVN-Group: ports-head X-SVN-Commit-Author: jbeich X-SVN-Commit-Paths: head/sysutils/uhidd/files X-SVN-Commit-Revision: 518908 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Dec 2019 04:33:35 -0000 Author: jbeich Date: Tue Dec 3 04:33:33 2019 New Revision: 518908 URL: https://svnweb.freebsd.org/changeset/ports/518908 Log: sysutils/uhidd: move r518732 into a separate file files/patch-less-basename is a cherry-pick that will disappear on update. Added: head/sysutils/uhidd/files/patch-base-cuse (contents, props changed) Deleted: head/sysutils/uhidd/files/patch-uhidd_uhidd.8 head/sysutils/uhidd/files/patch-uhidd_uhidd__cuse4bsd.c Modified: head/sysutils/uhidd/files/patch-less-basename (contents, props changed) head/sysutils/uhidd/files/patch-uhidd_Makefile (contents, props changed) Added: head/sysutils/uhidd/files/patch-base-cuse ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/uhidd/files/patch-base-cuse Tue Dec 3 04:33:33 2019 (r518908) @@ -0,0 +1,104 @@ +See also https://github.com/kaiwang27/uhidd/commit/4176a6b6c368 + +--- uhidd/Makefile.orig 2012-10-14 19:53:44 UTC ++++ uhidd/Makefile +@@ -15,7 +15,7 @@ LOCALBASE?= /usr/local + LIBDIR= ${PREFIX}/lib + + DPADD= ${LIBUSB} ${LIBPTHREAD} ${LIBUTIL} +-LDADD= -lcuse4bsd -lusb -lpthread -lutil ++LDADD= -lcuse -lusb -lpthread -lutil + + CFLAGS+= -I. -I${.CURDIR} -I${LOCALBASE}/include -g + LDFLAGS+= -L${LIBDIR} +--- uhidd/uhidd.8.orig 2012-10-14 19:53:44 UTC ++++ uhidd/uhidd.8 +@@ -89,7 +89,7 @@ All other HID application collections that don't + have a specific driver can be attached by the Virtual Generic HID + class driver. The driver creates a virtual USB HID device using + the +-.Xr cuse4bsd 4 ++.Xr cuse 4 + interface, so normal USB HID applications that deal with + .Xr uhid 4 , + e.g. +@@ -114,7 +114,7 @@ foreground. This option is intended for debugging the + .It Fl h + Attach the Virtual Generic HID class driver. + This option requires that +-.Xr cuse4bsd 4 ++.Xr cuse 4 + driver loaded as a kernel module. + .It Fl H + Specify the name of the virtual HID device created by the +@@ -207,7 +207,7 @@ the in-memory multimedia keymap for device ugen.%u.%u + .Sh SEE ALSO + .Xr usbhidaction 1 , + .Xr usbhidctl 1 , +-.Xr cuse4bsd 3 , ++.Xr cuse 3 , + .Xr usb 3 , + .Xr usbhid 3 , + .Xr uhid 4 , +--- uhidd/uhidd_cuse4bsd.c.orig 2012-10-14 19:53:44 UTC ++++ uhidd/uhidd_cuse4bsd.c +@@ -29,7 +29,7 @@ __FBSDID("$FreeBSD$"); + + #include + #include +-#include ++#include + #include + #include + #include +@@ -70,16 +70,16 @@ ucuse_init_again: + } else { + if (verbose) + syslog(LOG_INFO, "Attempt to load kernel" +- " module cuse4bsd.ko..."); +- status = system("kldload cuse4bsd"); ++ " module cuse.ko..."); ++ status = system("kldload cuse"); + if (WEXITSTATUS(status) != 0) { +- syslog(LOG_ERR, "Failed to load cuse4bsd" ++ syslog(LOG_ERR, "Failed to load cuse" + " kernel module"); + return (-1); + } + if (verbose) + syslog(LOG_INFO, "Successfully loaded" +- " cuse4bsd kernel module"); ++ " cuse kernel module"); + cuse4bsd_load = 1; + goto ucuse_init_again; + } +@@ -88,7 +88,7 @@ ucuse_init_again: + cuse4bsd_init = 1; + + if (verbose) +- syslog(LOG_INFO, "cuse4bsd initiailzed."); ++ syslog(LOG_INFO, "cuse initiailzed."); + + return (0); + } +--- uhidd/uhidd_vhid_cuse.c.orig 2012-10-14 19:53:44 UTC ++++ uhidd/uhidd_vhid_cuse.c +@@ -36,15 +36,15 @@ __FBSDID("$FreeBSD$"); + #include + #include + #include +-#include ++#include + #include "uhidd.h" + + /* +- * General Virtual HID device driver. (cuse4bsd version) ++ * General Virtual HID device driver. (cuse version) + */ + + #if CUSE_VERSION < 0x000118 +-#error uhidd requires cuse4bsd version >= 0.1.24 ++#error uhidd requires cuse version >= 0.1.24 + #endif + + #ifndef CUSE_ID_UHIDD Modified: head/sysutils/uhidd/files/patch-less-basename ============================================================================== --- head/sysutils/uhidd/files/patch-less-basename Tue Dec 3 04:33:21 2019 (r518907) +++ head/sysutils/uhidd/files/patch-less-basename Tue Dec 3 04:33:33 2019 (r518908) @@ -12,7 +12,7 @@ Date: Sun May 29 16:13:33 2016 +0000 char *basename(char *); ^ ---- uhidd/uhidd.c.orig 2019-11-30 21:46:32 UTC +--- uhidd/uhidd.c.orig 2012-10-14 19:53:44 UTC +++ uhidd/uhidd.c @@ -174,7 +174,7 @@ main(int argc, char **argv) @@ -50,7 +50,7 @@ Date: Sun May 29 16:13:33 2016 +0000 syslog(LOG_ERR, "%s not found", dev); return (-1); } -@@ -405,7 +405,7 @@ open_iface(const char *dev, struct libusb20_device *pd +@@ -405,7 +405,7 @@ open_iface(const char *dev, struct libus e = libusb20_dev_request_sync(pdev, &req, rdesc, &actlen, 0, 0); if (e) { syslog(LOG_ERR, "%s[%d]=> libusb20_dev_request_sync" @@ -59,7 +59,7 @@ Date: Sun May 29 16:13:33 2016 +0000 return; } -@@ -497,7 +497,7 @@ alloc_hid_interface_be(struct hid_interface *hi) +@@ -497,7 +497,7 @@ alloc_hid_interface_be(struct hid_interf assert(hi != NULL); @@ -86,7 +86,7 @@ Date: Sun May 29 16:13:33 2016 +0000 goto parent_end; } -@@ -628,14 +628,14 @@ hid_interrupt_out(void *context, int report_id, char * +@@ -628,14 +628,14 @@ hid_interrupt_out(void *context, int rep xfer = libusb20_tr_get_pointer(hi->pdev, x); if (xfer == NULL) { syslog(LOG_ERR, "%s[%d] libusb20_tr_get_pointer failed\n", @@ -103,7 +103,7 @@ Date: Sun May 29 16:13:33 2016 +0000 return (-1); } -@@ -720,12 +720,12 @@ hid_set_report(void *context, int report_id, char *buf +@@ -720,12 +720,12 @@ hid_set_report(void *context, int report e = libusb20_dev_request_sync(hi->pdev, &req, buf, &actlen, 0, 0); if (e && verbose) syslog(LOG_ERR, "%s[%d] libusb20_dev_request_sync failed", @@ -118,7 +118,7 @@ Date: Sun May 29 16:13:33 2016 +0000 return (-1); } if (verbose) { ---- uhidd/uhidd.h.orig 2019-11-30 21:46:32 UTC +--- uhidd/uhidd.h.orig 2012-10-14 19:53:44 UTC +++ uhidd/uhidd.h @@ -227,7 +227,7 @@ struct hid_interface { do { \ @@ -138,9 +138,9 @@ Date: Sun May 29 16:13:33 2016 +0000 hi->ndx); \ snprintf(pb2, sizeof(pb2), __VA_ARGS__); \ printf("%s-> %s", pb, pb2); \ ---- uhidd/uhidd_cc.c.orig 2019-11-30 21:46:32 UTC +--- uhidd/uhidd_cc.c.orig 2012-10-14 19:53:44 UTC +++ uhidd/uhidd_cc.c -@@ -175,11 +175,11 @@ cc_write_keymap_file(struct hid_interface *hi) +@@ -175,11 +175,11 @@ cc_write_keymap_file(struct hid_interfac int i; snprintf(fpath, sizeof(fpath), "/var/run/uhidd.%s/cc_keymap", @@ -154,7 +154,7 @@ Date: Sun May 29 16:13:33 2016 +0000 return; } fprintf(fp, "0x%04x:0x%04x={\n", hi->vendor_id, hi->product_id); ---- uhidd/uhidd_kbd.c.orig 2019-11-30 21:46:32 UTC +--- uhidd/uhidd_kbd.c.orig 2012-10-14 19:53:44 UTC +++ uhidd/uhidd_kbd.c @@ -582,7 +582,7 @@ kbd_attach(struct hid_appcol *ha) /* Open /dev/vkbdctl. */ @@ -174,7 +174,7 @@ Date: Sun May 29 16:13:33 2016 +0000 return (-1); } PRINT1("kbd device name: %s\n", devname(sb.st_rdev, S_IFCHR)); ---- uhidd/uhidd_mouse.c.orig 2019-11-30 21:46:32 UTC +--- uhidd/uhidd_mouse.c.orig 2012-10-14 19:53:44 UTC +++ uhidd/uhidd_mouse.c @@ -91,7 +91,7 @@ mouse_attach(struct hid_appcol *ha) md->cons_fd = open("/dev/consolectl", O_RDWR); @@ -185,14 +185,14 @@ Date: Sun May 29 16:13:33 2016 +0000 return (-1); } -@@ -212,5 +212,5 @@ mouse_recv(struct hid_appcol *ha, struct hid_report *h +@@ -212,5 +212,5 @@ mouse_recv(struct hid_appcol *ha, struct if (ioctl(md->cons_fd, CONS_MOUSECTL, &mi) < 0) syslog(LOG_ERR, "%s[%d] could not submit mouse data:" - " ioctl failed: %m", basename(hi->dev), hi->ndx); + " ioctl failed: %m", hi->dev, hi->ndx); } ---- uhidd/uhidd_vhid.c.orig 2019-11-30 21:46:32 UTC +--- uhidd/uhidd_vhid.c.orig 2012-10-14 19:53:44 UTC +++ uhidd/uhidd_vhid.c @@ -97,7 +97,7 @@ vhid_attach(struct hid_appcol *ha) */ @@ -246,7 +246,7 @@ Date: Sun May 29 16:13:33 2016 +0000 close(vd->vd_fd); return (-1); } -@@ -189,7 +189,7 @@ vhid_recv_raw(struct hid_appcol *ha, uint8_t *buf, int +@@ -189,7 +189,7 @@ vhid_recv_raw(struct hid_appcol *ha, uin } if (write(vd->vd_fd, buf, len) < 0) @@ -264,27 +264,8 @@ Date: Sun May 29 16:13:33 2016 +0000 hi->ndx); for (i = 0; i < len; i++) printf("%d ", buf[i]); ---- uhidd/uhidd_vhid_cuse.c.orig 2019-11-30 21:46:32 UTC +--- uhidd/uhidd_vhid_cuse.c.orig 2012-10-14 19:53:44 UTC +++ uhidd/uhidd_vhid_cuse.c -@@ -36,15 +36,15 @@ __FBSDID("$FreeBSD$"); - #include - #include - #include --#include -+#include - #include "uhidd.h" - - /* -- * General Virtual HID device driver. (cuse4bsd version) -+ * General Virtual HID device driver. (cuse version) - */ - - #if CUSE_VERSION < 0x000118 --#error uhidd requires cuse4bsd version >= 0.1.24 -+#error uhidd requires cuse version >= 0.1.24 - #endif - - #ifndef CUSE_ID_UHIDD @@ -192,7 +192,7 @@ vhid_attach(struct hid_appcol *ha) vd->vd_rsz = ha->ha_rsz; } else { @@ -294,7 +275,7 @@ Date: Sun May 29 16:13:33 2016 +0000 return (-1); } -@@ -468,7 +468,7 @@ vhid_write(struct cuse_dev *cdev, int fflags, const vo +@@ -468,7 +468,7 @@ vhid_write(struct cuse_dev *cdev, int ff goto write_done; if (verbose) { Modified: head/sysutils/uhidd/files/patch-uhidd_Makefile ============================================================================== --- head/sysutils/uhidd/files/patch-uhidd_Makefile Tue Dec 3 04:33:21 2019 (r518907) +++ head/sysutils/uhidd/files/patch-uhidd_Makefile Tue Dec 3 04:33:33 2019 (r518908) @@ -1,6 +1,6 @@ ---- uhidd/Makefile.orig 2012-10-14 19:53:44 UTC +--- uhidd/Makefile.orig 2012-10-14 00:38:33 UTC +++ uhidd/Makefile -@@ -8,14 +8,14 @@ GENSRCS= usage_in_page.c usage_page.c +@@ -8,7 +8,7 @@ GENSRCS= usage_in_page.c usage_page.c CLEANFILES= ${GENSRCS} MAN= uhidd.conf.5 uhidd.8 @@ -9,11 +9,3 @@ PREFIX?= /usr/local LOCALBASE?= /usr/local - LIBDIR= ${PREFIX}/lib - - DPADD= ${LIBUSB} ${LIBPTHREAD} ${LIBUTIL} --LDADD= -lcuse4bsd -lusb -lpthread -lutil -+LDADD= -lcuse -lusb -lpthread -lutil - - CFLAGS+= -I. -I${.CURDIR} -I${LOCALBASE}/include -g - LDFLAGS+= -L${LIBDIR}