git: fb8f40741f53 - main - games/etlegacy: Try to fix build on aarch64
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 17 Jan 2024 18:36:29 UTC
The branch main has been updated by acm:
URL: https://cgit.FreeBSD.org/ports/commit/?id=fb8f40741f53b3619050e7d200623df1852a2768
commit fb8f40741f53b3619050e7d200623df1852a2768
Author: Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
AuthorDate: 2024-01-17 02:34:01 +0000
Commit: Jose Alonso Cardenas Marquez <acm@FreeBSD.org>
CommitDate: 2024-01-17 18:36:00 +0000
games/etlegacy: Try to fix build on aarch64
Reported by: pkg-fallout
---
games/etlegacy/Makefile | 7 +++++++
games/etlegacy/files/patch-src_qcommon_q__platform.h | 11 +++++++++++
games/etlegacy/pkg-plist | 5 +++++
3 files changed, 23 insertions(+)
diff --git a/games/etlegacy/Makefile b/games/etlegacy/Makefile
index 2a4d2ba35f4a..36a86fca3453 100644
--- a/games/etlegacy/Makefile
+++ b/games/etlegacy/Makefile
@@ -1,5 +1,6 @@
PORTNAME= etlegacy
DISTVERSION= 2.81.1
+PORTREVISION= 1
CATEGORIES= games
MASTER_SITES= https://mirror.etlegacy.com/geoip/:geoip \
https://mirror.etlegacy.com/wolfadmin/:wolfadmin
@@ -54,10 +55,16 @@ SUB_FILES= pkg-message
.if ${ARCH} == "i386"
PLIST_SUB+= I386="" \
+ AARCH64="@comment " \
AMD64="@comment "
.elif ${ARCH} == "amd64"
PLIST_SUB+= I386="@comment " \
+ AARCH64="@comment " \
AMD64=""
+.elif ${ARCH} == "aarch64"
+PLIST_SUB+= I386="@comment " \
+ AARCH64="" \
+ AMD64="@comment"
.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
new file mode 100644
index 000000000000..d40a0876f3d1
--- /dev/null
+++ b/games/etlegacy/files/patch-src_qcommon_q__platform.h
@@ -0,0 +1,11 @@
+--- src/qcommon/q_platform.h.orig 2024-01-16 23:51:21 UTC
++++ src/qcommon/q_platform.h
+@@ -264,6 +264,8 @@
+
+ #ifdef __i386__
+ #define ARCH_STRING "i386"
++#elif defined __aarch64__
++#define ARCH_STRING "aarch64"
+ #elif defined __amd64__
+ #undef idx64
+ #define idx64 1
diff --git a/games/etlegacy/pkg-plist b/games/etlegacy/pkg-plist
index 5fecd315fe95..1fdb98503112 100644
--- a/games/etlegacy/pkg-plist
+++ b/games/etlegacy/pkg-plist
@@ -1,5 +1,7 @@
+%%AARCH64%%%%CLIENT%%bin/etl.aarch64
%%AMD64%%%%CLIENT%%bin/etl.x86_64
%%I386%%%%CLIENT%%bin/etl.i386
+%%AARCH64%%%%DEDICATED%%bin/etlded.aarch64
%%AMD64%%%%DEDICATED%%bin/etlded.x86_64
%%I386%%%%DEDICATED%%bin/etlded.i386
lib/etlegacy/etmain/campaigncycle.cfg
@@ -116,12 +118,15 @@ lib/etlegacy/legacy/luascripts/wolfadmin/util/settings.lua
lib/etlegacy/legacy/luascripts/wolfadmin/util/tables.lua
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
%%I386%%lib/etlegacy/legacy/qagame.mp.fbsd.i386.so
lib/etlegacy/legacy/rules.toml
lib/etlegacy/legacy/wolfadmin.toml
+%%AARCH64%%lib/etlegacy/librenderer_opengl1_aarch64.so
%%AMD64%%lib/etlegacy/librenderer_opengl1_x86_64.so
%%I386%%lib/etlegacy/librenderer_opengl1_i386.so
+%%AARCH64%%share/applications/com.etlegacy.ETLegacy.aarch64.desktop
%%AMD64%%share/applications/com.etlegacy.ETLegacy.x86_64.desktop
%%I386%%share/applications/com.etlegacy.ETLegacy.i386.desktop
%%DOCSDIR%%/INSTALL.txt