diff options
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/linux-js/Makefile | 44 | ||||
-rw-r--r-- | devel/linux-js/distinfo | 3 | ||||
-rw-r--r-- | devel/linux-js/files/jscal.sh.in | 31 | ||||
-rw-r--r-- | devel/linux-js/pkg-descr | 6 | ||||
-rw-r--r-- | devel/linux-js/pkg-message | 29 | ||||
-rw-r--r-- | devel/linux-js/pkg-plist | 8 |
7 files changed, 122 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index 07fab4dd7be0..df092fb3557e 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -543,6 +543,7 @@ SUBDIR += lincvs SUBDIR += linux-allegro SUBDIR += linux-glib2 + SUBDIR += linux-js SUBDIR += linux-libglade SUBDIR += linux-runrev SUBDIR += linux-sdl12 diff --git a/devel/linux-js/Makefile b/devel/linux-js/Makefile new file mode 100644 index 000000000000..0c396abeb130 --- /dev/null +++ b/devel/linux-js/Makefile @@ -0,0 +1,44 @@ +# New ports collection makefile for: linux-js +# Date created: 5 Feb 2006 +# Whom: Jean-Yves Lefort <jylefort@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= linux-js +PORTVERSION= 1.0 +CATEGORIES= devel emulators +MASTER_SITES= ${MASTER_SITE_LOCAL} +MASTER_SITE_SUBDIR= jylefort + +MAINTAINER= jylefort@FreeBSD.org +COMMENT= The Linux joystick interface ported to FreeBSD + +PROGRAMS= jscal jstest + +MAN1= ${PROGRAMS:S|$|.1|} +PORTDOCS= joystick-api.txt +USE_RC_SUBR= jscal.sh + +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 503001 +IGNORE= requires FreeBSD 5.3 or superior +.endif + +.if !exists(/usr/src/sys/Makefile) +IGNORE= requires kernel source files +.endif + +post-install: + ${MKDIR} ${PREFIX}/include/linux + ${INSTALL_DATA} ${WRKSRC}/joystick.h ${PREFIX}/include/linux + ${INSTALL_PROGRAM} ${PROGRAMS:S|^|${WRKSRC}/|} ${PREFIX}/bin + ${INSTALL_MAN} ${MAN1:S|^|${WRKSRC}/|} ${PREFIX}/man/man1 +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/joystick-api.txt ${DOCSDIR} +.endif + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.post.mk> diff --git a/devel/linux-js/distinfo b/devel/linux-js/distinfo new file mode 100644 index 000000000000..15de6dd162da --- /dev/null +++ b/devel/linux-js/distinfo @@ -0,0 +1,3 @@ +MD5 (linux-js-1.0.tar.gz) = 8dd60e27c4b122b59fbcda3931626745 +SHA256 (linux-js-1.0.tar.gz) = 463dbdc7efb79945728d4c5a9896ac6e7086527a5c39c2ae779e7d3df09e635e +SIZE (linux-js-1.0.tar.gz) = 20191 diff --git a/devel/linux-js/files/jscal.sh.in b/devel/linux-js/files/jscal.sh.in new file mode 100644 index 000000000000..ebc4b5d8e77a --- /dev/null +++ b/devel/linux-js/files/jscal.sh.in @@ -0,0 +1,31 @@ +#!/bin/sh +# $FreeBSD$ + +# PROVIDE: jscal +# KEYWORD: shutdown + +jscal_enable=${jscal_enable-"NO"} +jscal_device="/dev/input/js0" +jscal_state="${jscal_state:-/var/db/jscal-state}" + +. %%RC_SUBR%% + +name="jscal" +rcvar=`set_rcvar` +command="%%PREFIX%%/bin/jscal" +start_cmd="jscal_start" +stop_cmd="jscal_stop" + +jscal_start() +{ + [ -f "$jscal_state" ] && . "$jscal_state" 2>/dev/null +} + +jscal_stop() +{ + cal=`"$command" -p "$jscal_device" 2>/dev/null` && \ + echo "$cal" | sed -e "s|^jscal|$command|" > $jscal_state +} + +load_rc_config $name +run_rc_command "$1" diff --git a/devel/linux-js/pkg-descr b/devel/linux-js/pkg-descr new file mode 100644 index 000000000000..08f24416806e --- /dev/null +++ b/devel/linux-js/pkg-descr @@ -0,0 +1,6 @@ +This port provides a FreeBSD kernel module implementing the Linux joystick +interface (/dev/input/js0), as well as calibration (jscal) and test (jstest) +utilities. + +- Jean-Yves Lefort +jylefort@FreeBSD.org diff --git a/devel/linux-js/pkg-message b/devel/linux-js/pkg-message new file mode 100644 index 000000000000..df5f8e490649 --- /dev/null +++ b/devel/linux-js/pkg-message @@ -0,0 +1,29 @@ +=============================================================================== + +The linux_js kernel module supports analog joysticks through the +joy(4) driver, which must be loaded as a module or compiled into the +kernel. USB joysticks are not yet supported. + +To load the kernel module immediately, type the following command: + + kldload linux_js + +To load the kernel module at boot, add the following line to +/boot/loader.conf: + + linux_js_load="YES" + +To test your joystick(s), type the following command: + + jstest /dev/input/js0 + +To calibrate your joystick(s), type the following command: + + jscal -c /dev/input/js0 + +To save the calibration data at system shutdown and restore it at +boot, add the following line to /etc/rc.conf: + + jscal_enable="YES" + +=============================================================================== diff --git a/devel/linux-js/pkg-plist b/devel/linux-js/pkg-plist new file mode 100644 index 000000000000..6b2caf146e7a --- /dev/null +++ b/devel/linux-js/pkg-plist @@ -0,0 +1,8 @@ +bin/jscal +bin/jstest +include/linux/joystick.h +@dirrm include/linux +@cwd /boot/modules +linux_js.ko +@exec kldxref %D +@unexec kldxref %D |