Package: xgalaga
Version: 2.0.34-42
Severity: important
Tags: patch

Hi,

currently your package FTBFS on GNU/kFreeBSD with the following error:
> UNAME_MACHINE = i686
> UNAME_RELEASE = 6.2-1-686
> UNAME_SYSTEM  = GNU/kFreeBSD
> UNAME_VERSION = #0 Mon Jan 15 10:21:36 CET 2007
> configure: error: can not guess host type; you must specify one
> make: *** [build-stamp] Error 1

Full build logs are available at
<http://experimental.ftbfs.de/build.php?arch=kfreebsd-i386&pkg=xgalaga>.

To solve this, it is sufficient to copy config.{guess,sub} from /usr/share/misc
(autotools-dev package) to your top-level directory. You could also think of
auto-updating them in your clean rules, as documented in autotools-dev's
README.Debian.

Besides that, some other files need to be patched. Since the use of
js_device is unconditional, I'd say that setting to 0 when linux isn't
detected should be safe. About configure*, is it just about treating
GNU/kFreeBSD as Linux. The fix for xgal.sndsrv.linux.c is suboptimal,
but I wanted to provide you with an absolute-low-risk patch.  The right
fix would be to turn "linux/soundcard.h" into "sys/soundcard.h", which
is needed for portability, and safe since on Linux, sys/soundcard.h only
#includes linux/soundcard.h, so...

Cheers,

-- 
Cyril Brulebois
--- xgalaga-2.0.34/configure.in	2007-03-21 07:31:47.000000000 +0100
+++ xgalaga-2.0.34/configure.in	2007-03-21 07:31:48.000000000 +0100
@@ -35,7 +35,7 @@
 
 if test -n "$sound-type"; then
   case $host_alias in
-    *linux*) 
+    *linux* | *k*bsd*)
 	sound_type=native
 	;;
     *freebsd*)
@@ -56,7 +56,7 @@
 case $sound_type in
   native)
     case $host_alias in
-      *linux*)
+      *linux* | *k*bsd*)
         SOUNDSERVER=xgal.sndsrv.linux
 	AC_DEFINE(SOUNDDEV,"/dev/dsp")
 	AC_DEFINE(SOUND)
--- xgalaga-2.0.34/linux-joystick.c	2007-03-21 07:31:47.000000000 +0100
+++ xgalaga-2.0.34/linux-joystick.c	2007-03-21 07:31:48.000000000 +0100
@@ -80,4 +80,6 @@
       *x=plx;
   }
 }
+#else
+js_device=0;
 #endif /* __linux__ */
--- xgalaga-2.0.34/xgal.sndsrv.linux.c	2007-03-21 07:31:59.718719000 +0100
+++ xgalaga-2.0.34/xgal.sndsrv.linux.c	2007-03-21 07:32:19.000000000 +0100
@@ -16,7 +16,11 @@
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/ioctl.h>
+#if !defined(__FreeBSD_kernel__)
 #include <linux/soundcard.h>
+#else
+#include <sys/soundcard.h>
+#endif
 /*#include "linux_pcsp.h"       /usr/include/linux/pcsp.h      */
 #include <sys/time.h>
 #include <signal.h>
--- xgalaga-2.0.34/configure	2007-03-21 07:32:44.745915000 +0100
+++ xgalaga-2.0.34/configure	2007-03-21 07:33:04.000000000 +0100
@@ -1888,7 +1888,7 @@
 
 if test -n "$sound-type"; then
   case $host_alias in
-    *linux*) 
+    *linux* | *k*bsd*)
 	sound_type=native
 	;;
     *freebsd*)
@@ -1909,7 +1909,7 @@
 case $sound_type in
   native)
     case $host_alias in
-      *linux*)
+      *linux* | *k*bsd*)
         SOUNDSERVER=xgal.sndsrv.linux
 	cat >> confdefs.h <<\EOF
 #define SOUNDDEV "/dev/dsp"

Reply via email to