svn commit: r306286 - in head/sysutils/uhidd: . files
Guido Falsi
madpilot at FreeBSD.org
Mon Oct 22 20:13:37 UTC 2012
Author: madpilot
Date: Mon Oct 22 20:13:36 2012
New Revision: 306286
URL: http://svn.freebsd.org/changeset/ports/306286
Log:
- Update to 0.2.1
PR: ports/172703
Submitted by: Kai Wang <kaiwang27 at gmail.com> (maintainer)
Feature safe: yes
Added:
head/sysutils/uhidd/files/patch-uhidd-usb_hid_usage (contents, props changed)
Deleted:
head/sysutils/uhidd/files/patch-hidump.c
head/sysutils/uhidd/files/patch-uhidd-lex.l
head/sysutils/uhidd/files/patch-uhidd-uhidd-devd.conf.sample
head/sysutils/uhidd/files/patch-uhidd-uhidd.c
Modified:
head/sysutils/uhidd/Makefile (contents, props changed)
head/sysutils/uhidd/distinfo (contents, props changed)
head/sysutils/uhidd/files/extra-patch-uhidd-parser.y (contents, props changed)
head/sysutils/uhidd/files/pkg-message.in (contents, props changed)
head/sysutils/uhidd/files/uhidd.in (contents, props changed)
head/sysutils/uhidd/pkg-plist (contents, props changed)
Modified: head/sysutils/uhidd/Makefile
==============================================================================
--- head/sysutils/uhidd/Makefile Mon Oct 22 20:06:34 2012 (r306285)
+++ head/sysutils/uhidd/Makefile Mon Oct 22 20:13:36 2012 (r306286)
@@ -1,13 +1,8 @@
-# New ports collection makefile for: uhidd
-# Date created: 2009-08-07
-# Whom: Kai Wang <kaiwang27 at gmail.com>
-#
+# Created by: Kai Wang <kaiwang27 at gmail.com>
# $FreeBSD$
-#
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 +10,24 @@ MASTER_SITES= GOOGLE_CODE \
MAINTAINER= kaiwang27 at 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:${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
+OPTIONS_DEFINE= DEVD
+OPTIONS_DEFAULT= DEVD
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,34 +38,27 @@ IGNORE= does not build with the old USB
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)
+.if ${PORT_OPTIONS:MDEVD}
PLIST_SUB+= PL_DEVD=""
.else
PLIST_SUB+= PL_DEVD="@comment "
.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)
+.if ${PORT_OPTIONS:MDEVD}
${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 \
Modified: head/sysutils/uhidd/distinfo
==============================================================================
--- head/sysutils/uhidd/distinfo Mon Oct 22 20:06:34 2012 (r306285)
+++ head/sysutils/uhidd/distinfo Mon Oct 22 20:13:36 2012 (r306286)
@@ -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
Modified: head/sysutils/uhidd/files/extra-patch-uhidd-parser.y
==============================================================================
--- head/sysutils/uhidd/files/extra-patch-uhidd-parser.y Mon Oct 22 20:06:34 2012 (r306285)
+++ head/sysutils/uhidd/files/extra-patch-uhidd-parser.y Mon Oct 22 20:13:36 2012 (r306286)
@@ -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;
-
+
Added: head/sysutils/uhidd/files/patch-uhidd-usb_hid_usage
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/uhidd/files/patch-uhidd-usb_hid_usage Mon Oct 22 20:13:36 2012 (r306286)
@@ -0,0 +1,13 @@
+--- uhidd/usb_hid_usages.orig 2012-10-21 19:01:23.182592810 +0200
++++ uhidd/usb_hid_usages 2012-10-21 19:02:36.603616460 +0200
+@@ -1270,8 +1270,8 @@
+ 0x48 Top Corner Distortion Balance
+ 0x4A Bottom Corner Distortion Control
+ 0x4C Bottom Corner Distortion Balance
+- 0x56 Horizontal Moiré
+- 0x58 Vertical Moiré
++ 0x56 Horizontal Moire
++ 0x58 Vertical Moire
+ 0x5E Input Level Select
+ 0x60 Input Source Select
+ 0x6C Red Video Black Level
Modified: head/sysutils/uhidd/files/pkg-message.in
==============================================================================
--- head/sysutils/uhidd/files/pkg-message.in Mon Oct 22 20:06:34 2012 (r306285)
+++ head/sysutils/uhidd/files/pkg-message.in Mon Oct 22 20:13:36 2012 (r306286)
@@ -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)
Modified: head/sysutils/uhidd/files/uhidd.in
==============================================================================
--- head/sysutils/uhidd/files/uhidd.in Mon Oct 22 20:06:34 2012 (r306285)
+++ head/sysutils/uhidd/files/uhidd.in Mon Oct 22 20:13:36 2012 (r306286)
@@ -19,7 +19,7 @@ name="uhidd"
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
Modified: head/sysutils/uhidd/pkg-plist
==============================================================================
--- head/sysutils/uhidd/pkg-plist Mon Oct 22 20:06:34 2012 (r306285)
+++ head/sysutils/uhidd/pkg-plist Mon Oct 22 20:13:36 2012 (r306286)
@@ -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
- at cwd %%KMODDIR%%
-uvhid.ko
- at rmtry uvhid.ko.symbols
- at exec kldxref %D
- at unexec kldxref %D
More information about the svn-ports-head
mailing list