aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPiotr Kubaj <pkubaj@FreeBSD.org>2024-02-11 11:46:26 +0000
committerPiotr Kubaj <pkubaj@FreeBSD.org>2024-02-11 11:49:10 +0000
commit27fd645f259deb9bc33ab0eb7582b466b62bac92 (patch)
tree3e4c80beecdc46bbbdbbd11f80bbf3c67d69bc44
parentcffb234baab7c4da96b90f1294e77f6847f1bf59 (diff)
downloadports-27fd645f259deb9bc33ab0eb7582b466b62bac92.tar.gz
ports-27fd645f259deb9bc33ab0eb7582b466b62bac92.zip
games/etlegacy: fix build on armv7, powerpc and powerpc64
-rw-r--r--games/etlegacy/Makefile36
-rw-r--r--games/etlegacy/files/patch-src_qcommon_q__platform.h16
-rw-r--r--games/etlegacy/pkg-plist15
3 files changed, 62 insertions, 5 deletions
diff --git a/games/etlegacy/Makefile b/games/etlegacy/Makefile
index 1f0435e77afc..aa9c4f26f9db 100644
--- a/games/etlegacy/Makefile
+++ b/games/etlegacy/Makefile
@@ -60,15 +60,45 @@ SUB_FILES= pkg-message
.if ${ARCH} == "i386"
PLIST_SUB+= I386="" \
AARCH64="@comment " \
- AMD64="@comment "
+ AMD64="@comment " \
+ POWERPC="@comment " \
+ POWERPC64="@comment " \
+ ARMV7="@comment "
.elif ${ARCH} == "amd64"
PLIST_SUB+= I386="@comment " \
AARCH64="@comment " \
- AMD64=""
+ AMD64="" \
+ POWERPC="@comment " \
+ POWERPC64="@comment " \
+ ARMV7="@comment "
.elif ${ARCH} == "aarch64"
PLIST_SUB+= I386="@comment " \
AARCH64="" \
- AMD64="@comment "
+ AMD64="@comment " \
+ POWERPC="@comment " \
+ POWERPC64="@comment " \
+ ARMV7="@comment "
+.elif ${ARCH} == "powerpc"
+PLIST_SUB+= I386="@comment " \
+ AARCH64="@comment " \
+ AMD64="@comment " \
+ POWERPC="" \
+ POWERPC64="@comment " \
+ ARMV7="@comment "
+.elif ${ARCH:Mpowerpc64*}
+PLIST_SUB+= I386="@comment " \
+ AARCH64="@comment " \
+ AMD64="@comment " \
+ POWERPC="@comment " \
+ POWERPC64="" \
+ ARMV7="@comment "
+.elif ${ARCH} == "armv7"
+PLIST_SUB+= I386="@comment " \
+ AARCH64="@comment " \
+ AMD64="@comment " \
+ POWERPC="@comment " \
+ POWERPC64="@comment " \
+ ARMV7=""
.endif
.if ! ${PORT_OPTIONS:MCLIENT} && ${PORT_OPTIONS:MDEDICATED}
diff --git a/games/etlegacy/files/patch-src_qcommon_q__platform.h b/games/etlegacy/files/patch-src_qcommon_q__platform.h
index d40a0876f3d1..f3478400b85b 100644
--- a/games/etlegacy/files/patch-src_qcommon_q__platform.h
+++ b/games/etlegacy/files/patch-src_qcommon_q__platform.h
@@ -1,6 +1,6 @@
---- src/qcommon/q_platform.h.orig 2024-01-16 23:51:21 UTC
+--- src/qcommon/q_platform.h.orig 2023-03-12 18:33:03 UTC
+++ src/qcommon/q_platform.h
-@@ -264,6 +264,8 @@
+@@ -264,12 +264,20 @@
#ifdef __i386__
#define ARCH_STRING "i386"
@@ -9,3 +9,15 @@
#elif defined __amd64__
#undef idx64
#define idx64 1
+ #define ARCH_STRING "x86_64"
+ #elif defined __axp__
+ #define ARCH_STRING "alpha"
++#elif defined __powerpc64__
++#define ARCH_STRING "ppc64"
++#elif defined __powerpc__
++#define ARCH_STRING "ppc"
++#elif defined __arm__
++#define ARCH_STRING "arm" // __ARM_ARCH_'V'__ FIXME: add ARM version to the ARCH_STRING
+ #endif
+
+ #if BYTE_ORDER == BIG_ENDIAN
diff --git a/games/etlegacy/pkg-plist b/games/etlegacy/pkg-plist
index f3913c34bd98..860126c8aa46 100644
--- a/games/etlegacy/pkg-plist
+++ b/games/etlegacy/pkg-plist
@@ -1,9 +1,15 @@
%%AARCH64%%%%CLIENT%%bin/etl.aarch64
%%AMD64%%%%CLIENT%%bin/etl.x86_64
+%%ARMV7%%%%CLIENT%%bin/etl.armv7
%%I386%%%%CLIENT%%bin/etl.i386
+%%POWERPC%%bin/etl.powerpc
+%%POWERPC64%%bin/etl.powerpc64
%%AARCH64%%%%DEDICATED%%bin/etlded.aarch64
%%AMD64%%%%DEDICATED%%bin/etlded.x86_64
+%%ARMV7%%%%DEDICATED%%bin/etlded.armv7
%%I386%%%%DEDICATED%%bin/etlded.i386
+%%POWERPC%%bin/etlded.powerpc
+%%POWERPC64%%bin/etlded.powerpc64
lib/etlegacy/etmain/campaigncycle.cfg
lib/etlegacy/etmain/etl_server.cfg
lib/etlegacy/etmain/etl_server_comp.cfg
@@ -120,15 +126,24 @@ lib/etlegacy/legacy/luascripts/wolfadmin/util/timers.lua
lib/etlegacy/legacy/luascripts/wolfadmin/util/util.lua
%%AARCH64%%lib/etlegacy/legacy/qagame.mp.fbsd.aarch64.so
%%AMD64%%lib/etlegacy/legacy/qagame.mp.fbsd.x86_64.so
+%%ARMV7%%lib/etlegacy/legacy/qagame.mp.fbsd.armv7.so
%%I386%%lib/etlegacy/legacy/qagame.mp.fbsd.i386.so
+%%POWERPC%%lib/etlegacy/legacy/qagame.mp.fbsd.powerpc.so
+%%POWERPC64%%lib/etlegacy/legacy/qagame.mp.fbsd.powerpc64.so
lib/etlegacy/legacy/rules.toml
lib/etlegacy/legacy/wolfadmin.toml
%%AARCH64%%%%CLIENT%%lib/etlegacy/librenderer_opengl1_aarch64.so
%%AMD64%%%%CLIENT%%lib/etlegacy/librenderer_opengl1_x86_64.so
+%%ARMV7%%%%CLIENT%%lib/etlegacy/librenderer_opengl1_armv7.so
%%I386%%%%CLIENT%%lib/etlegacy/librenderer_opengl1_i386.so
+%%POWERPC%%lib/etlegacy/librenderer_opengl1_powerpc.so
+%%POWERPC64%%lib/etlegacy/librenderer_opengl1_powerpc64.so
%%AARCH64%%share/applications/com.etlegacy.ETLegacy.aarch64.desktop
%%AMD64%%share/applications/com.etlegacy.ETLegacy.x86_64.desktop
+%%ARMV7%%share/applications/com.etlegacy.ETLegacy.armv7.desktop
%%I386%%share/applications/com.etlegacy.ETLegacy.i386.desktop
+%%POWERPC%%share/applications/com.etlegacy.ETLegacy.powerpc.desktop
+%%POWERPC64%%share/applications/com.etlegacy.ETLegacy.powerpc64.desktop
%%DOCSDIR%%/INSTALL.txt
share/icons/hicolor/scalable/apps/etl.svg
share/man/man6/etl.6.gz