Index: head/sysutils/uhidd/Makefile =================================================================== --- head/sysutils/uhidd/Makefile (revision 394989) +++ head/sysutils/uhidd/Makefile (revision 394990) @@ -1,58 +1,57 @@ # Created by: Kai Wang # $FreeBSD$ PORTNAME= uhidd PORTVERSION= 0.2.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MASTER_SITES= GOOGLE_CODE \ http://people.freebsd.org/~kaiw/distfiles/ -MAINTAINER= ports@FreeBSD.org +MAINTAINER= jbeich@FreeBSD.org COMMENT= Userland USB HID device driver using libusb20 LICENSE= BSD2CLAUSE -BUILD_DEPENDS= cuse4bsd-kmod>=0.1.24:${PORTSDIR}/multimedia/cuse4bsd-kmod -LIB_DEPENDS= libcuse4bsd.so:${PORTSDIR}/multimedia/cuse4bsd-kmod - +USES= uidfix +MAKE_ENV+= BINDIR="${PREFIX}/sbin" MANDIR="${MANPREFIX}/man/man" +MAKE_ARGS= LIBDIR="${LOCALBASE}/lib" USE_RC_SUBR= uhidd -SUB_FILES= pkg-message -LIBDIR= ${PREFIX}/lib - -OPTIONS_DEFINE= DEVD +OPTIONS_DEFINE= CUSE DEVD OPTIONS_DEFAULT= DEVD OPTIONS_SUB= yes -.include +.if exists(/usr/lib/libcuse.so) +OPTIONS_DEFAULT+= CUSE +.else +OPTIONS_EXCLUDE+= CUSE +.endif -LIBCUSE= ${LIBDIR}/libcuse4bsd.so +CUSE_DESC= Use cuse(3) over multimedia/cuse4bsd-kmod +CUSE_BUILD_DEPENDS_OFF= cuse4bsd-kmod>=0.1.24:${PORTSDIR}/multimedia/cuse4bsd-kmod +CUSE_LIB_DEPENDS_OFF= libcuse4bsd.so:${PORTSDIR}/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 -.if ${OSVERSION} > 1000012 -EXTRA_PATCHES+= ${FILESDIR}/extra-patch-uhidd-parser.y -.endif - post-patch: .SILENT ${FIND} ${WRKSRC}/uhidd -type f -not -name Makefile \ -exec ${REINPLACE_CMD} 's|/usr/local|${PREFIX}|g' {} + -do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/uhidd/uhidd ${STAGEDIR}${PREFIX}/sbin - ${INSTALL_MAN} ${WRKSRC}/uhidd/uhidd.8 ${STAGEDIR}${PREFIX}/man/man8 - ${INSTALL_MAN} ${WRKSRC}/uhidd/uhidd.conf.5 ${STAGEDIR}${PREFIX}/man/man5 -.if ${PORT_OPTIONS:MDEVD} +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 - ${REINPLACE_CMD} -E \ - -e "s|%%PREFIX%%|${PREFIX}|" \ - -e "s|%%LIBCUSE%%|${LIBCUSE}|" \ + ${REINPLACE_CMD} ${_SUB_LIST_TEMP} \ ${WRKSRC}/uhidd/uhidd-devd.conf.sample ${INSTALL_DATA} ${WRKSRC}/uhidd/uhidd-devd.conf.sample \ ${STAGEDIR}${PREFIX}/etc/devd -.endif -.include +.include Index: head/sysutils/uhidd/files/extra-patch-uhidd-parser.y =================================================================== --- head/sysutils/uhidd/files/extra-patch-uhidd-parser.y (revision 394989) +++ head/sysutils/uhidd/files/extra-patch-uhidd-parser.y (nonexistent) @@ -1,10 +0,0 @@ ---- 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; - Property changes on: head/sysutils/uhidd/files/extra-patch-uhidd-parser.y ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/uhidd/files/patch-uhidd-usb_hid_usage =================================================================== --- head/sysutils/uhidd/files/patch-uhidd-usb_hid_usage (revision 394989) +++ head/sysutils/uhidd/files/patch-uhidd-usb_hid_usage (nonexistent) @@ -1,13 +0,0 @@ ---- 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 Property changes on: head/sysutils/uhidd/files/patch-uhidd-usb_hid_usage ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/uhidd/files/pkg-message.in =================================================================== --- head/sysutils/uhidd/files/pkg-message.in (revision 394989) +++ head/sysutils/uhidd/files/pkg-message.in (nonexistent) @@ -1,32 +0,0 @@ -============================================================================== - -To use uhidd daemon for USB HID devices, depends on which sub class -driver you want to attach, to avoid conflicts between the daemon and -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 daemon at the startup, add the following lines to -/etc/rc.conf: - - uhidd_flags="-kmohsu" - uhidd_enable="YES" - -Note that you need to modify the uhidd_flags (command line options) -according to which sub class drivers you want to use. - -To manually start/stop uhidd daemon on certain device, run: - - %%PREFIX%%/etc/rc.d/uhidd [start|stop] /dev/ugen.X.Y - -See http://wiki.FreeBSD.org/uhidd for more details about how to install and -setup the daemon. - -============================================================================== Property changes on: head/sysutils/uhidd/files/pkg-message.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/uhidd/files/patch-uhidd-Makefile =================================================================== --- head/sysutils/uhidd/files/patch-uhidd-Makefile (revision 394989) +++ head/sysutils/uhidd/files/patch-uhidd-Makefile (nonexistent) @@ -1,11 +0,0 @@ ---- uhidd/Makefile.old 2013-12-19 06:20:40.000000000 +0100 -+++ uhidd/Makefile 2013-12-19 06:19:20.000000000 +0100 -@@ -8,7 +8,7 @@ - CLEANFILES= ${GENSRCS} - MAN= uhidd.conf.5 uhidd.8 - --WARNS?= 6 -+WARNS?= 5 - - PREFIX?= /usr/local - LOCALBASE?= /usr/local Property changes on: head/sysutils/uhidd/files/patch-uhidd-Makefile ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/sysutils/uhidd/files/patch-uhidd_Makefile =================================================================== --- head/sysutils/uhidd/files/patch-uhidd_Makefile (nonexistent) +++ head/sysutils/uhidd/files/patch-uhidd_Makefile (revision 394990) @@ -0,0 +1,11 @@ +--- uhidd/Makefile.orig 2012-10-14 00:38:33 UTC ++++ uhidd/Makefile +@@ -8,7 +8,7 @@ GENSRCS= usage_in_page.c usage_page.c + CLEANFILES= ${GENSRCS} + MAN= uhidd.conf.5 uhidd.8 + +-WARNS?= 6 ++WARNS?= 5 + + PREFIX?= /usr/local + LOCALBASE?= /usr/local Property changes on: head/sysutils/uhidd/files/patch-uhidd_Makefile ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sysutils/uhidd/files/patch-uhidd_usb__hid__usages =================================================================== --- head/sysutils/uhidd/files/patch-uhidd_usb__hid__usages (nonexistent) +++ head/sysutils/uhidd/files/patch-uhidd_usb__hid__usages (revision 394990) @@ -0,0 +1,13 @@ +--- uhidd/usb_hid_usages.orig 2009-07-30 10:46:10 UTC ++++ uhidd/usb_hid_usages +@@ -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 Property changes on: head/sysutils/uhidd/files/patch-uhidd_usb__hid__usages ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sysutils/uhidd/pkg-message =================================================================== --- head/sysutils/uhidd/pkg-message (nonexistent) +++ head/sysutils/uhidd/pkg-message (revision 394990) @@ -0,0 +1,32 @@ +============================================================================== + +To use uhidd daemon for USB HID devices, depends on which sub class +driver you want to attach, to avoid conflicts between the daemon and +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 daemon at the startup, add the following lines to +/etc/rc.conf: + + uhidd_flags="-kmohsu" + uhidd_enable="YES" + +Note that you need to modify the uhidd_flags (command line options) +according to which sub class drivers you want to use. + +To manually start/stop uhidd daemon on certain device, run: + + service uhidd [start|stop] /dev/ugen.X.Y + +See http://wiki.FreeBSD.org/uhidd for more details about how to install and +setup the daemon. + +============================================================================== Property changes on: head/sysutils/uhidd/pkg-message ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property