diff options
-rw-r--r-- | games-util/joystick/ChangeLog | 10 | ||||
-rw-r--r-- | games-util/joystick/files/digest-joystick-20050720 | 2 | ||||
-rw-r--r-- | games-util/joystick/files/digest-joystick-20060731 | 3 | ||||
-rw-r--r-- | games-util/joystick/files/joystick-jstest-segv.patch | 52 | ||||
-rw-r--r-- | games-util/joystick/joystick-20060731.ebuild | 36 |
5 files changed, 101 insertions, 2 deletions
diff --git a/games-util/joystick/ChangeLog b/games-util/joystick/ChangeLog index 37682c9c6133..7c0811c635d6 100644 --- a/games-util/joystick/ChangeLog +++ b/games-util/joystick/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for games-util/joystick -# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-util/joystick/ChangeLog,v 1.3 2005/08/23 03:18:02 vapier Exp $ +# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/games-util/joystick/ChangeLog,v 1.4 2006/07/31 04:51:35 vapier Exp $ + +*joystick-20060731 (31 Jul 2006) + + 31 Jul 2006; Mike Frysinger <vapier@gentoo.org> + +files/joystick-jstest-segv.patch, +joystick-20060731.ebuild: + Version bump and fix by Matt Anderson for segv in jstest #132607. 23 Aug 2005; Mike Frysinger <vapier@gentoo.org> +files/joystick-MCS-defines.patch, joystick-20050720.ebuild: diff --git a/games-util/joystick/files/digest-joystick-20050720 b/games-util/joystick/files/digest-joystick-20050720 index 3f52e4ff707d..68958dd4e057 100644 --- a/games-util/joystick/files/digest-joystick-20050720 +++ b/games-util/joystick/files/digest-joystick-20050720 @@ -1 +1,3 @@ MD5 51ff9dbe781be634e7470a9505754f4b joystick-20050720.tar.bz2 27187 +RMD160 930f2605801298bbe19d99a3030726796a4707c9 joystick-20050720.tar.bz2 27187 +SHA256 fac9d32d03e91615e47f23d279d1b0cc9f9fdfa12a897d0771a533d9be8ff36a joystick-20050720.tar.bz2 27187 diff --git a/games-util/joystick/files/digest-joystick-20060731 b/games-util/joystick/files/digest-joystick-20060731 new file mode 100644 index 000000000000..a0fb481f1192 --- /dev/null +++ b/games-util/joystick/files/digest-joystick-20060731 @@ -0,0 +1,3 @@ +MD5 388fff42d5f65f4bfd1548ea125ca798 joystick-20060731.tar.bz2 27411 +RMD160 fea5a38160bb578c7d0ab380b7d5f7ceba490ca4 joystick-20060731.tar.bz2 27411 +SHA256 17aa3ca45f6bbd2004d0cede4a0f1c32b4cabb946628a85602d89c45d874006b joystick-20060731.tar.bz2 27411 diff --git a/games-util/joystick/files/joystick-jstest-segv.patch b/games-util/joystick/files/joystick-jstest-segv.patch new file mode 100644 index 000000000000..fa1e4cdd6cbd --- /dev/null +++ b/games-util/joystick/files/joystick-jstest-segv.patch @@ -0,0 +1,52 @@ +fix segfault when JSIOCGAXMAP/JSIOCGBTNMAP dont work + +http://bugs.gentoo.org/132607 + +patch by Matt Anderson + +--- utils/jstest.c ++++ utils/jstest.c +@@ -76,6 +76,7 @@ int main (int argc, char **argv) + char name[NAME_LENGTH] = "Unknown"; + uint16_t btnmap[KEY_MAX - BTN_MISC + 1]; + uint8_t axmap[ABS_MAX + 1]; ++ int btnmap_ok, axismap_ok; + + if (argc < 2 || argc > 3 || !strcmp("--help", argv[1])) { + puts(""); +@@ -99,21 +100,29 @@ int main (int argc, char **argv) + ioctl(fd, JSIOCGAXES, &axes); + ioctl(fd, JSIOCGBUTTONS, &buttons); + ioctl(fd, JSIOCGNAME(NAME_LENGTH), name); +- ioctl(fd, JSIOCGAXMAP, axmap); +- ioctl(fd, JSIOCGBTNMAP, btnmap); ++ axismap_ok = ioctl(fd, JSIOCGAXMAP, axmap); ++ btnmap_ok = ioctl(fd, JSIOCGBTNMAP, btnmap); + + + printf("Driver version is %d.%d.%d.\n", + version >> 16, (version >> 8) & 0xff, version & 0xff); + + printf("Joystick (%s) has %d axes (", name, axes); +- for (i = 0; i < axes; i++) +- printf("%s%s", i > 0 ? ", " : "", axis_names[axmap[i]]); ++ if (!axismap_ok) { ++ for (i = 0; i < axes; i++) ++ printf("%s%s", i > 0 ? ", " : "", axis_names[axmap[i]]); ++ } else { ++ printf(" axismap never defined "); ++ } + puts(")"); + + printf("and %d buttons (", buttons); +- for (i = 0; i < buttons; i++) +- printf("%s%s", i > 0 ? ", " : "", button_names[btnmap[i] - BTN_MISC]); ++ if (!btnmap_ok) { ++ for (i = 0; i < buttons; i++) ++ printf("%s%s", i > 0 ? ", " : "", button_names[btnmap[i] - BTN_MISC]); ++ } else { ++ printf(" buttonmap never defined "); ++ } + puts(")."); + + printf("Testing ... (interrupt to exit)\n"); diff --git a/games-util/joystick/joystick-20060731.ebuild b/games-util/joystick/joystick-20060731.ebuild new file mode 100644 index 000000000000..e690b0b69b92 --- /dev/null +++ b/games-util/joystick/joystick-20060731.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/games-util/joystick/joystick-20060731.ebuild,v 1.1 2006/07/31 04:51:35 vapier Exp $ + +inherit eutils + +DESCRIPTION="joystick testing utilities" +HOMEPAGE="http://atrey.karlin.mff.cuni.cz/~vojtech/input/" +SRC_URI="mirror://gentoo/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="sdl" + +DEPEND="sdl? ( media-libs/libsdl )" + +S=${WORKDIR}/utils + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/joystick-MCS-defines.patch + epatch "${FILESDIR}"/joystick-jstest-segv.patch +} + +src_compile() { + local SDL + use sdl && SDL=1 || SDL=0 + emake SDL=${SDL} || die +} + +src_install() { + dobin $(find . -type f -a -perm +1) || die "dobin" + dodoc README +} |