commit:     1fa9229b7486ee0986d3486cddd65e209d770084
Author:     Kenton Groombridge <concord <AT> gentoo <DOT> org>
AuthorDate: Tue Dec  6 19:28:31 2022 +0000
Commit:     Kenton Groombridge <concord <AT> gentoo <DOT> org>
CommitDate: Tue Dec  6 19:35:56 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1fa9229b

net-voip/mumble: fix 1.4.287 build on x86, increase tests timeout

Closes: https://bugs.gentoo.org/884049
Signed-off-by: Kenton Groombridge <concord <AT> gentoo.org>

 .../mumble/files/mumble-1.4-force-alignment.patch  | 28 ++++++++++++++++++++++
 ...ble-1.4.287.ebuild => mumble-1.4.287-r1.ebuild} | 10 +++++++-
 2 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/net-voip/mumble/files/mumble-1.4-force-alignment.patch 
b/net-voip/mumble/files/mumble-1.4-force-alignment.patch
new file mode 100644
index 000000000000..ea0ae4792443
--- /dev/null
+++ b/net-voip/mumble/files/mumble-1.4-force-alignment.patch
@@ -0,0 +1,28 @@
+From 13c051b36b387356815cff5d685bc628b74ba136 Mon Sep 17 00:00:00 2001
+From: Davide Beatrici <[email protected]>
+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];

diff --git a/net-voip/mumble/mumble-1.4.287.ebuild 
b/net-voip/mumble/mumble-1.4.287-r1.ebuild
similarity index 94%
rename from net-voip/mumble/mumble-1.4.287.ebuild
rename to net-voip/mumble/mumble-1.4.287-r1.ebuild
index 58bb301f3470..9bef3ee35ff6 100644
--- a/net-voip/mumble/mumble-1.4.287.ebuild
+++ b/net-voip/mumble/mumble-1.4.287-r1.ebuild
@@ -21,7 +21,7 @@ else
                
SRC_URI="https://github.com/mumble-voip/mumble/releases/download/v${MY_PV}/${MY_P}.tar.gz";
                S="${WORKDIR}/${P}.src"
        fi
-       KEYWORDS="amd64 ~arm64 ~ppc64 ~x86"
+       KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
 fi
 
 SRC_URI+=" 
https://dev.gentoo.org/~concord/distfiles/${PN}-1.4-openssl3.patch.xz";
@@ -77,6 +77,7 @@ PATCHES=(
        "${WORKDIR}/${PN}-1.4-openssl3.patch"
        "${WORKDIR}/${PN}-1.4-crypto-threads.patch"
        "${WORKDIR}/${PN}-1.4-odr.patch"
+       "${FILESDIR}/${PN}-1.4-force-alignment.patch"
 )
 
 pkg_setup() {
@@ -124,6 +125,13 @@ src_configure() {
        cmake_src_configure
 }
 
+src_test() {
+       # https://bugs.gentoo.org/884049
+       # increase timeout for tests
+       local -x QTEST_FUNCTION_TIMEOUT=600000
+       cmake_src_test
+}
+
 src_install() {
        cmake_src_install
 

Reply via email to