ports/95990: New Port: emulators/xjoypad
Timothy Beyer
beyert at cs.ucr.edu
Tue Apr 22 08:20:02 UTC 2008
The following reply was made to PR ports/95990; it has been noted by GNATS.
From: Timothy Beyer <beyert at cs.ucr.edu>
To: bug-followup at FreeBSD.org, FreeBSD-gnats-submit at freebsd.org
Cc: beyert at cs.ucr.edu
Subject: Re: ports/95990: New Port: emulators/xjoypad
Date: Tue, 22 Apr 2008 00:51:20 -0700
>Submitter-Id: current-users
>Originator: Timothy Beyer
>Organization: no organization
>Confidential: no
>Synopsis: New Port: emulators/linux-xjoypad
>Severity: non-critical
>Priority: low
>Category: ports
>Class: change-request
>Release: FreeBSD 7.0-RELEASE-p1 i386
>Environment:
FreeBSD aeonserv.aeonnet 7.0-RELEASE-p1 FreeBSD 7.0-RELEASE-p1 #0: Sun Apr 20 02:48:24 PDT 2008 beyert at aeonserv.aeonnet:/usr/src/sys/i386/compile/CUSTOM i386
>Description:
xjoypad allows an USB joypad (probably a USB Joystick, too) to be used
with games on linux (probably other unix-like operating systems too).
This is done by mapping the joypad events to X keyboard events which
are sent to the window currently having the focus. Therefore only
keyboard-controlled games are currently supported by xjoypad. xjoypad
was written to add joypad support to the playstation emulator epsxe.
>How-To-Repeat:
N/A
>Fix:
This is a fix to a prior problem report that I made in 2006,
http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/95990
It now works on the latest linuxulator in 7.0-RELEASE.
NOTE: This port is dependent on the application of a problem report for linux-js,
http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/120118
(also see http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2008-January/134947.html)
This port will not compile until pr #120118 is applied to linux-js.
--- linux-xjoypad.shar begins here ---
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# linux-xjoypad
# linux-xjoypad/pkg-descr
# linux-xjoypad/pkg-message
# linux-xjoypad/Makefile
# linux-xjoypad/pkg-plist
# linux-xjoypad/distinfo
# linux-xjoypad/files
# linux-xjoypad/files/patch-xjoypad.c
#
echo c - linux-xjoypad
mkdir -p linux-xjoypad > /dev/null 2>&1
echo x - linux-xjoypad/pkg-descr
sed 's/^X//' >linux-xjoypad/pkg-descr << 'END-of-linux-xjoypad/pkg-descr'
Xexcerpt from README.txt:
X
Xxjoypad allows an USB joypad (probably a USB joystick, too) to be used
Xwith games on linux (probably other unix-like operating systems too).
XThis is done by mapping the joypad events to X keyboard events which
Xare sent to the window currently having the focus. Therefore only
Xkeyboard-controlled games are currently supported by xjoypad. xjoypad
Xwas written to add joypad support to the playstation emulator epsxe.
X
XThis is the Linux version.
X
XWWW: http://members.chello.at/erich.kitzmueller/ammoq/download.html
X
X- Timothy Beyer
Xbeyert at cs.ucr.edu
END-of-linux-xjoypad/pkg-descr
echo x - linux-xjoypad/pkg-message
sed 's/^X//' >linux-xjoypad/pkg-message << 'END-of-linux-xjoypad/pkg-message'
X===============================================================================
XTo activate the default joystick to key mapping, run the command
X
Xxjoypad -device /dev/input/js[device-id] &
X
Xwhere [device-id] depends on whether you are using using a standard game pad or
Xa usb game pad (it's probably going to be /dev/input/js0)
X
Xnote that the -device switch is incorrectly stated as -devicefilename
Xin the documentation
X===============================================================================
END-of-linux-xjoypad/pkg-message
echo x - linux-xjoypad/Makefile
sed 's/^X//' >linux-xjoypad/Makefile << 'END-of-linux-xjoypad/Makefile'
X# New ports collection makefile for: linux-xjoypad
X# Date created: 17 Apr 2006
X# Whom: Timothy Beyer <beyert at cs.ucr.edu>
X#
X# $FreeBSD: ports/emulators/linux-xjoypad/Makefile,v 1.20 2008/04/22 00:25:20 beyert Exp $
X#
X
XPORTNAME= xjoypad
XPORTVERSION= 1
XPORTREVISION= 1
XCATEGORIES= emulators linux
XMASTER_SITES= http://members.chello.at/erich.kitzmueller/ammoq/
XPKGNAMEPREFIX= linux-
XDISTNAME= xjoypad
X
XMAINTAINER= beyert at cs.ucr.edu
XCOMMENT= Joy-Device to X mapping (lets you play Linux games with a joypad)
X
XBUILD_DEPENDS=${X11BASE}/lib/libX11.a:${PORTSDIR}/x11/libX11
XRUN_DEPENDS= /boot/modules/linux_js.ko:${PORTSDIR}/devel/linux-js
X
XWRKSRC= ${WRKDIR}/xjoypad/
XUSE_LINUX= yes
XUSE_X_PREFIX= yes
XUSE_ZIP= yes
X
XFILES=xjoypad.c sendevent.c
XCFLAGS+=-I ${PREFIX}/include
XLIB_X11=${PREFIX}/lib/libX11.a
XLIB_XAU=${PREFIX}/lib/libXau.a
XLIB_XDMCP=${PREFIX}/lib/libXdmcp.a
X
Xdo-build:
X (cd ${WRKSRC} && ${CC} ${CFLAGS} -o xjoypad ${FILES} -lcompat -lm ${LIB_X11} ${LIB_XAU} ${LIB_XDMCP})
X
Xdo-install:
X ${INSTALL_PROGRAM} ${WRKSRC}/xjoypad ${PREFIX}/bin
X
X.if !defined(NOPORTDOCS)
X ${MKDIR} ${DOCSDIR}
X ${INSTALL_DATA} ${WRKSRC}/README.txt ${DOCSDIR}
X.endif
X
X @${CAT} ${PKGMESSAGE}
X
X.include <bsd.port.mk>
END-of-linux-xjoypad/Makefile
echo x - linux-xjoypad/pkg-plist
sed 's/^X//' >linux-xjoypad/pkg-plist << 'END-of-linux-xjoypad/pkg-plist'
Xbin/xjoypad
X%%PORTDOCS%%%%DOCSDIR%%/README.txt
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
END-of-linux-xjoypad/pkg-plist
echo x - linux-xjoypad/distinfo
sed 's/^X//' >linux-xjoypad/distinfo << 'END-of-linux-xjoypad/distinfo'
XMD5 (xjoypad.zip) = 3cd14dae1e19f499e658c42d1d8861cc
XSHA256 (xjoypad.zip) = 1e640c369191c977a9729deac422d97dcc964cec219e5e1fc953afaeab8e82a8
XSIZE (xjoypad.zip) = 419299
END-of-linux-xjoypad/distinfo
echo c - linux-xjoypad/files
mkdir -p linux-xjoypad/files > /dev/null 2>&1
echo x - linux-xjoypad/files/patch-xjoypad.c
sed 's/^X//' >linux-xjoypad/files/patch-xjoypad.c << 'END-of-linux-xjoypad/files/patch-xjoypad.c'
X--- xjoypad.c.orig 2008-04-20 20:07:58.000000000 -0700
X+++ xjoypad.c 2008-04-20 20:11:19.000000000 -0700
X@@ -20,6 +20,7 @@
X
X #include <stdio.h>
X #include <stdlib.h>
X+#include <string.h>
X #include <sys/types.h>
X #include <sys/stat.h>
X #include <fcntl.h>
END-of-linux-xjoypad/files/patch-xjoypad.c
exit
--- linux-xjoypad.shar ends here ---
More information about the freebsd-ports-bugs
mailing list