diff --git a/games-action/blackvoxel/blackvoxel-2.50.ebuild b/games-action/blackvoxel/blackvoxel-2.50.ebuild index d6c70fed56..f4e5884468 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 0000000000..41d2ab8cdb --- /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)