Saturday, May 30, 2020

games/ioquake3 cvs current diffs adding ppc support

Successfully built and tested against current.

Let me know if I can do anything else to make this happen.

A new file named patch-code_qcommon_q_platform_h contains the following
immediately below.

$OpenBSD$

Index: code/qcommon/q_platform.h
--- code/qcommon/q_platform.h.orig
+++ code/qcommon/q_platform.h
@@ -223,6 +223,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,

#ifdef __i386__
#define ARCH_STRING "x86"
+#elif defined __ppc__
+#define ARCH_STRING "ppc"
#elif defined __amd64__
#undef idx64
#define idx64 1

Below are the CVS diffs.

Index: ports/games/ioquake3/patches/patch-Makefile
===================================================================
RCS file: /cvs/ports/games/ioquake3/patches/patch-Makefile,v
retrieving revision 1.2
diff -u -p -u -r1.2 patch-Makefile
--- ports/games/ioquake3/patches/patch-Makefile 16 Apr 2018 13:12:22 -0000 1.2
+++ ports/games/ioquake3/patches/patch-Makefile 30 May 2020 05:39:01 -0000
@@ -3,7 +3,16 @@ $OpenBSD: patch-Makefile,v 1.2 2018/04/1
Index: Makefile
--- Makefile.orig
+++ Makefile
-@@ -743,16 +743,16 @@ ifeq ($(PLATFORM),openbsd)
+@@ -4,7 +4,7 @@
+ # GNU Make required
+ #
+ COMPILE_PLATFORM=$(shell uname | sed -e 's/_.*//' | tr '[:upper:]' '[:lower:]' | sed -e 's/\//_/g')
+-COMPILE_ARCH=$(shell uname -m | sed -e 's/i.86/x86/' | sed -e 's/^arm.*/arm/')
++COMPILE_ARCH=$(shell uname -m | sed -e 's/i.86/x86/' | sed -e 's/macppc/ppc/' | sed -e 's/^arm.*/arm/')
+
+ ifeq ($(COMPILE_PLATFORM),sunos)
+ # Solaris uname and GNU uname differ
+@@ -769,16 +769,16 @@ ifeq ($(PLATFORM),openbsd)
-pipe -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON
CLIENT_CFLAGS += $(SDL_CFLAGS)

@@ -23,7 +32,7 @@ Index: Makefile
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
HAVE_VM_COMPILED=true
else
-@@ -1525,7 +1525,6 @@ Q3CPPOBJ = \
+@@ -1562,7 +1562,6 @@ Q3CPPOBJ = \
$(B)/tools/cpp/eval.o \
$(B)/tools/cpp/include.o \
$(B)/tools/cpp/hideset.o \

Index: ports/games/ioquake3/Makefile
===================================================================
RCS file: /cvs/ports/games/ioquake3/Makefile,v
retrieving revision 1.25
diff -u -p -u -r1.25 Makefile
--- ports/games/ioquake3/Makefile 12 Jul 2019 20:46:19 -0000 1.25
+++ ports/games/ioquake3/Makefile 30 May 2020 05:35:47 -0000
@@ -1,7 +1,7 @@
# $OpenBSD: Makefile,v 1.25 2019/07/12 20:46:19 sthen Exp $

BROKEN-i386= need to free up a register
-ONLY_FOR_ARCHS= amd64 i386
+ONLY_FOR_ARCHS= amd64 i386 macppc

COMMENT= clone of the original Quake III Arena

@@ -33,7 +33,11 @@ ALL_TARGET= "release"
USE_GMAKE= Yes
NO_TEST= Yes

+.if ${MACHINE_ARCH} == "powerpc"
+QUAKE_ARCH= ppc
+.else
QUAKE_ARCH= ${ARCH:S/amd64/x86_64/:S/i386/x86/}
+.endif
SUBST_VARS+= QUAKE_ARCH

do-install:

No comments:

Post a Comment