Package: brandy
Version: 1.20~pre5-2
Severity: normal
Hi,
Brandy currently fails to build on Debian GNU/Hurd because the platform
is not supported. Here is a patch to make it build.
Thank you,
Barry deFreese
diff -urN repo/brandy-1.20~pre5/src/keyboard.c ./brandy-1.20~pre5/src/keyboard.c
--- repo/brandy-1.20~pre5/src/keyboard.c 2007-12-26 10:01:29.830000000
-0500
+++ ./brandy-1.20~pre5/src/keyboard.c 2009-06-08 16:01:11.920000000 -0400
@@ -162,7 +162,7 @@
#if defined(TARGET_LINUX) | defined(TARGET_NETBSD) | defined(TARGET_MACOSX)\
| defined(TARGET_DJGPP) | defined(TARGET_FREEBSD) | defined(TARGET_OPENBSD)\
| defined(TARGET_AMIGA) & defined(__GNUC__)\
- | defined(TARGET_GNUKFREEBSD)
+ | defined(TARGET_GNUKFREEBSD) | defined(TARGET_GNU)
#include <sys/time.h>
#include <sys/types.h>
#include <errno.h>
@@ -286,6 +286,8 @@
#define OSVERSION 0xF5
#elif defined(TARGET_GNUKFREEBSD)
#define OSVERSION 0xF4
+#elif defined(TARGET_GNU)
+#define OSVERSION 0xF3
#else
#error Target operating system is either not defined or not supported
#endif
@@ -333,7 +335,7 @@
#if defined(TARGET_LINUX) | defined(TARGET_NETBSD) | defined(TARGET_MACOSX)\
| defined(TARGET_FREEBSD) |defined(TARGET_OPENBSD) | defined(TARGET_AMIGA) &
defined(__GNUC__)\
- | defined(TARGET_GNUKFREEBSD)
+ | defined(TARGET_GNUKFREEBSD) | defined(TARGET_GNU)
static struct termios origtty; /* Copy of original keyboard parameters */
static int32 keyboard; /* File descriptor for keyboard */
@@ -410,7 +412,7 @@
#if defined(TARGET_LINUX) | defined(TARGET_NETBSD) | defined(TARGET_MACOSX)\
| defined(TARGET_FREEBSD) | defined(TARGET_OPENBSD) | defined(TARGET_AMIGA) &
defined(__GNUC__)\
- | defined(TARGET_GNUKFREEBSD)
+ | defined(TARGET_GNUKFREEBSD) | defined(TARGET_GNU)
/* ----- Linux-, *BSD- and MACOS-specific keyboard input functions ----- */
@@ -1502,7 +1504,7 @@
#elif defined(TARGET_LINUX) | defined(TARGET_NETBSD) | defined(TARGET_MACOSX)\
| defined(TARGET_FREEBSD) | defined(TARGET_OPENBSD) | defined(TARGET_AMIGA) &
defined(__GNUC__)\
- | defined(TARGET_GNUKFREEBSD)
+ | defined(TARGET_GNUKFREEBSD) | defined(TARGET_GNU)
/*
** 'init_keyboard' initialises the keyboard code. It checks to
diff -urN repo/brandy-1.20~pre5/src/target.h ./brandy-1.20~pre5/src/target.h
--- repo/brandy-1.20~pre5/src/target.h 2007-12-26 07:35:26.940000000 -0500
+++ ./brandy-1.20~pre5/src/target.h 2009-06-08 16:07:12.830000000 -0400
@@ -89,6 +89,12 @@
#define BRANDY_OS "GNU/kFreeBSD"
#endif
+#if (defined __GNU__)
+#define TARGET_GNU
+#define USE_SDL
+#define BRANDY_OS "GNU/Hurd"
+#endif
+
#ifdef DJGPP
#define TARGET_DJGPP
#define BRANDY_OS "DJGPP"
@@ -163,7 +169,7 @@
#define EDITOR_VARIABLE "EDITOR"
#define DEFAULT_EDITOR "edit"
#elif defined(TARGET_LINUX) | defined(TARGET_NETBSD) | defined(TARGET_FREEBSD)\
- | defined(TARGET_OPENBSD) | defined(TARGET_GNUKFREEBSD)
+ | defined(TARGET_OPENBSD) | defined(TARGET_GNUKFREEBSD) | defined(TARGET_GNU)
#define EDITOR_VARIABLE "EDITOR"
#define DEFAULT_EDITOR "vi"
#elif defined(TARGET_MACOSX)
@@ -189,7 +195,7 @@
#define DIR_SEPS "\\/:"
#define DIR_SEP '\\'
#elif defined(TARGET_LINUX) | defined(TARGET_NETBSD) | defined(TARGET_MACOSX)\
- | defined(TARGET_FREEBSD) | defined(TARGET_OPENBSD) |
defined(TARGET_GNUKFREEBSD)
+ | defined(TARGET_FREEBSD) | defined(TARGET_OPENBSD) |
defined(TARGET_GNUKFREEBSD) | defined(TARGET_GNU)
#define DIR_SEPS "/"
#define DIR_SEP '/'
#elif defined(TARGET_RISCOS)
@@ -206,7 +212,7 @@
#define MACTYPE 0x600
#elif defined(TARGET_LINUX) | defined(TARGET_NETBSD) | defined(TARGET_MACOSX)\
| defined(TARGET_FREEBSD) | defined(TARGET_OPENBSD) | defined(TARGET_AMIGA)\
- | defined(TARGET_GNUKFREEBSD)
+ | defined(TARGET_GNUKFREEBSD) | defined(TARGET_GNU)
#define MACTYPE 0x800
#elif defined(TARGET_DJGPP) | defined(TARGET_WIN32) | defined(TARGET_BCC32)
#define MACTYPE 0x2000