Package: openarena
Severity: important

Hi Bruno,

(I'm bugreporting so that other porters can find out easily whether
FTBFS have been reported.)

Please find attached a patch to add GNU/kFreeBSD support to openarena.
Please beware of the change in debian/rules, it might be tricky and
cause breakage on Linux platforms (untested on my side), although I
believe that it shouldn't harm (the Q3OS thingy is taken from the main
Makefile, at the very beginning). The build runs OK, but I'm still
unable to test it properly, lacking DRI.

Cheers,

-- 
Cyril Brulebois
--- openarena-0.6.0/Makefile    2007-03-06 05:39:42.687605000 +0100
+++ openarena-0.6.0/Makefile    2007-03-06 05:50:26.000000000 +0100
@@ -11,7 +11,7 @@
 # GNU Make required
 #
 
-COMPILE_PLATFORM=$(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]')
+COMPILE_PLATFORM=$(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]'|sed 
-e 's/\//_/g')
 
 ifeq ($(COMPILE_PLATFORM),darwin)
   # Apple does some things a little differently...
@@ -171,7 +171,7 @@
 INSTALL=install
 MKDIR=mkdir
 
-ifeq ($(PLATFORM),linux)
+ifneq (,findstring($(PLATFORM),linux gnu_kfreebsd))
 
   CC=gcc
 
--- openarena-0.6.0/code/qcommon/q_platform.h   2007-03-06 05:43:00.830773000 
+0100
+++ openarena-0.6.0/code/qcommon/q_platform.h   2007-03-06 05:44:32.000000000 
+0100
@@ -120,7 +120,8 @@
 
 //================================================================= LINUX ===
 
-#ifdef __linux__
+/* GNU/kFreeBSD and GNU/Linux shares the same userland */
+#if defined(__linux__) || defined(__FreeBSD_kernel__)
 
 #define OS_STRING "linux"
 #define ID_INLINE inline
--- openarena-0.6.0/code/renderer/qgl.h 2007-03-06 05:54:17.753547000 +0100
+++ openarena-0.6.0/code/renderer/qgl.h 2007-03-06 06:02:30.000000000 +0100
@@ -63,7 +63,7 @@
 #include <OpenGL/CGLMacro.h>
 #endif
 
-#elif defined( __linux__ ) || defined(__FreeBSD__)
+#elif defined( __linux__ ) || defined(__FreeBSD__) || 
defined(__FreeBSD_kernel__)
 
 #include <GL/gl.h>
 #include <GL/glx.h>
@@ -191,7 +191,7 @@
 //===========================================================================
 
 // non-dlopening systems will just redefine qgl* to gl*
-#if !defined( _WIN32 ) && !defined(MACOS_X) && !defined( __linux__ ) && 
!defined( __FreeBSD__ ) && !defined(__sun) // rb010123
+#if !defined( _WIN32 ) && !defined(MACOS_X) && !defined( __linux__ ) && 
!defined( __FreeBSD__ ) && !defined( __FreeBSD_kernel__ ) && !defined(__sun) // 
rb010123
 
 #include "qgl_linked.h"
 
@@ -578,7 +578,7 @@
 
 #endif // _WIN32
 
-#if ( (defined __linux__ )  || (defined __FreeBSD__ ) || (defined __sun) ) // 
rb010123
+#if ( (defined __linux__ )  || (defined __FreeBSD__ ) || (defined 
__FreeBSD_kernel__) || (defined __sun) ) // rb010123
 
 //FX Mesa Functions
 // bk001129 - from cvs1.17 (mkv)
--- openarena-0.6.0/code/unix/unix_glw.h        2007-03-06 05:58:08.828921000 
+0100
+++ openarena-0.6.0/code/unix/unix_glw.h        2007-03-06 05:58:32.000000000 
+0100
@@ -19,7 +19,7 @@
 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 ===========================================================================
 */
-#if !( defined __linux__ || defined __FreeBSD__ || defined __sun || defined 
MACOS_X )
+#if !( defined __linux__ || defined __FreeBSD__ || defined __FreeBSD_kernel__ 
|| defined __sun || defined MACOS_X )
 #error You should include this file only on Linux/FreeBSD/Solaris platforms
 #endif
 
--- openarena-0.6.0/debian/rules        2007-03-06 06:10:41.634691000 +0100
+++ openarena-0.6.0/debian/rules        2007-03-06 06:11:54.000000000 +0100
@@ -4,6 +4,7 @@
 include /usr/share/dpatch/dpatch.make
 
 # copied from ioq3 make scripts
+Q3OS=$(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]'|sed -e 's/\//_/g')
 Q3ARCH=$(shell uname -m | sed -e s/i.86/i386/)
 
 build: build-stamp
@@ -26,11 +27,11 @@
        dh_testroot
        dh_clean -k
        mkdir -p debian/tmp
-       cp build/release-linux-$(Q3ARCH)/ioquake3.$(Q3ARCH) 
debian/tmp/openarena.bin
+       cp build/release-$(Q3OS)-$(Q3ARCH)/ioquake3.$(Q3ARCH) 
debian/tmp/openarena.bin
        dh_install -popenarena debian/tmp/openarena.bin usr/lib/games/openarena
        dh_install -popenarena debian/scripts/openarena usr/games
        dh_install -popenarena debian/openarena.desktop usr/share/applications
-       cp build/release-linux-$(Q3ARCH)/ioq3ded.$(Q3ARCH) 
debian/tmp/openarena-server.bin
+       cp build/release-$(Q3OS)-$(Q3ARCH)/ioq3ded.$(Q3ARCH) 
debian/tmp/openarena-server.bin
        dh_install -popenarena-server debian/tmp/openarena-server.bin 
usr/lib/games/openarena
        dh_install -popenarena-server debian/scripts/openarena-server usr/games
        uudecode -o openarena128.png debian/oa128.png.uu
_______________________________________________
Pkg-games-devel mailing list
Pkg-games-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-games-devel

Reply via email to