network/mumble: fix gtav plugin 32-bit compile

Signed-off-by: Edward W. Koenig <kingbeowulf@linuxgalaxy.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Edward W. Koenig 2024-03-18 18:48:29 -07:00 committed by Willy Sudiarto Raharjo
parent fe648eaafc
commit 626cb93339
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
2 changed files with 35 additions and 2 deletions

View File

@ -28,7 +28,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=mumble
VERSION=${VERSION:-1.4.287}
BUILD=${BUILD:-2}
BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@ -118,6 +118,10 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
# Apply missing GTAV plugin patch for 32-bit alignment
# https://github.com/mumble-voip/mumble/issues/5849
patch -p1 < $CWD/positional-audio-plugin-gtav-32-bit-fix.patch
sed -e "s|CMAKE_CXX_STANDARD 14|CMAKE_CXX_STANDARD 17|" -i CMakeLists.txt
mkdir -p build
cd build
@ -135,7 +139,6 @@ cmake \
-Dupdate=OFF \
-Dbundle-qt-translations=OFF \
-Dwarnings-as-errors=OFF \
-Dice=OFF \
-Dzeroconf=OFF \
$BUILD_CELT \
$BUILD_SPEECHD \

View File

@ -0,0 +1,30 @@
From 13c051b36b387356815cff5d685bc628b74ba136 Mon Sep 17 00:00:00 2001
From: Davide Beatrici <git@davidebeatrici.dev>
Date: Thu, 1 Sep 2022 23:32:57 +0200
Subject: [PATCH] FIX(positional-audio): Force 8 bytes alignment for
CCameraAngles in GTAV plugin
https://en.cppreference.com/w/cpp/language/alignas
This fixes compilation when the implicit alignment is not 8 bytes.
It can be the case with 32 bit targets.
---
plugins/gtav/structs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/gtav/structs.h b/plugins/gtav/structs.h
index 2829dc11e1..0e4f76edab 100644
--- a/plugins/gtav/structs.h
+++ b/plugins/gtav/structs.h
@@ -118,7 +118,7 @@ struct CCameraManagerAngles {
ptr_t cameraAngles; // CCameraAngles *
};
-struct CCameraAngles {
+struct alignas(8) CCameraAngles {
uint8_t pad1[960];
ptr_t playerAngles; // CPlayerAngles *
uint8_t pad2[60];