aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Bauer <samuel.bauer@yahoo.fr>2022-07-27 01:17:34 +0200
committerSamuel Bauer <samuel.bauer@yahoo.fr>2022-07-27 01:17:34 +0200
commitc3c660461a5d99902d19c84c345e42270859204b (patch)
tree7bafc935fa6471a3485ff5ff40292bc4a14698d6 /games-action
parentgames-emulation/yuzu: uploaded compatibility list to gist.github.com (diff)
downloadguru-c3c660461a5d99902d19c84c345e42270859204b.tar.gz
guru-c3c660461a5d99902d19c84c345e42270859204b.tar.bz2
guru-c3c660461a5d99902d19c84c345e42270859204b.zip
games-action/blackvoxel: add upstream patch: strict aliasing
Signed-off-by: Samuel Bauer <samuel.bauer@yahoo.fr>
Diffstat (limited to 'games-action')
-rw-r--r--games-action/blackvoxel/blackvoxel-2.50.ebuild9
-rw-r--r--games-action/blackvoxel/files/blackvoxel-2.50-strict-aliasing.patch25
2 files changed, 27 insertions, 7 deletions
diff --git a/games-action/blackvoxel/blackvoxel-2.50.ebuild b/games-action/blackvoxel/blackvoxel-2.50.ebuild
index d6c70fed5..f4e588446 100644
--- a/games-action/blackvoxel/blackvoxel-2.50.ebuild
+++ b/games-action/blackvoxel/blackvoxel-2.50.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-inherit desktop flag-o-matic toolchain-funcs xdg
+inherit desktop toolchain-funcs xdg
DESCRIPTION="Blackvoxel Video Game"
HOMEPAGE="https://www.blackvoxel.com/"
@@ -29,14 +29,9 @@ S="${WORKDIR}/${PN}_source_${PV//./_}"
PATCHES=(
"${FILESDIR}"/${P}-makefile.patch
"${FILESDIR}"/${P}-savedir.patch
+ "${FILESDIR}"/${P}-strict-aliasing.patch
)
-src_prepare() {
- default
- append-cflags -fno-strict-aliasing
- append-cxxflags -fno-strict-aliasing
-}
-
src_compile() {
export CXX="$(tc-getCXX)"
export CC="$(tc-getCC)"
diff --git a/games-action/blackvoxel/files/blackvoxel-2.50-strict-aliasing.patch b/games-action/blackvoxel/files/blackvoxel-2.50-strict-aliasing.patch
new file mode 100644
index 000000000..41d2ab8cd
--- /dev/null
+++ b/games-action/blackvoxel/files/blackvoxel-2.50-strict-aliasing.patch
@@ -0,0 +1,25 @@
+diff --git a/src/ZVoxelType_Concrete.cpp b/src/ZVoxelType_Concrete.cpp
+index 19a95ad..768e094 100644
+--- a/src/ZVoxelType_Concrete.cpp
++++ b/src/ZVoxelType_Concrete.cpp
+@@ -37,10 +37,17 @@
+
+ ZVoxelExtension * ZVoxelType_Concrete::CreateVoxelExtension(bool IsLoadingPhase)
+ {
+- float Pressure = 0.0;
+- ZMemSize Ms = *((ULong *)&Pressure);
++ union
++ {
++ float Pressure;
++ ZVoxelExtension * Extension;
++ };
++
++ Extension = 0;
++ Pressure = 0.0;
++
++ return( Extension );
+
+- return( (ZVoxelExtension *)Ms);
+ }
+
+ void ZVoxelType_Concrete::GetBlockInformations(ZVoxelLocation * DestLocation, ZString & Infos)