Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Oct 2012 00:29:31 +0200 (CEST)
From:      Kai Wang <kaiwang27@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/172703: [MAINTAINER] sysutils/uhidd: update to 0.2.1
Message-ID:  <201210142229.q9EMTVLi009496@localhost.my.domain>
Resent-Message-ID: <201210142230.q9EMU0KI030052@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         172703
>Category:       ports
>Synopsis:       [MAINTAINER] sysutils/uhidd: update to 0.2.1
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 14 22:30:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Kai Wang
>Release:        FreeBSD 9.0-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD 9.0-RELEASE FreeBSD 9.0-RELEASE #0 r189287M: Sun Apr 22 16:17:45 CEST
>Description:
- Update to 0.2.1

Removed file(s):
- files/patch-hidump.c
- files/patch-uhidd-lex.l
- files/patch-uhidd-uhidd-devd.conf.sample
- files/patch-uhidd-uhidd.c

Generated with FreeBSD Port Tools 0.99_6 (mode: update, diff: ports)
>How-To-Repeat:
>Fix:

--- uhidd-0.2.1.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/sysutils/uhidd/Makefile ./Makefile
--- /usr/ports/sysutils/uhidd/Makefile	2012-10-14 23:45:28.000000000 +0200
+++ ./Makefile	2012-10-15 00:16:24.000000000 +0200
@@ -6,8 +6,7 @@
 #
 
 PORTNAME=	uhidd
-PORTVERSION=	0.2.0
-PORTREVISION=	2
+PORTVERSION=	0.2.1
 CATEGORIES=	sysutils
 MASTER_SITES=	GOOGLE_CODE \
 		http://people.freebsd.org/~kaiw/distfiles/
@@ -15,25 +14,23 @@
 MAINTAINER=	kaiwang27@gmail.com
 COMMENT=	Userland USB HID device driver using libusb20
 
-NO_PACKAGE=	should be recompiled for a particular FreeBSD kernel
+BUILD_DEPENDS=	cuse4bsd-kmod>=0.1.24:${PORTSDIR}/multimedia/cuse4bsd-kmod
+LIB_DEPENDS=	cuse4bsd.1:${PORTSDIR}/multimedia/cuse4bsd-kmod
 
 OPTIONS=	DEVD "Install devd files" on
 
-MAKE_ENV+=	SYSDIR=${SYSDIR}
-KMODDIR?=	/boot/modules
-SRC_BASE?=	/usr/src
-SYSDIR?=	${SRC_BASE}/sys
-
 USE_RC_SUBR=	uhidd
 SUB_FILES=	pkg-message
-PLIST_SUB=	KMODDIR=${KMODDIR}
 
-MAN4=		uvhid.4
 MAN5=		uhidd.conf.5
 MAN8=		uhidd.8
 
+LIBDIR=		${PREFIX}/lib
+
 .include <bsd.port.pre.mk>
 
+LIBCUSE=	${LIBDIR}/libcuse4bsd.so
+
 .if defined(DEBUG_FLAGS)
 MAKE_ENV+=	DEBUG_FLAGS='${DEBUG_FLAGS}'
 .endif
@@ -44,10 +41,6 @@
 EXTRA_PATCHES+=	${FILESDIR}/extra-patch-uhidd-parser.y
 .endif
 
-.if !(exists(${SYSDIR}/Makefile) || exists(${SRC_BASE}/sys/Makefile))
-IGNORE=		requires kernel source files
-.endif
-
 .if !defined(WITHOUT_DEVD)
 PLIST_SUB+=	PL_DEVD=""
 .else
@@ -55,23 +48,20 @@
 .endif
 
 post-patch:	.SILENT
-	${FIND} ${WRKSRC}/uhidd -type f -exec ${REINPLACE_CMD} \
-		's|/usr/local|${PREFIX}|g' {} +
-	${REINPLACE_CMD} 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/uhidd/Makefile
+	${FIND} ${WRKSRC}/uhidd -type f -not -name Makefile \
+		-exec ${REINPLACE_CMD} 's|/usr/local|${PREFIX}|g' {} +
+	${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/uhidd/Makefile
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/uhidd/uhidd ${PREFIX}/sbin/uhidd
-	${INSTALL_KLD} ${WRKSRC}/uvhid/uvhid.ko ${KMODDIR}/uvhid.ko
-.if exists(${WRKSRC}/uvhid/uvhid.ko.symbols)
-	${INSTALL_KLD} ${WRKSRC}/uvhid/uvhid.ko.symbols ${KMODDIR}/uvhid.ko.symbols
-.endif
 	${INSTALL_MAN} ${WRKSRC}/uhidd/uhidd.8 ${PREFIX}/man/man8/uhidd.8
 	${INSTALL_MAN} ${WRKSRC}/uhidd/uhidd.conf.5 ${PREFIX}/man/man5/uhidd.conf.5
-	${INSTALL_MAN} ${WRKSRC}/uvhid/uvhid.4 ${PREFIX}/man/man4/uvhid.4
 .if !defined(WITHOUT_DEVD)
 	${MKDIR} ${PREFIX}/etc/devd
-	${REINPLACE_CMD} -Ee \
-		"s%/usr/local%${PREFIX}%" ${WRKSRC}/uhidd/uhidd-devd.conf.sample
+	${REINPLACE_CMD} -E \
+		-e "s|%%PREFIX%%|${PREFIX}|" \
+		-e "s|%%LIBCUSE%%|${LIBCUSE}|" \
+		${WRKSRC}/uhidd/uhidd-devd.conf.sample
 	${INSTALL_DATA} ${WRKSRC}/uhidd/uhidd-devd.conf.sample ${PREFIX}/etc/devd/
 	@if [ ! -f ${PREFIX}/etc/devd/uhidd-devd.conf ]; then \
 		${CP} -p ${PREFIX}/etc/devd/uhidd-devd.conf.sample \
diff -ruN --exclude=CVS /usr/ports/sysutils/uhidd/distinfo ./distinfo
--- /usr/ports/sysutils/uhidd/distinfo	2012-10-14 23:45:28.000000000 +0200
+++ ./distinfo	2012-10-14 22:31:15.000000000 +0200
@@ -1,2 +1,2 @@
-SHA256 (uhidd-0.2.0.tar.gz) = d447a1e5625f33892d619353b68d4d71151f492be1217443ace06470fadf2952
-SIZE (uhidd-0.2.0.tar.gz) = 54949
+SHA256 (uhidd-0.2.1.tar.gz) = fa049cc93c722411636bf9c475d8da8a0ff519d9e433838e42af63fb64f808e7
+SIZE (uhidd-0.2.1.tar.gz) = 61390
diff -ruN --exclude=CVS /usr/ports/sysutils/uhidd/files/extra-patch-uhidd-parser.y ./files/extra-patch-uhidd-parser.y
--- /usr/ports/sysutils/uhidd/files/extra-patch-uhidd-parser.y	2012-10-14 23:45:27.000000000 +0200
+++ ./files/extra-patch-uhidd-parser.y	2012-10-14 22:33:45.000000000 +0200
@@ -1,17 +1,10 @@
---- uhidd/parser.y~
-+++ uhidd/parser.y
-@@ -32,13 +32,13 @@
- #include <err.h>
- #include <errno.h>
- #include <stdio.h>
-+#include <stdlib.h>
- #include <string.h>
- #include <syslog.h>
- 
+--- uhidd/parser.y.old	2012-10-14 22:33:00.000000000 +0200
++++ uhidd/parser.y	2012-10-14 22:33:06.000000000 +0200
+@@ -39,7 +39,6 @@
  #include "uhidd.h"
  
  extern int yylex(void);
 -extern int yyparse(void);
  extern int lineno;
  extern FILE *yyin;
-
+ 
diff -ruN --exclude=CVS /usr/ports/sysutils/uhidd/files/patch-hidump.c ./files/patch-hidump.c
--- /usr/ports/sysutils/uhidd/files/patch-hidump.c	2012-10-14 23:45:27.000000000 +0200
+++ ./files/patch-hidump.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
---- uhidd/uhidd_hidump.c~
-+++ uhidd/uhidd_hidump.c
-@@ -296,7 +296,7 @@ get_unit(int dval, unsigned int sz)
- 
- normal:
- 	for (i = 1; (unsigned int)i < sz * 2; i++) {
--		nibble = (dval >> (i * 4)) && 0x0F;
-+		nibble = (dval >> (i * 4)) & 0x0F;
- 		if (!nibble)
- 			continue;
- 		if (nibble > 7)
diff -ruN --exclude=CVS /usr/ports/sysutils/uhidd/files/patch-uhidd-lex.l ./files/patch-uhidd-lex.l
--- /usr/ports/sysutils/uhidd/files/patch-uhidd-lex.l	2012-10-14 23:45:27.000000000 +0200
+++ ./files/patch-uhidd-lex.l	1970-01-01 01:00:00.000000000 +0100
@@ -1,19 +0,0 @@
---- uhidd/lex.l~
-+++ uhidd/lex.l
-@@ -34,7 +34,6 @@
- 
- #include "y.tab.h"
- 
--#define YY_NO_UNPUT
- int lineno = 1;
- 
- int	yylex(void);
-@@ -42,6 +41,8 @@
- %}
- 
- %option noyywrap
-+%option nounput
-+%option noinput
- 
- %%
- 
diff -ruN --exclude=CVS /usr/ports/sysutils/uhidd/files/patch-uhidd-uhidd-devd.conf.sample ./files/patch-uhidd-uhidd-devd.conf.sample
--- /usr/ports/sysutils/uhidd/files/patch-uhidd-uhidd-devd.conf.sample	2012-10-14 23:45:27.000000000 +0200
+++ ./files/patch-uhidd-uhidd-devd.conf.sample	1970-01-01 01:00:00.000000000 +0100
@@ -1,19 +0,0 @@
-Index: sysutils/uhidd/files/patch-uhidd-uhidd-devd.conf.sample
-===================================================================
-RCS file: sysutils/uhidd/files/patch-uhidd-uhidd-devd.conf.sample
-diff -N sysutils/uhidd/files/patch-uhidd-uhidd-devd.conf.sample
---- /dev/null 1 Jan 1970 00:00:00 -0000
-+++ sysutils/uhidd/files/patch-uhidd-uhidd-devd.conf.sample 8 Aug 2011 03:25:53 -0000
-@@ -0,0 +1,12 @@
-+--- uhidd/uhidd-devd.conf.sample~
-++++ uhidd/uhidd-devd.conf.sample
-+@@ -1,4 +1,6 @@
-+-attach 0 {
-+- match "device-name" "ugen[0-9]+.[0-9]+";
-+- action "/usr/local/etc/rc.d/uhidd start /dev/$device-name";
-++notify 0 {
-++ match "subsystem" "DEVICE";
-++ match "type" "ATTACH";
-++ match "cdev" "ugen[0-9]+.[0-9]+";
-++ action "/usr/local/etc/rc.d/uhidd start /dev/$cdev";
-+ };
\ No newline at end of file
diff -ruN --exclude=CVS /usr/ports/sysutils/uhidd/files/patch-uhidd-uhidd.c ./files/patch-uhidd-uhidd.c
--- /usr/ports/sysutils/uhidd/files/patch-uhidd-uhidd.c	2012-10-14 23:45:27.000000000 +0200
+++ ./files/patch-uhidd-uhidd.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,19 +0,0 @@
---- uhidd/uhidd.c~
-+++ uhidd/uhidd.c
-@@ -313,7 +313,6 @@
- static int
- open_device(const char *dev, struct libusb20_device *pdev)
- {
--	struct LIBUSB20_DEVICE_DESC_DECODED *ddesc;
- 	struct libusb20_config *config;
- 	struct libusb20_interface *iface;
- 	int cndx, e, i;
-@@ -334,8 +333,6 @@ open_device(const char *dev, struct libu
- 		return (-1);
- 	}
- 
--	ddesc = libusb20_dev_get_device_desc(pdev);
--
- 	/*
- 	 * Iterate each interface.
- 	 */
diff -ruN --exclude=CVS /usr/ports/sysutils/uhidd/files/pkg-message.in ./files/pkg-message.in
--- /usr/ports/sysutils/uhidd/files/pkg-message.in	2012-10-14 23:45:27.000000000 +0200
+++ ./files/pkg-message.in	2012-10-14 22:26:04.000000000 +0200
@@ -2,15 +2,21 @@
 
 To use uhidd daemon for USB HID devices, depends on which sub class
 driver you want to attach, to avoid confilicts between the daemon and
-the kernel drivers, you need to remove some of these entries 'device
-ums', 'device ukbd', or 'device uhid' from your kernel config file and
-recompile the kernel. Or if these drivers are loaded as kernel
-modules, kldunload those that conflicts.
+the kernel drivers, you should either use the command line option '-u'
+to instruct the daemon to detach active kernel drivers attached to
+a device, or you should remove some of those entries 'device ums',
+'device ukbd', or 'device uhid' from your kernel config file and
+recompile the kernel.
+
+Note that if the USB kernel drivers are compiled as kernel modules,
+you should also remove the relevant devd(8) rules in /etc/devd/usb.conf
+config file, so those modules will not be loaded automatically by devd(8)
+when devices are attached.
 
 If you want to run uhidd deamon at the startup, add the following lines to
 /etc/rc.conf:
 
-	uhidd_flags="-kmohs"
+	uhidd_flags="-kmohsu"
 	uhidd_enable="YES"
 
 Note that you need to modify the uhidd_flags (command line options)
diff -ruN --exclude=CVS /usr/ports/sysutils/uhidd/files/uhidd.in ./files/uhidd.in
--- /usr/ports/sysutils/uhidd/files/uhidd.in	2012-10-14 23:45:27.000000000 +0200
+++ ./files/uhidd.in	2012-10-14 22:27:03.000000000 +0200
@@ -19,7 +19,7 @@
 rcvar=uhidd_enable
 command="%%PREFIX%%/sbin/${name}"
 start_cmd="uhidd_start"
-required_modules="uvhid vkbd"
+required_modules="vkbd"
 pidprefix="/var/run/uhidd"
 
 load_rc_config $name
diff -ruN --exclude=CVS /usr/ports/sysutils/uhidd/pkg-plist ./pkg-plist
--- /usr/ports/sysutils/uhidd/pkg-plist	2012-10-14 23:45:28.000000000 +0200
+++ ./pkg-plist	2012-10-14 22:35:23.000000000 +0200
@@ -2,8 +2,3 @@
 %%PL_DEVD%%etc/devd/uhidd-devd.conf.sample
 %%PL_DEVD%%@exec if [ ! -f %D/etc/devd/uhidd-devd.conf ]; then mkdir -p %B; cp -p %D/%F %B/uhidd-devd.conf; fi
 sbin/uhidd
-@cwd %%KMODDIR%%
-uvhid.ko
-@rmtry uvhid.ko.symbols
-@exec kldxref %D
-@unexec kldxref %D
--- uhidd-0.2.1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210142229.q9EMTVLi009496>