aboutsummaryrefslogtreecommitdiffstats
path: root/emulators
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2008-05-28 20:58:56 +0800
committeredwin <edwin@FreeBSD.org>2008-05-28 20:58:56 +0800
commitffaeb5805d8a2c2b53602ad58eba46b2125c20bc (patch)
treed4322a0aac4e6d7c90cb85eab33ca0e7d3c6a9d4 /emulators
parentc7a6fe514222e17680e24778c2b263c80c92c553 (diff)
downloadfreebsd-ports-graphics-ffaeb5805d8a2c2b53602ad58eba46b2125c20bc.tar.gz
freebsd-ports-graphics-ffaeb5805d8a2c2b53602ad58eba46b2125c20bc.tar.zst
freebsd-ports-graphics-ffaeb5805d8a2c2b53602ad58eba46b2125c20bc.zip
New Port: emulators/xjoypad
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. PR: ports/95990 Submitted by: Timothy Beyer <beyert@cs.ucr.edu>
Diffstat (limited to 'emulators')
-rw-r--r--emulators/Makefile1
-rw-r--r--emulators/linux-xjoypad/Makefile47
-rw-r--r--emulators/linux-xjoypad/distinfo3
-rw-r--r--emulators/linux-xjoypad/files/patch-xjoypad.c10
-rw-r--r--emulators/linux-xjoypad/pkg-descr15
-rw-r--r--emulators/linux-xjoypad/pkg-message11
-rw-r--r--emulators/linux-xjoypad/pkg-plist3
7 files changed, 90 insertions, 0 deletions
diff --git a/emulators/Makefile b/emulators/Makefile
index 82a97a40e18..8b397c11b07 100644
--- a/emulators/Makefile
+++ b/emulators/Makefile
@@ -78,6 +78,7 @@
SUBDIR += linux-winetools
SUBDIR += linux_base-fc4
SUBDIR += linux_base-fc6
+ SUBDIR += linux-xjoypad
SUBDIR += linux_base-f7
SUBDIR += linux_base-f8
SUBDIR += linux_base-gentoo-stage1
diff --git a/emulators/linux-xjoypad/Makefile b/emulators/linux-xjoypad/Makefile
new file mode 100644
index 00000000000..08431cc8f01
--- /dev/null
+++ b/emulators/linux-xjoypad/Makefile
@@ -0,0 +1,47 @@
+# New ports collection makefile for: linux-xjoypad
+# Date created: 17 Apr 2006
+# Whom: Timothy Beyer <beyert@cs.ucr.edu>
+#
+# $FreeBSD$
+#
+
+PORTNAME= xjoypad
+PORTVERSION= 1
+PORTREVISION= 1
+CATEGORIES= emulators linux
+MASTER_SITES= http://members.chello.at/erich.kitzmueller/ammoq/down/
+PKGNAMEPREFIX= linux-
+DISTNAME= xjoypad
+
+MAINTAINER= beyert@cs.ucr.edu
+COMMENT= Joy-Device to X mapping (lets you play Linux games with a joypad)
+
+BUILD_DEPENDS= ${X11BASE}/lib/libX11.a:${PORTSDIR}/x11/libX11
+RUN_DEPENDS= /boot/modules/linux_js.ko:${PORTSDIR}/devel/linux-js
+
+USE_XORG= x11
+WRKSRC= ${WRKDIR}/xjoypad/
+USE_LINUX= yes
+USE_X_PREFIX= yes
+USE_ZIP= yes
+
+FILES= xjoypad.c sendevent.c
+CFLAGS+= -I ${PREFIX}/include
+LIB_X11= ${PREFIX}/lib/libX11.a
+LIB_XAU= ${PREFIX}/lib/libXau.a
+LIB_XDMCP= ${PREFIX}/lib/libXdmcp.a
+
+do-build:
+ (cd ${WRKSRC} && ${CC} ${CFLAGS} -o xjoypad ${FILES} -lcompat -lm ${LIB_X11} ${LIB_XAU} ${LIB_XDMCP})
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/xjoypad ${PREFIX}/bin
+
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README.txt ${DOCSDIR}
+.endif
+
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/emulators/linux-xjoypad/distinfo b/emulators/linux-xjoypad/distinfo
new file mode 100644
index 00000000000..b3ec7bfe280
--- /dev/null
+++ b/emulators/linux-xjoypad/distinfo
@@ -0,0 +1,3 @@
+MD5 (xjoypad.zip) = 3cd14dae1e19f499e658c42d1d8861cc
+SHA256 (xjoypad.zip) = 1e640c369191c977a9729deac422d97dcc964cec219e5e1fc953afaeab8e82a8
+SIZE (xjoypad.zip) = 419299
diff --git a/emulators/linux-xjoypad/files/patch-xjoypad.c b/emulators/linux-xjoypad/files/patch-xjoypad.c
new file mode 100644
index 00000000000..0c6881f20ed
--- /dev/null
+++ b/emulators/linux-xjoypad/files/patch-xjoypad.c
@@ -0,0 +1,10 @@
+--- xjoypad.c.orig 2008-04-20 20:07:58.000000000 -0700
++++ xjoypad.c 2008-04-20 20:11:19.000000000 -0700
+@@ -20,6 +20,7 @@
+
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
diff --git a/emulators/linux-xjoypad/pkg-descr b/emulators/linux-xjoypad/pkg-descr
new file mode 100644
index 00000000000..531d2f7c23f
--- /dev/null
+++ b/emulators/linux-xjoypad/pkg-descr
@@ -0,0 +1,15 @@
+excerpt from README.txt:
+
+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.
+
+This is the Linux version.
+
+WWW: http://members.chello.at/erich.kitzmueller/ammoq/download.html
+
+- Timothy Beyer
+beyert@cs.ucr.edu
diff --git a/emulators/linux-xjoypad/pkg-message b/emulators/linux-xjoypad/pkg-message
new file mode 100644
index 00000000000..30d52a0dffb
--- /dev/null
+++ b/emulators/linux-xjoypad/pkg-message
@@ -0,0 +1,11 @@
+===============================================================================
+To activate the default joystick to key mapping, run the command
+
+xjoypad -device /dev/input/js[device-id] &
+
+where [device-id] depends on whether you are using using a standard game pad or
+a usb game pad (it's probably going to be /dev/input/js0)
+
+note that the -device switch is incorrectly stated as -devicefilename
+in the documentation
+===============================================================================
diff --git a/emulators/linux-xjoypad/pkg-plist b/emulators/linux-xjoypad/pkg-plist
new file mode 100644
index 00000000000..dda60e80b30
--- /dev/null
+++ b/emulators/linux-xjoypad/pkg-plist
@@ -0,0 +1,3 @@
+bin/xjoypad
+%%PORTDOCS%%%%DOCSDIR%%/README.txt
+%%PORTDOCS%%@dirrm %%DOCSDIR%%