Bug#679330: ioquake3: Add support for GNU/Hurd
Source: ioquake3
Version: 1.36+svn2287
Severity: normal
Tags: patch
User: debian-hurd@lists.debian.org
Usertags: hurd
Hello, ioquake3 FTBFS for GNU/Hurd due to a lack of support for this OS:
#error "Operating system not supported", see
https://buildd.debian.org/status/fetch.php?pkg=ioquake3&arch=hurd-i386&ver=1.36%2Bsvn1946-5&stamp=1312459705
The attached patch adds support for the GNU/Hurd architecture by
changing the debian/control, Makefile and code/qcommon/q_platform.h
files. Please apply it whenever convenient for you.
Thanks!
--- a/debian/control 2012-06-23 01:06:28.000000000 +0200
+++ b/debian/control 2012-06-26 14:26:11.000000000 +0200
@@ -19,7 +19,7 @@
Homepage: http://www.ioquake3.org/
Package: ioquake3
-Architecture: linux-any kfreebsd-any
+Architecture: linux-any kfreebsd-any hurd-any
Depends: ${misc:Depends}, ${shlibs:Depends}
Recommends: x11-utils | zenity | kdebase-bin
Breaks: openarena (<< 0.8.5-10~)
@@ -32,7 +32,7 @@
openarena or another suitable set of game data.
Package: ioquake3-server
-Architecture: linux-any kfreebsd-any
+Architecture: linux-any kfreebsd-any hurd-any
Depends: ${misc:Depends}, ${shlibs:Depends}
Description: Standalone server for ioQuake3 based games
This package installs a modified version of the ioQuake3 dedicated server,
@@ -43,7 +43,7 @@
openarena-server or another suitable set of server data.
Package: ioquake3-dbg
-Architecture: linux-any kfreebsd-any
+Architecture: linux-any kfreebsd-any hurd-any
Section: debug
Priority: extra
Depends: ioquake3 (= ${binary:Version}) | ioquake3-server (= ${binary:Version}),
--- a/Makefile 2012-06-26 13:33:50.000000000 +0200
+++ b/Makefile 2012-06-26 14:13:29.000000000 +0200
@@ -26,6 +26,10 @@
endif
endif
+ifeq ($(COMPILE_PLATFORM),gnu)
+ COMPILE_ARCH=x86
+endif
+
ifndef BUILD_STANDALONE
BUILD_STANDALONE =
endif
@@ -291,7 +295,7 @@
INSTALL=install
MKDIR=mkdir
-ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu"))
+ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu"))
ifeq ($(ARCH),axp)
ARCH=alpha
--- a/code/qcommon/q_platform.h 2011-10-22 00:48:53.000000000 +0200
+++ b/code/qcommon//q_platform.h 2012-06-26 14:34:25.000000000 +0200
@@ -169,14 +169,16 @@
//================================================================= LINUX ===
-#if defined(__linux__) || defined(__FreeBSD_kernel__)
+#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__GNU__)
#include <endian.h>
#if defined(__linux__)
#define OS_STRING "linux"
-#else
+#elif defined(__FreeBSD_kernel__)
#define OS_STRING "kFreeBSD"
+#else
+#define OS_STRING "GNU"
#endif
#ifdef __clang__
Reply to: