[openarena] 01/01: Redo portability patches based on what went upstream to ioquake3

Simon McVittie smcv at debian.org
Sat Jun 24 20:22:53 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to branch debian/master
in repository openarena.

commit 9943b2305479b1e9612ba31d8c03c018ac6bd8cf
Author: Simon McVittie <smcv at debian.org>
Date:   Sat Jun 24 21:11:48 2017 +0100

    Redo portability patches based on what went upstream to ioquake3
    
    - d/p/Treat-GNU-kFreeBSD-and-GNU-Hurd-as-equivalent-to-GNU-Linu.patch:
      Treat all GNU platforms as essentially the same for our purposes.
      This combines what used to be d/p/Fix-FTBFS-on-kFreeBSD.patch and
      d/p/Add-support-for-the-GNU-Hurd-architecture.patch.
    
    - d/p/Makefile-confine-LIB-to-the-one-platform-that-needs-it-na.patch,
      d/p/build-canonicalize-all-ARM-variants-to-arm-matching-q_pla.patch,
      d/p/build-define-ARCH_STRING-in-Makefile-on-Linux-and-other-G.patch:
      Treat all CPU architectures on GNU platforms as at least potentially
      supported, without having any specific code for the majority of
      architectures. (ioquake3 PR #129, as released to Debian in
      ioquake3/1.36+u20150926+dfsg1-1)
      + In particular this means we will attempt to build on m68k
        (Closes: #865721)
---
 debian/changelog                                   |  19 ++++
 ...NA_081_COMPATIBLE-define-for-network-comp.patch |   4 +-
 debian/patches/Add-support-for-Aarch64-ARM64.patch |  41 --------
 ...Add-support-for-the-GNU-Hurd-architecture.patch |  32 ------
 debian/patches/Fix-FTBFS-on-kFreeBSD.patch         |  26 -----
 ...-LIB-to-the-one-platform-that-needs-it-na.patch |  55 +++++++++++
 ...m-SOURCE_DATE_EPOCH-for-reproducible-buil.patch |   4 +-
 ...SD-and-GNU-Hurd-as-equivalent-to-GNU-Linu.patch |  69 +++++++++++++
 debian/patches/Use-LDFLAGS-on-non-Linux-too.patch  |   4 +-
 ...acro-for-the-game-code-version-so-package.patch |   2 +-
 ...ze-all-ARM-variants-to-arm-matching-q_pla.patch |  39 ++++++++
 ...H_STRING-in-Makefile-on-Linux-and-other-G.patch | 109 +++++++++++++++++++++
 debian/patches/series                              |   7 +-
 13 files changed, 302 insertions(+), 109 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 319dcab..0c229ea 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,22 @@
+openarena (0.8.8-19) UNRELEASED; urgency=medium
+
+  * Redo portability patches based on what went upstream to ioquake3
+    - d/p/Treat-GNU-kFreeBSD-and-GNU-Hurd-as-equivalent-to-GNU-Linu.patch:
+      Treat all GNU platforms as essentially the same for our purposes.
+      This combines what used to be d/p/Fix-FTBFS-on-kFreeBSD.patch and
+      d/p/Add-support-for-the-GNU-Hurd-architecture.patch.
+    - d/p/Makefile-confine-LIB-to-the-one-platform-that-needs-it-na.patch,
+      d/p/build-canonicalize-all-ARM-variants-to-arm-matching-q_pla.patch,
+      d/p/build-define-ARCH_STRING-in-Makefile-on-Linux-and-other-G.patch:
+      Treat all CPU architectures on GNU platforms as at least potentially
+      supported, without having any specific code for the majority of
+      architectures. (ioquake3 PR #129, as released to Debian in
+      ioquake3/1.36+u20150926+dfsg1-1)
+      + In particular this means we will attempt to build on m68k
+        (Closes: #865721)
+
+ -- Simon McVittie <smcv at debian.org>  Sat, 24 Jun 2017 19:18:46 +0100
+
 openarena (0.8.8-18) unstable; urgency=medium
 
   * Don't install a documentation symlink for LINUXNOTES.gz.
diff --git a/debian/patches/Add-OPENARENA_081_COMPATIBLE-define-for-network-comp.patch b/debian/patches/Add-OPENARENA_081_COMPATIBLE-define-for-network-comp.patch
index 6faede8..5708652 100644
--- a/debian/patches/Add-OPENARENA_081_COMPATIBLE-define-for-network-comp.patch
+++ b/debian/patches/Add-OPENARENA_081_COMPATIBLE-define-for-network-comp.patch
@@ -27,10 +27,10 @@ Forwarded: no
  9 files changed, 55 insertions(+), 9 deletions(-)
 
 diff --git a/Makefile b/Makefile
-index e9e212f..3b2bfdb 100644
+index cec64e7..8a4f04a 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -852,6 +852,10 @@ endif
+@@ -842,6 +842,10 @@ endif
  
  BASE_CFLAGS += -DPRODUCT_VERSION=\\\"$(VERSION)\\\"
  
diff --git a/debian/patches/Add-support-for-Aarch64-ARM64.patch b/debian/patches/Add-support-for-Aarch64-ARM64.patch
deleted file mode 100644
index ec195c2..0000000
--- a/debian/patches/Add-support-for-Aarch64-ARM64.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From: Martin Michlmayr <tbm at cyrius.com>
-Date: Tue, 30 Jun 2015 14:22:49 -0400
-Subject: Add support for Aarch64 (ARM64)
-
-Add support for Aarch64, the 64-bit ARM architecture.
-
-Bug-Debian: https://bugs.debian.org/790668
-Applied-upstream: (in ioquake3) https://github.com/ioquake/ioq3/commit/ebb69f699cd1392cbe7a865f9f51dbbecdd99b59
----
- Makefile                  | 4 ++++
- code/qcommon/q_platform.h | 2 ++
- 2 files changed, 6 insertions(+)
-
-diff --git a/Makefile b/Makefile
-index 9732cc6..d36feaf 100644
---- a/Makefile
-+++ b/Makefile
-@@ -227,6 +227,10 @@ ifeq ($(PLATFORM),linux)
-   else
-   ifeq ($(ARCH),s390x)
-     LIB=lib64
-+  else
-+  ifeq ($(ARCH),aarch64)
-+    LIB=lib64
-+  endif
-   endif
-   endif
-   endif
-diff --git a/code/qcommon/q_platform.h b/code/qcommon/q_platform.h
-index 0ce4c29..ed3bfbb 100644
---- a/code/qcommon/q_platform.h
-+++ b/code/qcommon/q_platform.h
-@@ -175,6 +175,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- #define ARCH_STRING "sparc"
- #elif defined __arm__
- #define ARCH_STRING "arm"
-+#elif defined __aarch64__
-+#define ARCH_STRING "aarch64"
- #elif defined __cris__
- #define ARCH_STRING "cris"
- #elif defined __hppa__
diff --git a/debian/patches/Add-support-for-the-GNU-Hurd-architecture.patch b/debian/patches/Add-support-for-the-GNU-Hurd-architecture.patch
deleted file mode 100644
index 156e39c..0000000
--- a/debian/patches/Add-support-for-the-GNU-Hurd-architecture.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From: Svante Signell <svante.signell at telia.com>
-Date: Thu, 28 Jun 2012 00:10:18 +0200
-Subject: Add support for the GNU/Hurd architecture
-
-Origin: vendor, Debian
-Bug-Debian: http://bugs.debian.org/679330
----
- code/qcommon/q_platform.h | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/code/qcommon/q_platform.h b/code/qcommon/q_platform.h
-index 15616dd..0ce4c29 100644
---- a/code/qcommon/q_platform.h
-+++ b/code/qcommon/q_platform.h
-@@ -147,7 +147,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- 
- //================================================================= LINUX ===
- 
--#if defined(__linux__) || defined(__FreeBSD_kernel__)
-+#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__GNU__)
- 
- #include <endian.h>
- 
-@@ -210,6 +210,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- #define OS_STRING "freebsd"
- #elif defined(__OpenBSD__)
- #define OS_STRING "openbsd"
-+#elif defined(__GNU__)
-+#define OS_STRING "GNU"
- #elif defined(__NetBSD__)
- #define OS_STRING "netbsd"
- #endif
diff --git a/debian/patches/Fix-FTBFS-on-kFreeBSD.patch b/debian/patches/Fix-FTBFS-on-kFreeBSD.patch
deleted file mode 100644
index 8d8b749..0000000
--- a/debian/patches/Fix-FTBFS-on-kFreeBSD.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From: Cyril Brulebois <cyril.brulebois at enst-bretagne.fr>
-Date: Sun, 18 Jul 2010 00:00:40 +0100
-Subject: Fix FTBFS on kFreeBSD
-
-[It's close enough to Linux for our purposes that we'll just pretend
-it's Linux. -smcv]
-
-Origin: vendor
-Bug-Debian: http://bugs.debian.org/413617
----
- code/qcommon/q_platform.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/code/qcommon/q_platform.h b/code/qcommon/q_platform.h
-index 6490ddb..15616dd 100644
---- a/code/qcommon/q_platform.h
-+++ b/code/qcommon/q_platform.h
-@@ -147,7 +147,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- 
- //================================================================= LINUX ===
- 
--#ifdef __linux__
-+#if defined(__linux__) || defined(__FreeBSD_kernel__)
- 
- #include <endian.h>
- 
diff --git a/debian/patches/Makefile-confine-LIB-to-the-one-platform-that-needs-it-na.patch b/debian/patches/Makefile-confine-LIB-to-the-one-platform-that-needs-it-na.patch
new file mode 100644
index 0000000..76d3e1a
--- /dev/null
+++ b/debian/patches/Makefile-confine-LIB-to-the-one-platform-that-needs-it-na.patch
@@ -0,0 +1,55 @@
+From: Simon McVittie <smcv at debian.org>
+Date: Sat, 24 Jun 2017 19:06:20 +0100
+Subject: Makefile: confine $(LIB) to the one platform that needs it,
+ namely irix64
+
+It isn't mentioned anywhere else, and deleting it from the Linux code
+path means we don't need to maintain an exhaustive list of 64-bit
+architectures.
+
+(cherry picked from ioquake3 commit 071965b3f0647385f3c32a49c1df5e125550969c)
+---
+ Makefile | 16 +---------------
+ 1 file changed, 1 insertion(+), 15 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 023d390..84b58b3 100644
+--- a/Makefile
++++ b/Makefile
+@@ -208,9 +208,6 @@ endif
+ # SETUP AND BUILD -- LINUX
+ #############################################################################
+ 
+-## Defaults
+-LIB=lib
+-
+ INSTALL=install
+ MKDIR=mkdir
+ 
+@@ -218,18 +215,6 @@ ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu")
+ 
+   ifeq ($(ARCH),alpha)
+     ARCH=axp
+-  else
+-  ifeq ($(ARCH),x86_64)
+-    LIB=lib64
+-  else
+-  ifeq ($(ARCH),ppc64)
+-    LIB=lib64
+-  else
+-  ifeq ($(ARCH),s390x)
+-    LIB=lib64
+-  endif
+-  endif
+-  endif
+   endif
+ 
+   BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
+@@ -669,6 +654,7 @@ else # ifeq netbsd
+ #############################################################################
+ 
+ ifeq ($(PLATFORM),irix64)
++  LIB=lib
+ 
+   ARCH=mips  #default to MIPS
+ 
diff --git a/debian/patches/Pick-up-date-from-SOURCE_DATE_EPOCH-for-reproducible-buil.patch b/debian/patches/Pick-up-date-from-SOURCE_DATE_EPOCH-for-reproducible-buil.patch
index 8945496..e013519 100644
--- a/debian/patches/Pick-up-date-from-SOURCE_DATE_EPOCH-for-reproducible-buil.patch
+++ b/debian/patches/Pick-up-date-from-SOURCE_DATE_EPOCH-for-reproducible-buil.patch
@@ -14,10 +14,10 @@ commit or from metadata like the debian/changelog in Debian packages.
  3 files changed, 11 insertions(+), 2 deletions(-)
 
 diff --git a/Makefile b/Makefile
-index d36feaf..13bbc2d 100644
+index fece468..c9ebbfc 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -854,6 +854,11 @@ else
+@@ -840,6 +840,11 @@ else
    DEPEND_CFLAGS =
  endif
  
diff --git a/debian/patches/Treat-GNU-kFreeBSD-and-GNU-Hurd-as-equivalent-to-GNU-Linu.patch b/debian/patches/Treat-GNU-kFreeBSD-and-GNU-Hurd-as-equivalent-to-GNU-Linu.patch
new file mode 100644
index 0000000..3d10797
--- /dev/null
+++ b/debian/patches/Treat-GNU-kFreeBSD-and-GNU-Hurd-as-equivalent-to-GNU-Linu.patch
@@ -0,0 +1,69 @@
+From: Simon McVittie <smcv at debian.org>
+Date: Sat, 24 Jun 2017 19:37:00 +0100
+Subject: Treat GNU/kFreeBSD and GNU/Hurd as equivalent to GNU/Linux
+
+The GNU family of operating systems use the GNU libc and runtime linker,
+which is the layer that this engine interacts with directly. The specific
+kernel used is below the level that this engine is dealing with.
+
+This is a combination of ioquake3 commits
+fd4cf3b7839ec36789627c27758478cca8f69ffe,
+58a8f5ef8bca62ea6bc4a4e0cfff65b5d28d36a0,
+d2f8b9f4bb3fda901ffd6f18074d035469832338,
+54aa7f25832cfa7a8ac7891a702758ccd88d1ba8 (partial) and
+540e4225cceacaf843a9d4741bfbb11ba19fdd7a, variously written by
+Cyril Brulebois, Thilo Schulz, devhc and Svante Signell.
+
+Bug-Debian: https://bugs.debian.org/413617
+Bug-Debian: https://bugs.debian.org/679330
+---
+ Makefile                  | 4 ++--
+ code/qcommon/q_platform.h | 9 ++++++++-
+ 2 files changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 91fb204..023d390 100644
+--- a/Makefile
++++ b/Makefile
+@@ -4,7 +4,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')
+ 
+ COMPILE_ARCH=$(shell uname -m | sed -e s/i.86/i386/)
+ 
+@@ -214,7 +214,7 @@ LIB=lib
+ INSTALL=install
+ MKDIR=mkdir
+ 
+-ifeq ($(PLATFORM),linux)
++ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu"))
+ 
+   ifeq ($(ARCH),alpha)
+     ARCH=axp
+diff --git a/code/qcommon/q_platform.h b/code/qcommon/q_platform.h
+index 6490ddb..cfa44b7 100644
+--- a/code/qcommon/q_platform.h
++++ b/code/qcommon/q_platform.h
+@@ -147,11 +147,18 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ 
+ //================================================================= LINUX ===
+ 
+-#ifdef __linux__
++#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__GNU__)
+ 
+ #include <endian.h>
+ 
++#if defined(__linux__)
+ #define OS_STRING "linux"
++#elif defined(__FreeBSD_kernel__)
++#define OS_STRING "kFreeBSD"
++#else
++#define OS_STRING "GNU"
++#endif
++
+ #define ID_INLINE inline
+ #define PATH_SEP '/'
+ 
diff --git a/debian/patches/Use-LDFLAGS-on-non-Linux-too.patch b/debian/patches/Use-LDFLAGS-on-non-Linux-too.patch
index 11cbb10..956b615 100644
--- a/debian/patches/Use-LDFLAGS-on-non-Linux-too.patch
+++ b/debian/patches/Use-LDFLAGS-on-non-Linux-too.patch
@@ -7,10 +7,10 @@ Subject: Use LDFLAGS on non-Linux too
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/Makefile b/Makefile
-index 3b2bfdb..9732cc6 100644
+index 8a4f04a..fece468 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -767,7 +767,7 @@ else # ifeq sunos
+@@ -757,7 +757,7 @@ else # ifeq sunos
  
    SHLIBEXT=so
    SHLIBCFLAGS=-fPIC
diff --git a/debian/patches/Use-a-cpp-macro-for-the-game-code-version-so-package.patch b/debian/patches/Use-a-cpp-macro-for-the-game-code-version-so-package.patch
index 8cb035d..aee735a 100644
--- a/debian/patches/Use-a-cpp-macro-for-the-game-code-version-so-package.patch
+++ b/debian/patches/Use-a-cpp-macro-for-the-game-code-version-so-package.patch
@@ -10,7 +10,7 @@ Also draw it at a variable location, so it's right-aligned.
  3 files changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/Makefile b/Makefile
-index 91fb204..e9e212f 100644
+index 6eeba4f..cec64e7 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -185,7 +185,7 @@ ifeq ($(SDL_CFLAGS),)
diff --git a/debian/patches/build-canonicalize-all-ARM-variants-to-arm-matching-q_pla.patch b/debian/patches/build-canonicalize-all-ARM-variants-to-arm-matching-q_pla.patch
new file mode 100644
index 0000000..c954b49
--- /dev/null
+++ b/debian/patches/build-canonicalize-all-ARM-variants-to-arm-matching-q_pla.patch
@@ -0,0 +1,39 @@
+From: Simon McVittie <smcv at debian.org>
+Date: Sat, 24 Jun 2017 19:08:38 +0100
+Subject: build: canonicalize all ARM variants to "arm", matching q_platform.h
+
+The ARCH in the Makefile must match the ARCH_STRING in q_platform.h;
+otherwise, ioquake3 will install (for instance) uiARCH.so but look for
+uiARCH_STRING.so, which isn't going to go well (particularly for
+the modular renderer).
+
+Like i386, but unlike most (all?) other Linux platforms, uname -m on
+32-bit ARM machines can have various results starting with "arm",
+depending on the specific CPU version (e.g. Raspberry Pi is armv6l,
+RPi2 is armv7l). Again similar to the x86 family,
+it's appropriate for them to share an architecture suffix;
+q_platform.h has traditionally used "arm" so let's use that.
+
+64-bit ARM makes a clean break from this, much like 64-bit x86 does:
+uname -m produces a string not starting with arm (specifically
+"aarch64"), and gcc predefines __aarch64__ instead of __arm__.
+As a result, it is unaffected by this change.
+
+(cherry picked from ioquake3 commit c91fab3900345d047f085d1e467521bba1ebd28f)
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 84b58b3..11a9efc 100644
+--- a/Makefile
++++ b/Makefile
+@@ -6,7 +6,7 @@
+ 
+ COMPILE_PLATFORM=$(shell uname|sed -e s/_.*//|tr '[:upper:]' '[:lower:]'|sed -e 's/\//_/g')
+ 
+-COMPILE_ARCH=$(shell uname -m | sed -e s/i.86/i386/)
++COMPILE_ARCH=$(shell uname -m | sed -e s/i.86/i386/ | sed -e 's/^arm.*/arm/')
+ 
+ ifeq ($(COMPILE_PLATFORM),sunos)
+   # Solaris uname and GNU uname differ
diff --git a/debian/patches/build-define-ARCH_STRING-in-Makefile-on-Linux-and-other-G.patch b/debian/patches/build-define-ARCH_STRING-in-Makefile-on-Linux-and-other-G.patch
new file mode 100644
index 0000000..1ed6639
--- /dev/null
+++ b/debian/patches/build-define-ARCH_STRING-in-Makefile-on-Linux-and-other-G.patch
@@ -0,0 +1,109 @@
+From: Simon McVittie <smcv at debian.org>
+Date: Sat, 24 Jun 2017 19:09:26 +0100
+Subject: build: define ARCH_STRING in Makefile on Linux and other GNU
+ platforms
+
+GNU platforms (Linux, kFreeBSD, Hurd) have endian.h to determine
+endianness, so all architectures except x86_64 are in fact treated
+identically, except that their ARCH_STRING is different. For the engine,
+the ARCH_STRING must always be identical to the ARCH from the Makefile,
+otherwise the engine will not find its cgame, game and ui plugins
+under their expected names and startup will fail. If we pass it in
+from the Makefile, then an identical value is guaranteed, and we can
+get rid of an increasingly long list of defined(__some_cpu__) tests.
+
+The game-code does not actually use ARCH_STRING, but I've kept it
+in order to be consistent with the ioquake3 engine.
+
+On non-Linux platforms we only support a few architectures anyway,
+so keeping the list up to date is less of a burden; *BSD porters
+could probably use the same technique to get support for lots of
+architectures with little effort, but I have not done that here,
+because I cannot test it.
+
+Windows must continue to support preprocessor-based architecture tests
+in any case, so that the MSVC solutions (which do not use the Makefile)
+can continue to work. However, Windows only runs on a few CPU families,
+so this shouldn't be a significant burden in practice.
+
+When cross-compiling, the tools are compiled for the build architecture
+(COMPILE_PLATFORM, COMPILE_ARCH) rather than the host architecture
+(PLATFORM, ARCH), so define ARCH_STRING to COMPILE_ARCH on a GNU
+COMPILE_PLATFORM.
+
+(cherry-picked from ioquake3 commit 2a71948f21fe588dbce9b29409283e9c912ef8e7)
+---
+ Makefile                  |  6 +++++-
+ code/qcommon/q_platform.h | 35 +++++++----------------------------
+ 2 files changed, 12 insertions(+), 29 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 11a9efc..6eeba4f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -211,6 +211,10 @@ endif
+ INSTALL=install
+ MKDIR=mkdir
+ 
++ifneq (,$(findstring "$(COMPILE_PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu"))
++  TOOLS_CFLAGS += -DARCH_STRING=\"$(COMPILE_ARCH)\"
++endif
++
+ ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu"))
+ 
+   ifeq ($(ARCH),alpha)
+@@ -218,7 +222,7 @@ ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu" "gnu")
+   endif
+ 
+   BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
+-    -pipe -DUSE_ICON $(SDL_CFLAGS)
++    -pipe -DUSE_ICON $(SDL_CFLAGS) -DARCH_STRING=\\\"$(ARCH)\\\"
+ 
+   ifeq ($(USE_OPENAL),1)
+     BASE_CFLAGS += -DUSE_OPENAL
+diff --git a/code/qcommon/q_platform.h b/code/qcommon/q_platform.h
+index cfa44b7..df5a356 100644
+--- a/code/qcommon/q_platform.h
++++ b/code/qcommon/q_platform.h
+@@ -162,34 +162,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ #define ID_INLINE inline
+ #define PATH_SEP '/'
+ 
+-#if defined __i386__
+-#define ARCH_STRING "i386"
+-#elif defined __x86_64__
+-#define ARCH_STRING "x86_64"
+-#elif defined __powerpc64__
+-#define ARCH_STRING "ppc64"
+-#elif defined __powerpc__
+-#define ARCH_STRING "ppc"
+-#elif defined __s390__
+-#define ARCH_STRING "s390"
+-#elif defined __s390x__
+-#define ARCH_STRING "s390x"
+-#elif defined __ia64__
+-#define ARCH_STRING "ia64"
+-#elif defined __alpha__
+-#define ARCH_STRING "alpha"
+-#elif defined __sparc__
+-#define ARCH_STRING "sparc"
+-#elif defined __arm__
+-#define ARCH_STRING "arm"
+-#elif defined __cris__
+-#define ARCH_STRING "cris"
+-#elif defined __hppa__
+-#define ARCH_STRING "hppa"
+-#elif defined __mips__
+-#define ARCH_STRING "mips"
+-#elif defined __sh__
+-#define ARCH_STRING "sh"
++#if !defined(ARCH_STRING)
++# error ARCH_STRING should be defined by the Makefile
++#endif
++
++#if defined __x86_64__
++#undef idx64
++#define idx64 1
+ #endif
+ 
+ #if __FLOAT_WORD_ORDER == __BIG_ENDIAN
diff --git a/debian/patches/series b/debian/patches/series
index ece368b..7367695 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,9 +1,10 @@
+Treat-GNU-kFreeBSD-and-GNU-Hurd-as-equivalent-to-GNU-Linu.patch
+Makefile-confine-LIB-to-the-one-platform-that-needs-it-na.patch
+build-canonicalize-all-ARM-variants-to-arm-matching-q_pla.patch
+build-define-ARCH_STRING-in-Makefile-on-Linux-and-other-G.patch
 Use-a-cpp-macro-for-the-game-code-version-so-package.patch
 Fix-for-crashing-the-server-by-making-a-callvote-to-.patch
 Request-confirmation-if-a-user-enables-auto-download.patch
-Fix-FTBFS-on-kFreeBSD.patch
 Add-OPENARENA_081_COMPATIBLE-define-for-network-comp.patch
-Add-support-for-the-GNU-Hurd-architecture.patch
 Use-LDFLAGS-on-non-Linux-too.patch
-Add-support-for-Aarch64-ARM64.patch
 Pick-up-date-from-SOURCE_DATE_EPOCH-for-reproducible-buil.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/openarena.git



More information about the Pkg-games-commits mailing list