Bug#413868: brandy: FTBFS on GNU/kFreeBSD: porting needed

2007-03-07 Thread Cyril Brulebois
Package: brandy
Severity: important
Tags: patch

Hi,

currently your package FTBFS on GNU/kFreeBSD, with the following error:
> gcc -Wall -O2 -g -I/usr/include/SDL src/variables.c -c -o
> src/variables.o
> In file included from src/variables.c:31:
> src/target.h:111:2: error: #error Target operating system for
> interpreter is either missing or not supported
> make[1]: *** [src/variables.o] Error 1
> make[1]: Leaving directory `/build/buildd/brandy-1.20~pre3'
> make: *** [build-stamp] Error 2

Full build logs are available at
.

Please find attached a patch to add support for GNU/kFreeBSD. Basically,
it uses exactly the same code/defines as other free platforms (e.g.
Linux, NetBSD, FreeBSD, etc.), but isn't really like Linux since there's
an undefined XCASE, so a proper TARGET_* is needed.

Cheers,

-- 
Cyril Brulebois
--- brandy-1.20~pre3/src/emulate.c	2007-03-07 18:31:47.681738000 +0100
+++ brandy-1.20~pre3/src/emulate.c	2007-03-07 18:32:07.0 +0100
@@ -937,7 +937,7 @@
 
 #elif defined(TARGET_NETBSD) | defined(TARGET_LINUX) | defined(TARGET_MACOSX)\
  | defined(TARGET_UNIX) | defined(TARGET_FREEBSD) | defined(TARGET_OPENBSD)\
- | defined(TARGET_AMIGA)
+ | defined(TARGET_AMIGA) | defined(TARGET_GNUKFREEBSD)
 /*
 ** emulate_oscli issued the operating system command 'command'.
 ** 'respfile' is set to NIL if the command output is to displayed
--- brandy-1.20~pre3/src/errors.c	2007-03-07 18:31:47.756616000 +0100
+++ brandy-1.20~pre3/src/errors.c	2007-03-07 18:32:44.0 +0100
@@ -103,7 +103,7 @@
 (void) signal(SIGSEGV, handle_signal);
 error(ERR_ADDRESS);
 #if defined(TARGET_LINUX) | defined(TARGET_NETBSD) | defined(TARGET_MACOSX)\
- | defined(TARGET_FREEBSD) |defined(TARGET_OPENBSD)
+ | defined(TARGET_FREEBSD) |defined(TARGET_OPENBSD) | defined(TARGET_GNUKFREEBSD)
   case SIGCONT:
 (void) signal(SIGCONT, handle_signal);
 init_keyboard();
@@ -126,7 +126,7 @@
 (void) signal(SIGSEGV, handle_signal);
 (void) signal(SIGINT, handle_signal);
 #if defined(TARGET_LINUX) | defined(TARGET_NETBSD) | defined(TARGET_MACOSX)\
- | defined(TARGET_FREEBSD) |defined(TARGET_OPENBSD)
+ | defined(TARGET_FREEBSD) |defined(TARGET_OPENBSD) | defined(TARGET_GNUKFREEBSD)
 (void) signal(SIGCONT, handle_signal);
 #endif
 #ifdef TARGET_DJGPP
@@ -146,7 +146,7 @@
 (void) signal(SIGSEGV, SIG_DFL);
 (void) signal(SIGINT, SIG_DFL);
 #if defined(TARGET_LINUX) | defined(TARGET_NETBSD) | defined(TARGET_MACOSX)\
- | defined(TARGET_FREEBSD) |defined(TARGET_OPENBSD)
+ | defined(TARGET_FREEBSD) |defined(TARGET_OPENBSD) | defined(TARGET_GNUKFREEBSD)
 (void) signal(SIGCONT, SIG_DFL);
 #endif
 #ifdef TARGET_DJGPP
--- brandy-1.20~pre3/src/keyboard.c	2007-03-07 18:17:18.937376000 +0100
+++ brandy-1.20~pre3/src/keyboard.c	2007-03-07 18:33:15.0 +0100
@@ -160,7 +160,8 @@
 
 #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_AMIGA) & defined(__GNUC__)\
+ | defined(TARGET_GNUKFREEBSD)
 #include 
 #include 
 #include 
@@ -282,6 +283,8 @@
 #define OSVERSION 0xF6
 #elif defined(TARGET_AMIGA)
 #define OSVERSION 0xF5
+#elif defined(TARGET_GNUKFREEBSD)
+#define OSVERSION 0xF4
 #else
 #error Target operating system is either not defined or not supported
 #endif
@@ -328,7 +331,8 @@
 static int fn_string_count;	/* Count of characters left in function key string */ 
 
 #if defined(TARGET_LINUX) | defined(TARGET_NETBSD) | defined(TARGET_MACOSX)\
- | defined(TARGET_FREEBSD) |defined(TARGET_OPENBSD) | defined(TARGET_AMIGA) & defined(__GNUC__)
+ | defined(TARGET_FREEBSD) |defined(TARGET_OPENBSD) | defined(TARGET_AMIGA) & defined(__GNUC__)\
+ | defined(TARGET_GNUKFREEBSD)
 
 static struct termios origtty;	/* Copy of original keyboard parameters */
 static int32 keyboard;		/* File descriptor for keyboard */
@@ -404,7 +408,8 @@
 }
 
 #if defined(TARGET_LINUX) | defined(TARGET_NETBSD) | defined(TARGET_MACOSX)\
- | defined(TARGET_FREEBSD) | defined(TARGET_OPENBSD) | defined(TARGET_AMIGA) & defined(__GNUC__)
+ | defined(TARGET_FREEBSD) | defined(TARGET_OPENBSD) | defined(TARGET_AMIGA) & defined(__GNUC__)\
+ | defined(TARGET_GNUKFREEBSD)
 
 /* - Linux-, *BSD- and MACOS-specific keyboard input functions - */
 
@@ -1457,7 +1462,8 @@
 }
 
 #elif defined(TARGET_LINUX) | defined(TARGET_NETBSD) | defined(TARGET_MACOSX)\
- | defined(TARGET_FREEBSD) | defined(TARGET_OPENBSD) | defined(TARGET_AMIGA) & defined(__GNUC__)
+ | defined(TARGET_FREEBSD) | defined(TARGET_OPENBSD) | defined(TARGET_AMIGA) & defined(__GNUC__)\
+ | defined(TARGET_GNUKFREEBSD)
 
 /*
 ** 'init_keyboard' initialises the keyboard code. It checks to
--- brandy-1.20~pre3/src/target.h	2007-03-07 18:15:15.414357000 +0100
+++ brandy-1.20~pre3/src/target.h	2007-03-07 18:36:12.0 +0100
@@ -81,6 +81,14 @@
 #define BRAN

Bug#413868: brandy: FTBFS on GNU/kFreeBSD: porting needed

2007-03-08 Thread Colin Tuckley
Cyril Brulebois wrote:
> Package: brandy
> Severity: important
> Tags: patch

Thanks for the patch, before I incorporate it I have a question;

There is already a target "TARGET_FREEBSD" is this significantly different
from "TARGET_GNUKFREEBSD"?

Should I have both targets or is one a replacement for the other?

regards,

Colin

-- 
Colin Tuckley  |  [EMAIL PROTECTED]  |  PGP/GnuPG Key Id
+44(0)1903 236872  |  +44(0)7799 143369  | 0x1B3045CE

APATHY ERROR: Don't bother striking any key.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#413868: brandy: FTBFS on GNU/kFreeBSD: porting needed

2007-03-08 Thread Cyril Brulebois
Colin Tuckley <[EMAIL PROTECTED]> (08/03/2007):
> There is already a target "TARGET_FREEBSD" is this significantly
> different from "TARGET_GNUKFREEBSD"?
> 
> Should I have both targets or is one a replacement for the other?

Hmmm, at the moment, much of the code is placed in "Linux | FreeBSD |
NetBSD | ..." #if's, so we could eventually merge them together. But
GNU/kFreeBSD shouldn't (I mean: on the long term) be merged with FreeBSD
since it is quite different, since it is the GNU userspace (e.g. glibc)
on a FreeBSD kernel, so we might want to be able to fetch some includes
from GNU and some includes from the FreeBSD kernel.

Cheers,

-- 
Cyril Brulebois


pgpPnqftpLQNA.pgp
Description: PGP signature


Bug#413868: brandy: FTBFS on GNU/kFreeBSD: porting needed

2007-03-08 Thread Colin Tuckley
Cyril Brulebois wrote:

> Hmmm, at the moment, much of the code is placed in "Linux | FreeBSD |
> NetBSD | ..." #if's, so we could eventually merge them together. But
> GNU/kFreeBSD shouldn't (I mean: on the long term) be merged with FreeBSD
> since it is quite different, since it is the GNU userspace (e.g. glibc)
> on a FreeBSD kernel, so we might want to be able to fetch some includes
> from GNU and some includes from the FreeBSD kernel.

OK, separate seems sensible at least for now.

Colin

-- 
Colin Tuckley  |  [EMAIL PROTECTED]  |  PGP/GnuPG Key Id
+44(0)1903 236872  |  +44(0)7799 143369  | 0x1B3045CE

"Would you tell me, please, which way I ought to go from here?" "That
depends a good deal on where you want to get to," said the Cat - Lewis Carrol


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#413868: brandy: FTBFS on GNU/kFreeBSD: porting needed

2007-03-09 Thread Colin Tuckley
Tags: pending

Patch committed to cvs.


-- 
Colin Tuckley  |  [EMAIL PROTECTED]  |  PGP/GnuPG Key Id
+44(0)1903 236872  |  +44(0)7799 143369  | 0x1B3045CE

Those who dream by day are cognisant of many things that escape those who
dream only by night. - E. A. Poe.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]