SHA256
1
0
forked from pool/gzdoom

- Add gzdoom-lzma-simd.patch

- Reorder 0001-Revert-Switch-to-miniz-from-zlib.patch before gzdoom-lzma.patch

OBS-URL: https://build.opensuse.org/package/show/games/gzdoom?expand=0&rev=108
This commit is contained in:
Jan Engelhardt 2024-05-01 09:12:22 +00:00 committed by Git OBS Bridge
parent f76fa524cf
commit 3c99f6b085
5 changed files with 75 additions and 41 deletions

View File

@ -7,29 +7,29 @@ This reverts commit ba9ce0e83f6e25e3ddef5000bd51d53f2e3947a2.
--- ---
CMakeLists.txt | 13 ++++++++++++- CMakeLists.txt | 13 ++++++++++++-
src/CMakeLists.txt | 4 ++-- src/CMakeLists.txt | 4 ++--
src/common/audio/music/i_music.cpp | 2 +- src/common/audio/music/i_music.cpp | 3 ++-
src/common/engine/serializer.cpp | 2 +- src/common/engine/serializer.cpp | 3 ++-
src/common/filesystem/source/files_decompress.cpp | 2 +- src/common/filesystem/source/files_decompress.cpp | 3 ++-
src/common/filesystem/source/filesystem.cpp | 3 ++- src/common/filesystem/source/filesystem.cpp | 3 ++-
src/common/filesystem/source/resourcefile.cpp | 2 +- src/common/filesystem/source/resourcefile.cpp | 3 ++-
src/common/models/model.cpp | 13 +++++++++++-- src/common/models/model.cpp | 13 +++++++++++--
src/common/platform/win32/i_crash.cpp | 2 +- src/common/platform/win32/i_crash.cpp | 3 ++-
src/common/textures/m_png.cpp | 2 +- src/common/textures/m_png.cpp | 3 ++-
src/common/thirdparty/m_crc32.h | 5 +++-- src/common/thirdparty/m_crc32.h | 6 ++++--
src/g_pch.h | 2 +- src/g_pch.h | 3 ++-
src/g_pch2.h | 2 +- src/g_pch2.h | 3 ++-
src/maploader/glnodes.cpp | 2 +- src/maploader/glnodes.cpp | 3 ++-
src/serializer_doom.cpp | 2 +- src/serializer_doom.cpp | 3 ++-
tools/zipdir/CMakeLists.txt | 4 ++-- tools/zipdir/CMakeLists.txt | 4 ++--
tools/zipdir/zipdir.c | 2 +- tools/zipdir/zipdir.c | 3 ++-
vcpkg.json | 4 ++++ vcpkg.json | 4 ++++
18 files changed, 47 insertions(+), 21 deletions(-) 18 files changed, 59 insertions(+), 21 deletions(-)
Index: gzdoom-g4.12.2/CMakeLists.txt Index: gzdoom-g4.12.2/CMakeLists.txt
=================================================================== ===================================================================
--- gzdoom-g4.12.2.orig/CMakeLists.txt --- gzdoom-g4.12.2.orig/CMakeLists.txt
+++ gzdoom-g4.12.2/CMakeLists.txt +++ gzdoom-g4.12.2/CMakeLists.txt
@@ -216,6 +216,7 @@ option( NO_OPENAL "Disable OpenAL sound @@ -215,6 +215,7 @@ option( NO_OPENAL "Disable OpenAL sound
find_package( BZip2 ) find_package( BZip2 )
find_package( VPX ) find_package( VPX )
@ -37,7 +37,7 @@ Index: gzdoom-g4.12.2/CMakeLists.txt
include( TargetArch ) include( TargetArch )
@@ -333,6 +334,7 @@ set( CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE @@ -332,6 +333,7 @@ set( CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE
set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${REL_C_FLAGS}" ) set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${REL_C_FLAGS}" )
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${DEB_C_FLAGS} -D_DEBUG" ) set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${DEB_C_FLAGS} -D_DEBUG" )
@ -45,7 +45,7 @@ Index: gzdoom-g4.12.2/CMakeLists.txt
option(FORCE_INTERNAL_BZIP2 "Use internal bzip2") option(FORCE_INTERNAL_BZIP2 "Use internal bzip2")
option(FORCE_INTERNAL_ASMJIT "Use internal asmjit" ON) option(FORCE_INTERNAL_ASMJIT "Use internal asmjit" ON)
mark_as_advanced( FORCE_INTERNAL_ASMJIT ) mark_as_advanced( FORCE_INTERNAL_ASMJIT )
@@ -349,6 +351,16 @@ set( DRPC_INCLUDE_DIR "-I/ignore" ) @@ -348,6 +350,16 @@ set( DRPC_INCLUDE_DIR "-I/ignore" )
set( DRPC_LIBRARIES -ldiscord-rpc ) set( DRPC_LIBRARIES -ldiscord-rpc )
set( DRPC_LIBRARY -ldiscord-rpc ) set( DRPC_LIBRARY -ldiscord-rpc )
@ -63,9 +63,9 @@ Index: gzdoom-g4.12.2/CMakeLists.txt
check_symbol_exists( "backtrace" "execinfo.h" HAVE_BACKTRACE ) check_symbol_exists( "backtrace" "execinfo.h" HAVE_BACKTRACE )
if( NOT HAVE_BACKTRACE ) if( NOT HAVE_BACKTRACE )
@@ -406,7 +418,6 @@ install(DIRECTORY docs/ @@ -406,7 +418,6 @@ install(DIRECTORY docs/
option( DYN_OPENAL "Dynamically load OpenAL" ON ) option( DYN_OPENAL "Dynamically load OpenAL" ON )
add_subdirectory( libraries/lzma )
-add_subdirectory( libraries/miniz ) -add_subdirectory( libraries/miniz )
add_subdirectory( tools ) add_subdirectory( tools )
add_subdirectory( wadsrc ) add_subdirectory( wadsrc )
@ -74,7 +74,7 @@ Index: gzdoom-g4.12.2/src/CMakeLists.txt
=================================================================== ===================================================================
--- gzdoom-g4.12.2.orig/src/CMakeLists.txt --- gzdoom-g4.12.2.orig/src/CMakeLists.txt
+++ gzdoom-g4.12.2/src/CMakeLists.txt +++ gzdoom-g4.12.2/src/CMakeLists.txt
@@ -344,7 +344,7 @@ add_custom_target( revision_check ALL @@ -319,7 +319,7 @@ add_custom_target( revision_check ALL
# required libraries # required libraries
@ -83,12 +83,12 @@ Index: gzdoom-g4.12.2/src/CMakeLists.txt
if (HAVE_VULKAN) if (HAVE_VULKAN)
list( APPEND PROJECT_LIBRARIES "zvulkan" ) list( APPEND PROJECT_LIBRARIES "zvulkan" )
endif() endif()
@@ -408,7 +408,7 @@ else() @@ -383,7 +383,7 @@ else()
message( SEND_ERROR "Could not find libvpx" ) message( SEND_ERROR "Could not find libvpx" )
endif() endif()
-include_directories( SYSTEM "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIRS}" "${ZMUSIC_INCLUDE_DIR}" "${DRPC_INCLUDE_DIR}") -include_directories( SYSTEM "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}" "${DRPC_INCLUDE_DIR}")
+include_directories( SYSTEM "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIRS}" "${ZMUSIC_INCLUDE_DIR}" "${DRPC_INCLUDE_DIR}") +include_directories( SYSTEM "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}" "${DRPC_INCLUDE_DIR}")
if( ${HAVE_VM_JIT} ) if( ${HAVE_VM_JIT} )
add_definitions( -DHAVE_VM_JIT ) add_definitions( -DHAVE_VM_JIT )
@ -305,12 +305,12 @@ Index: gzdoom-g4.12.2/tools/zipdir/CMakeLists.txt
cmake_minimum_required( VERSION 3.16 ) cmake_minimum_required( VERSION 3.16 )
if( NOT CMAKE_CROSSCOMPILING ) if( NOT CMAKE_CROSSCOMPILING )
- include_directories( SYSTEM "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIRS}" ) - include_directories( SYSTEM "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" )
+ include_directories( SYSTEM "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIRS}" ) + include_directories( SYSTEM "${ZLIB_INCLUDE_DIR} ${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" )
add_executable( zipdir add_executable( zipdir
zipdir.c ) zipdir.c )
- target_link_libraries( zipdir miniz ${BZIP2_LIBRARIES} ${LZMA_LDFLAGS} ) - target_link_libraries( zipdir miniz ${BZIP2_LIBRARIES} lzma )
+ target_link_libraries( zipdir ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} ${LZMA_LDFLAGS} ) + target_link_libraries( zipdir ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} lzma )
set( CROSS_EXPORTS ${CROSS_EXPORTS} zipdir PARENT_SCOPE ) set( CROSS_EXPORTS ${CROSS_EXPORTS} zipdir PARENT_SCOPE )
endif() endif()
Index: gzdoom-g4.12.2/tools/zipdir/zipdir.c Index: gzdoom-g4.12.2/tools/zipdir/zipdir.c

25
gzdoom-lzma-simd.patch Normal file
View File

@ -0,0 +1,25 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: 2024-05-01 00:14:04.625759204 +0200
Subject: Fix build failures involving SIMD code
Fix build failure on Leap 15.6/gcc-7 amd64:
[ 31s] C/SwapBytes.c:312:7: error: incompatible types when initializing type
'__m256i {aka const __vector(4) long long int}' using type 'int'
---
libraries/lzma/C/SwapBytes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: gzdoom-g4.12.2/libraries/lzma/C/SwapBytes.c
===================================================================
--- gzdoom-g4.12.2.orig/libraries/lzma/C/SwapBytes.c
+++ gzdoom-g4.12.2/libraries/lzma/C/SwapBytes.c
@@ -22,7 +22,7 @@ typedef UInt32 CSwapUInt32;
// #if defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1900)
#if defined(__clang__) && (__clang_major__ >= 4) \
|| defined(Z7_GCC_VERSION) && (Z7_GCC_VERSION >= 40701)
- #define k_SwapBytes_Mode_MAX k_SwapBytes_Mode_AVX2
+ #define k_SwapBytes_Mode_MAX k_SwapBytes_Mode_SSE2
#define SWAP_ATTRIB_SSE2 __attribute__((__target__("sse2")))
#define SWAP_ATTRIB_SSSE3 __attribute__((__target__("ssse3")))
#define SWAP_ATTRIB_AVX2 __attribute__((__target__("avx2")))

View File

@ -21,7 +21,7 @@ Index: gzdoom-g4.12.2/CMakeLists.txt
# Support cross compiling # Support cross compiling
option( FORCE_CROSSCOMPILE "Turn on cross compiling." NO ) option( FORCE_CROSSCOMPILE "Turn on cross compiling." NO )
@@ -385,7 +386,7 @@ else() @@ -397,7 +398,7 @@ else()
set( BZIP2_LIBRARY bz2 ) set( BZIP2_LIBRARY bz2 )
endif() endif()
@ -30,14 +30,14 @@ Index: gzdoom-g4.12.2/CMakeLists.txt
if( NOT CMAKE_CROSSCOMPILING ) if( NOT CMAKE_CROSSCOMPILING )
if( NOT CROSS_EXPORTS ) if( NOT CROSS_EXPORTS )
@@ -405,7 +406,6 @@ install(DIRECTORY docs/ @@ -417,7 +418,6 @@ install(DIRECTORY docs/
option( DYN_OPENAL "Dynamically load OpenAL" ON ) option( DYN_OPENAL "Dynamically load OpenAL" ON )
-add_subdirectory( libraries/lzma ) -add_subdirectory( libraries/lzma )
add_subdirectory( libraries/miniz )
add_subdirectory( tools ) add_subdirectory( tools )
add_subdirectory( wadsrc ) add_subdirectory( wadsrc )
add_subdirectory( wadsrc_bm )
Index: gzdoom-g4.12.2/src/CMakeLists.txt Index: gzdoom-g4.12.2/src/CMakeLists.txt
=================================================================== ===================================================================
--- gzdoom-g4.12.2.orig/src/CMakeLists.txt --- gzdoom-g4.12.2.orig/src/CMakeLists.txt
@ -46,8 +46,8 @@ Index: gzdoom-g4.12.2/src/CMakeLists.txt
message( SEND_ERROR "Could not find libvpx" ) message( SEND_ERROR "Could not find libvpx" )
endif() endif()
-include_directories( SYSTEM "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}" "${DRPC_INCLUDE_DIR}") -include_directories( SYSTEM "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}" "${DRPC_INCLUDE_DIR}")
+include_directories( SYSTEM "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIRS}" "${ZMUSIC_INCLUDE_DIR}" "${DRPC_INCLUDE_DIR}") +include_directories( SYSTEM "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIRS}" "${ZMUSIC_INCLUDE_DIR}" "${DRPC_INCLUDE_DIR}")
if( ${HAVE_VM_JIT} ) if( ${HAVE_VM_JIT} )
add_definitions( -DHAVE_VM_JIT ) add_definitions( -DHAVE_VM_JIT )
@ -68,11 +68,11 @@ Index: gzdoom-g4.12.2/tools/zipdir/CMakeLists.txt
cmake_minimum_required( VERSION 3.16 ) cmake_minimum_required( VERSION 3.16 )
if( NOT CMAKE_CROSSCOMPILING ) if( NOT CMAKE_CROSSCOMPILING )
- include_directories( SYSTEM "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" ) - include_directories( SYSTEM "${ZLIB_INCLUDE_DIR} ${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIR}" )
+ include_directories( SYSTEM "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIRS}" ) + include_directories( SYSTEM "${ZLIB_INCLUDE_DIR} ${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIRS}" )
add_executable( zipdir add_executable( zipdir
zipdir.c ) zipdir.c )
- target_link_libraries( zipdir miniz ${BZIP2_LIBRARIES} lzma ) - target_link_libraries( zipdir ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} lzma )
+ target_link_libraries( zipdir miniz ${BZIP2_LIBRARIES} ${LZMA_LDFLAGS} ) + target_link_libraries( zipdir ${ZLIB_LIBRARIES} ${BZIP2_LIBRARIES} ${LZMA_LDFLAGS} )
set( CROSS_EXPORTS ${CROSS_EXPORTS} zipdir PARENT_SCOPE ) set( CROSS_EXPORTS ${CROSS_EXPORTS} zipdir PARENT_SCOPE )
endif() endif()

View File

@ -16,6 +16,7 @@ Tue Apr 30 10:40:25 UTC 2024 - Jan Engelhardt <jengelh@inai.de>
* Added rudimentary support for DSDA's COMPLVL lump. * Added rudimentary support for DSDA's COMPLVL lump.
* Added actor flag +BILLBOARDFACECAMERA. * Added actor flag +BILLBOARDFACECAMERA.
* Added `sv_pistolstart` server flag. * Added `sv_pistolstart` server flag.
- Add gzdoom-lzma-simd.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Oct 27 04:20:10 UTC 2023 - Jan Engelhardt <jengelh@inai.de> Fri Oct 27 04:20:10 UTC 2023 - Jan Engelhardt <jengelh@inai.de>

View File

@ -16,6 +16,10 @@
# #
%if 0%{?suse_version} >= 1599
%define with_clzma 1
%endif
Name: gzdoom Name: gzdoom
Version: 4.12.2 Version: 4.12.2
Release: 0 Release: 0
@ -27,12 +31,13 @@ URL: https://zdoom.org/
#Git-Clone: https://github.com/zdoom/gzdoom #Git-Clone: https://github.com/zdoom/gzdoom
Source: https://github.com/zdoom/gzdoom/archive/g%version.tar.gz Source: https://github.com/zdoom/gzdoom/archive/g%version.tar.gz
Patch1: gzdoom-waddir.patch Patch1: gzdoom-waddir.patch
Patch2: gzdoom-lzma.patch Patch2: gzdoom-discord.patch
Patch6: gzdoom-discord.patch Patch3: 0001-Revert-Switch-to-miniz-from-zlib.patch
Patch8: 0001-removed-some-32bit-only-CMake-code.patch Patch4: gzdoom-lzma-simd.patch
Patch9: 0001-Revert-use-static_assert-to-make-32-bit-builds-fail.patch Patch5: gzdoom-lzma.patch
Patch10: 0001-Revert-Switch-to-miniz-from-zlib.patch Patch6: 0001-removed-some-32bit-only-CMake-code.patch
Patch11: more-32bit.patch Patch7: 0001-Revert-use-static_assert-to-make-32-bit-builds-fail.patch
Patch8: more-32bit.patch
BuildRequires: cmake >= 2.8.7 BuildRequires: cmake >= 2.8.7
BuildRequires: discord-rpc-devel BuildRequires: discord-rpc-devel
BuildRequires: gcc-c++ BuildRequires: gcc-c++
@ -41,7 +46,7 @@ BuildRequires: pkg-config
BuildRequires: unzip BuildRequires: unzip
BuildRequires: zmusic-devel BuildRequires: zmusic-devel
BuildRequires: pkgconfig(bzip2) BuildRequires: pkgconfig(bzip2)
BuildRequires: pkgconfig(clzma) >= 23.01 BuildRequires: pkgconfig(clzma)
BuildRequires: pkgconfig(flac) BuildRequires: pkgconfig(flac)
BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pkgconfig(gtk+-3.0)
@ -73,6 +78,9 @@ The executables hard-require SSE2 on i686 currently.
%prep %prep
%autosetup -n %name-g%version -p1 %autosetup -n %name-g%version -p1
%if !(0%{?suse_version} >= 1599)
%patch -P 5 -R -p1
%endif
perl -i -pe 's{__DATE__}{"does not matter when"}g' src/common/platform/posix/sdl/i_main.cpp perl -i -pe 's{__DATE__}{"does not matter when"}g' src/common/platform/posix/sdl/i_main.cpp
perl -i -pe 's{<unknown version>}{%version}g' tools/updaterevision/UpdateRevision.cmake perl -i -pe 's{<unknown version>}{%version}g' tools/updaterevision/UpdateRevision.cmake