IOQuake3 does not not support PowerPC on any *BSD. In just 3 patches I
got it working on OpenBSD 6.7/macppc, graphics acceleration and all.
I do plan on sending this to IOQuake3 as well.
Makefile
4c4
< ONLY_FOR_ARCHS= amd64 i386
---
> ONLY_FOR_ARCHS= amd64 i386 macppc
35a36,38
> .if ${MACHINE_ARCH} == "powerpc"
> QUAKE_ARCH= ppc
> .else
36a40
> .endif
(Updated) patches/patch-Makefile
$OpenBSD: patch-Makefile,v 1.2 2018/04/16 13:12:22 abieber Exp $
Index: Makefile
--- Makefile.orig
+++ Makefile
@@ -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)
- OPTIMIZEVM = -O3
+ OPTIMIZEVM =
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
ifeq ($(ARCH),x86_64)
- OPTIMIZEVM = -O3
+ OPTIMIZEVM =
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
HAVE_VM_COMPILED = true
else
ifeq ($(ARCH),x86)
- OPTIMIZEVM = -O3 -march=i586
+ OPTIMIZEVM = -march=i586
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
HAVE_VM_COMPILED=true
else
@@ -1562,7 +1562,6 @@ Q3CPPOBJ = \
$(B)/tools/cpp/eval.o \
$(B)/tools/cpp/include.o \
$(B)/tools/cpp/hideset.o \
- $(B)/tools/cpp/getopt.o \
$(B)/tools/cpp/unix.o
$(B)/tools/cpp/%.o: $(Q3CPPDIR)/%.c
(New) patch-code_qcommon_q_platform_h
$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