From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Feb 22 16:10:05 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DF00C16A402 for ; Thu, 22 Feb 2007 16:10:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id BF5E413C4A3 for ; Thu, 22 Feb 2007 16:10:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l1MGA5J0007993 for ; Thu, 22 Feb 2007 16:10:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l1MGA52Y007985; Thu, 22 Feb 2007 16:10:05 GMT (envelope-from gnats) Resent-Date: Thu, 22 Feb 2007 16:10:05 GMT Resent-Message-Id: <200702221610.l1MGA52Y007985@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dwayne MacKinnon Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E836616A400 for ; Thu, 22 Feb 2007 16:05:17 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [69.147.83.33]) by mx1.freebsd.org (Postfix) with ESMTP id C0F2A13C441 for ; Thu, 22 Feb 2007 16:05:17 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l1MG5H4v027496 for ; Thu, 22 Feb 2007 16:05:17 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id l1MG5H6E027472; Thu, 22 Feb 2007 16:05:17 GMT (envelope-from nobody) Message-Id: <200702221605.l1MG5H6E027472@www.freebsd.org> Date: Thu, 22 Feb 2007 16:05:17 GMT From: Dwayne MacKinnon To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: ports/109438: [patch] emulators/vice Add support for joysticks. X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Feb 2007 16:10:06 -0000 >Number: 109438 >Category: ports >Synopsis: [patch] emulators/vice Add support for joysticks. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Feb 22 16:10:05 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Dwayne MacKinnon >Release: 6.2-RELEASE >Organization: >Environment: FreeBSD chiron 6.2-RELEASE FreeBSD 6.2-RELEASE #1: Fri Jan 26 08:20:47 EST 2007 root@chiron:/usr/obj/usr/src/sys/CHIRON i386 >Description: The VICE port does not configure itself to use FreeBSD's joystick support (/dev/joy*). It looks for machine/joystick.h, when in FreeBSD the include file is actually sys/joystick.h. >How-To-Repeat: Compile the VICE port from src, and examine the configure output. >Fix: I've included four files with this PR: 1) A patch to the port Makefile, which uses a post-patch sed command to change all instances of machine/joystick.h in the configure script to sys/joystick.h. 2) A patch to src/arch/unix/joy.c, which changes machine/joystick.h to sys/joystick.h. 3) A patch to src/arch/unix/joy_usb.c. Enabling joystick support via the changes to the configure script reveals a secondary problem: the compilation of joy_usb.c fails. The compile failure is due to _IOWR not being defined. The patch adds the header file sys/ioccom.h to the .c file. This solves the compile problem, but I have not been able to test to see if a USB joystick would actually work with VICE due to lack of equipment. 4) A pkg-message file to help steer people installing VICE on how to load the joy kernel module and set the permissions for /dev/joy* properly so that VICE can use the devices. Patch attached with submission follows: --- Makefile.orig Tue Feb 20 10:36:50 2007 +++ Makefile Tue Feb 20 10:07:22 2007 @@ -101,6 +101,8 @@ post-patch: ${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" \ ${WRKSRC}/man/vice.1 + ${REINPLACE_CMD} -e "s|machine/joystick.h|sys/joystick.h|g" \ + ${WRKSRC}/configure .if defined(NOPORTDOCS) ${REINPLACE_CMD} -e 's| doc||' ${WRKSRC}/Makefile.in .endif --- src/arch/unix/joy.c.orig Tue Feb 20 10:11:02 2007 +++ src/arch/unix/joy.c Tue Feb 20 10:11:13 2007 @@ -117,7 +117,7 @@ #endif #elif defined(BSD_JOYSTICK) -#include +#include #define JS_DATA_TYPE joystick #define JS_RETURN sizeof(struct joystick) int use_old_api=1; --- src/arch/unix/joy_usb.c.orig Tue Feb 20 10:11:57 2007 +++ src/arch/unix/joy_usb.c Tue Feb 20 10:12:37 2007 @@ -50,6 +50,7 @@ extern log_t joystick_log; +#include #include #include #include The VICE port can use /dev/joy* for joystick support for video games. To enable the joystick port, add joy_load="YES" to /boot/loader.conf and the following lines to /etc/devfs.conf (for additional joysticks use /dev/joy1, /dev/joy2 etc.) : own /dev/joy0 root:wheel perm /dev/joy0 0666 >Release-Note: >Audit-Trail: >Unformatted: