svn commit: r518732 - in head/sysutils/uhidd: . files
Rene Ladan
rene at FreeBSD.org
Sat Nov 30 21:55:17 UTC 2019
Author: rene
Date: Sat Nov 30 21:55:16 2019
New Revision: 518732
URL: https://svnweb.freebsd.org/changeset/ports/518732
Log:
sysutils/uhidd: drop obsolete CUSE option for CUSE4BSD, it is replaced by cuse.
Added:
head/sysutils/uhidd/files/patch-uhidd_uhidd.8 (contents, props changed)
head/sysutils/uhidd/files/patch-uhidd_uhidd__cuse4bsd.c (contents, props changed)
Modified:
head/sysutils/uhidd/Makefile
head/sysutils/uhidd/files/patch-less-basename
head/sysutils/uhidd/files/patch-uhidd_Makefile
Modified: head/sysutils/uhidd/Makefile
==============================================================================
--- head/sysutils/uhidd/Makefile Sat Nov 30 21:48:47 2019 (r518731)
+++ head/sysutils/uhidd/Makefile Sat Nov 30 21:55:16 2019 (r518732)
@@ -4,7 +4,7 @@
PORTNAME= uhidd
PORTVERSION= 0.2.1
DISTVERSIONPREFIX= REL-
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= sysutils
MAINTAINER= jbeich at FreeBSD.org
@@ -20,22 +20,10 @@ MAKE_ENV+= BINDIR="${PREFIX}/sbin" MANDIR="${MANPREFIX
MAKE_ARGS= LIBDIR="${LOCALBASE}/lib"
USE_RC_SUBR= uhidd
-OPTIONS_DEFINE= CUSE DEVD
+OPTIONS_DEFINE= DEVD
OPTIONS_DEFAULT= DEVD
OPTIONS_SUB= yes
-.if exists(/usr/lib/libcuse.so)
-OPTIONS_DEFAULT+= CUSE
-.else
-OPTIONS_EXCLUDE+= CUSE
-.endif
-
-CUSE_DESC= Use cuse(3) over multimedia/cuse4bsd-kmod
-CUSE_BUILD_DEPENDS_OFF= cuse4bsd-kmod>=0.1.24:multimedia/cuse4bsd-kmod
-CUSE_LIB_DEPENDS_OFF= libcuse4bsd.so:multimedia/cuse4bsd-kmod
-CUSE_SUB_LIST_OFF= LIBCUSE="${LOCALBASE}/lib/libcuse4bsd.so"
-CUSE_SUB_LIST= LIBCUSE=""
-
.if defined(DEBUG_FLAGS)
MAKE_ENV+= DEBUG_FLAGS='${DEBUG_FLAGS}'
.endif
@@ -43,11 +31,6 @@ MAKE_ENV+= DEBUG_FLAGS='${DEBUG_FLAGS}'
post-patch: .SILENT
${FIND} ${WRKSRC}/uhidd -type f -not -name Makefile \
-exec ${REINPLACE_CMD} 's|/usr/local|${PREFIX}|g' {} +
-
-post-patch-CUSE-on: .SILENT
- ${FIND} ${WRKSRC}/uhidd -type f -not \
- -exec ${REINPLACE_CMD} -i '.cuse.bak' \
- -Ee '/_init|\.c/!s|cuse4bsd|cuse|' {} +
post-install-DEVD-on:
@${MKDIR} ${STAGEDIR}${PREFIX}/etc/devd
Modified: head/sysutils/uhidd/files/patch-less-basename
==============================================================================
--- head/sysutils/uhidd/files/patch-less-basename Sat Nov 30 21:48:47 2019 (r518731)
+++ head/sysutils/uhidd/files/patch-less-basename Sat Nov 30 21:55:16 2019 (r518732)
@@ -12,7 +12,7 @@ Date: Sun May 29 16:13:33 2016 +0000
char *basename(char *);
^
---- uhidd/uhidd.c.orig 2012-10-14 19:53:44 UTC
+--- uhidd/uhidd.c.orig 2019-11-30 21:46:32 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 libus
+@@ -405,7 +405,7 @@ open_iface(const char *dev, struct libusb20_device *pd
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_interf
+@@ -497,7 +497,7 @@ alloc_hid_interface_be(struct hid_interface *hi)
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 rep
+@@ -628,14 +628,14 @@ hid_interrupt_out(void *context, int report_id, char *
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
+@@ -720,12 +720,12 @@ hid_set_report(void *context, int report_id, char *buf
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 2012-10-14 19:53:44 UTC
+--- uhidd/uhidd.h.orig 2019-11-30 21:46:32 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 2012-10-14 19:53:44 UTC
+--- uhidd/uhidd_cc.c.orig 2019-11-30 21:46:32 UTC
+++ uhidd/uhidd_cc.c
-@@ -175,11 +175,11 @@ cc_write_keymap_file(struct hid_interfac
+@@ -175,11 +175,11 @@ cc_write_keymap_file(struct hid_interface *hi)
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 2012-10-14 19:53:44 UTC
+--- uhidd/uhidd_kbd.c.orig 2019-11-30 21:46:32 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 2012-10-14 19:53:44 UTC
+--- uhidd/uhidd_mouse.c.orig 2019-11-30 21:46:32 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
+@@ -212,5 +212,5 @@ mouse_recv(struct hid_appcol *ha, struct hid_report *h
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 2012-10-14 19:53:44 UTC
+--- uhidd/uhidd_vhid.c.orig 2019-11-30 21:46:32 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, uin
+@@ -189,7 +189,7 @@ vhid_recv_raw(struct hid_appcol *ha, uint8_t *buf, int
}
if (write(vd->vd_fd, buf, len) < 0)
@@ -264,8 +264,27 @@ 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 2012-10-14 19:53:44 UTC
+--- uhidd/uhidd_vhid_cuse.c.orig 2019-11-30 21:46:32 UTC
+++ uhidd/uhidd_vhid_cuse.c
+@@ -36,15 +36,15 @@ __FBSDID("$FreeBSD$");
+ #include <unistd.h>
+ #include <string.h>
+ #include <syslog.h>
+-#include <cuse4bsd.h>
++#include <cuse.h>
+ #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 {
@@ -275,7 +294,7 @@ Date: Sun May 29 16:13:33 2016 +0000
return (-1);
}
-@@ -468,7 +468,7 @@ vhid_write(struct cuse_dev *cdev, int ff
+@@ -468,7 +468,7 @@ vhid_write(struct cuse_dev *cdev, int fflags, const vo
goto write_done;
if (verbose) {
Modified: head/sysutils/uhidd/files/patch-uhidd_Makefile
==============================================================================
--- head/sysutils/uhidd/files/patch-uhidd_Makefile Sat Nov 30 21:48:47 2019 (r518731)
+++ head/sysutils/uhidd/files/patch-uhidd_Makefile Sat Nov 30 21:55:16 2019 (r518732)
@@ -1,6 +1,6 @@
---- uhidd/Makefile.orig 2012-10-14 00:38:33 UTC
+--- uhidd/Makefile.orig 2012-10-14 19:53:44 UTC
+++ uhidd/Makefile
-@@ -8,7 +8,7 @@ GENSRCS= usage_in_page.c usage_page.c
+@@ -8,14 +8,14 @@ GENSRCS= usage_in_page.c usage_page.c
CLEANFILES= ${GENSRCS}
MAN= uhidd.conf.5 uhidd.8
@@ -9,3 +9,11 @@
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}
Added: head/sysutils/uhidd/files/patch-uhidd_uhidd.8
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/uhidd/files/patch-uhidd_uhidd.8 Sat Nov 30 21:55:16 2019 (r518732)
@@ -0,0 +1,29 @@
+--- 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 ,
Added: head/sysutils/uhidd/files/patch-uhidd_uhidd__cuse4bsd.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/uhidd/files/patch-uhidd_uhidd__cuse4bsd.c Sat Nov 30 21:55:16 2019 (r518732)
@@ -0,0 +1,41 @@
+--- uhidd/uhidd_cuse4bsd.c.orig 2012-10-14 19:53:44 UTC
++++ uhidd/uhidd_cuse4bsd.c
+@@ -29,7 +29,7 @@ __FBSDID("$FreeBSD$");
+
+ #include <sys/param.h>
+ #include <sys/wait.h>
+-#include <cuse4bsd.h>
++#include <cuse.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <pthread.h>
+@@ -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);
+ }
More information about the svn-ports-head
mailing list