Bug#638387: kxl: FTBFS on !linux-any
Samuel Thibault
sthibault at debian.org
Thu Aug 18 23:09:52 UTC 2011
Package: kxl
Version: 1.1.7-14
Severity: important
Tags: patch
User: debian-hurd at lists.debian.org
Usertags: hurd
Hello,
kxl currently FTBFS on !linux-any archs. Here are two patches to fix
that:
- patch-kxl drops the linux-kernel-headers dependency, which is already
provided by libc6-dev.
- patch-kxl2 makes use of sys/soundcard.h instead of linux/soundcard.h,
since the former works on all of linux, freebsd and hurd. It also
enables joystick support on Linux only.
Samuel
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.0.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
-------------- next part --------------
--- debian/control.orig 2011-08-18 23:03:59.000000000 +0000
+++ debian/control 2011-08-18 23:04:02.000000000 +0000
@@ -3,7 +3,7 @@
Priority: optional
Maintainer: Debian Games Team <pkg-games-devel at lists.alioth.debian.org>
Uploaders: Sam Hocevar (Debian packages) <sam+deb at zoy.org>, Barry deFreese <bdefreese at debian.org>
-Build-Depends: debhelper (>= 5.0), autotools-dev, quilt, libx11-dev, linux-kernel-headers
+Build-Depends: debhelper (>= 5.0), autotools-dev, quilt, libx11-dev
Standards-Version: 3.7.2
Homepage: http://kxl.orz.hm/
Vcs-Svn: svn://svn.debian.org/svn/pkg-games/packages/trunk/kxl/
-------------- next part --------------
--- ./src/KXLsound.c.orig 2011-08-19 00:57:45.000000000 +0000
+++ ./src/KXLsound.c 2011-08-19 00:57:47.000000000 +0000
@@ -6,7 +6,7 @@
#include <string.h>
#include <sys/ioctl.h>
#include <sys/time.h>
-#include <linux/soundcard.h>
+#include <sys/soundcard.h>
#include "KXL.h"
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
--- src/KXL.h.orig 2011-08-19 00:58:51.000000000 +0000
+++ src/KXL.h 2011-08-19 00:58:52.000000000 +0000
@@ -6,7 +6,9 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/XKBlib.h>
+#ifdef __linux__
#include <linux/joystick.h>
+#endif
//================================================================
--- src/KXLjoystick.c.orig 2011-08-19 00:59:41.000000000 +0000
+++ src/KXLjoystick.c 2011-08-19 01:00:00.000000000 +0000
@@ -16,6 +16,7 @@
Uint8 axis = 2;
Uint8 buttons = 2;
+#ifdef __linux__
KXL_joydev = open(devname, O_RDONLY);
if (KXL_joydev < 0) {
fprintf(stderr, "KXL error message\nCannot open \"%s\".\n", devname);
@@ -29,6 +30,9 @@
fprintf(stderr, "KXL message\nJoystick (%s) has %d axes and %d buttons.\nDriver version is %d.%d.%d.\n",
name, axis, buttons, version >> 16, (version >> 8) & 0xff, version & 0xff);
return True;
+#else
+ return False;
+#endif
}
//==============================================================
@@ -46,11 +50,13 @@
// return value : True - ok, False - NG
//==============================================================
Bool KXL_ReadJoystick(KXL_Joystick *my) {
+#ifdef __linux__
if (KXL_joydev >= 0) {
if (read(KXL_joydev, my, JS_RETURN) == JS_RETURN) {
return True;
}
}
fprintf(stderr, "KXL error message\njoystick reading error\n");
+#endif
return False;
}
More information about the Pkg-games-devel
mailing list