From d3a4af2a131b3ee3b8a34517aaaff7b04c84b0c0 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Thu, 31 Mar 2022 13:51:56 +0100 Subject: games/joy2key: Added (control applications with joystick/gamepad) Signed-off-by: Dave Woodfall Signed-off-by: Willy Sudiarto Raharjo --- games/joy2key/README | 5 ++ games/joy2key/button_list_segfault.patch | 25 ++++++++ games/joy2key/home_not_set_segfault.patch | 34 +++++++++++ games/joy2key/joy2key.SlackBuild | 95 +++++++++++++++++++++++++++++++ games/joy2key/joy2key.info | 10 ++++ games/joy2key/slack-desc | 19 +++++++ 6 files changed, 188 insertions(+) create mode 100644 games/joy2key/README create mode 100644 games/joy2key/button_list_segfault.patch create mode 100644 games/joy2key/home_not_set_segfault.patch create mode 100644 games/joy2key/joy2key.SlackBuild create mode 100644 games/joy2key/joy2key.info create mode 100644 games/joy2key/slack-desc (limited to 'games/joy2key') diff --git a/games/joy2key/README b/games/joy2key/README new file mode 100644 index 000000000000..f76f27ec2f3c --- /dev/null +++ b/games/joy2key/README @@ -0,0 +1,5 @@ +joy2key (control keyboard-only applications with joystick/gamepad) + +Joy2key allows you to control applications accepting keyboard commands +with your joystick. It does not work with all applications, however, +because some do not accept synthetic events for security reasons. diff --git a/games/joy2key/button_list_segfault.patch b/games/joy2key/button_list_segfault.patch new file mode 100644 index 000000000000..2a6e95d197bf --- /dev/null +++ b/games/joy2key/button_list_segfault.patch @@ -0,0 +1,25 @@ +Author: Jonathan Niehof +Subject: Fix a segfault when parsing options to -buttons +Last-Update: 2009-12-06 +Forwarded: yes +Bug: https://sourceforge.net/tracker/?func=detail&aid=2909756&group_id=227783&atid=1072387 + +joy2key segfaults when reading the list of keystrokes to associate with +buttons. This is a regression from 1.6.1 and this patch simply reverts +the offending line to that earlier version. I have verified that, with +the patch applied, all buttons on the joystick are usable and all buttons +listed on the command line are processed appropriately. + +Index: joy2key-1.6.3/joy2key.c +=================================================================== +--- joy2key-1.6.3.orig/joy2key.c 2009-12-06 15:38:56.000000000 -0500 ++++ joy2key-1.6.3/joy2key.c 2009-12-06 15:50:48.000000000 -0500 +@@ -576,7 +576,7 @@ + exit(1); + } + button_act_counter=0; +- while((i+1)<=argc && (argv[i+1][0]!='-' || ++ while((i+1) +Subject: Fix segfault if $HOME not set and -config passed +Bug-Debian: https://bugs.debian.org/716582 +Forwarded: https://sourceforge.net/p/joy2key/patches/5/ +Last-Update: 2013-07-13 + +--- a/joy2key.c ++++ b/joy2key.c +@@ -386,6 +386,7 @@ + FILE *file; + int rcargc; + char *rcargv[255], line[255]; ++ char *homedir; + + for(i=1; i $PKG/usr/man/man1/$PRGNAM.1.gz + +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cp -a AUTHORS COPYING ChangeLog README TODO rawscancodes joy2keyrc.sample $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/games/joy2key/joy2key.info b/games/joy2key/joy2key.info new file mode 100644 index 000000000000..1e23d6fd2e55 --- /dev/null +++ b/games/joy2key/joy2key.info @@ -0,0 +1,10 @@ +PRGNAM="joy2key" +VERSION="1.6.3" +HOMEPAGE="https://packages.debian.org/sid/joy2key" +DOWNLOAD="https://ftp.osuosl.org/pub/gentoo/distfiles/joy2key-1.6.3.tar.bz2" +MD5SUM="e1119b8cbfd221b4f692d9968fad9ee5" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" diff --git a/games/joy2key/slack-desc b/games/joy2key/slack-desc new file mode 100644 index 000000000000..823ff9377d31 --- /dev/null +++ b/games/joy2key/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +joy2key: joy2key (control keyboard-only applications with joystick/gamepad) +joy2key: +joy2key: Joy2key allows you to control applications accepting keyboard commands +joy2key: with your joystick. It does not work with all applications, however, +joy2key: because some do not accept synthetic events for security reasons. +joy2key: +joy2key: https://packages.debian.org/sid/joy2key +joy2key: +joy2key: +joy2key: +joy2key: -- cgit v1.2.3