From 986a187c841e3256a7abc5e69541608eb25e024efba03620dd121067c731af9d Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 5 Nov 2022 22:37:52 +0000 Subject: [PATCH 1/3] - Update to release 4.9.0 OBS-URL: https://build.opensuse.org/package/show/games/gzdoom?expand=0&rev=88 --- ...ic_assert-to-make-32-bit-builds-fail.patch | 19 +++--- 0001-build-unbreak-compilation-on-Linux.patch | 59 +++++++++++++++++++ 0001-fix-gzdoom.pk3-not-found-error.patch | 36 ----------- g4.8.2.tar.gz | 3 - g4.9.0.tar.gz | 3 + gzdoom-sdlbug.patch | 35 ----------- gzdoom.changes | 11 ++++ gzdoom.spec | 5 +- 8 files changed, 83 insertions(+), 88 deletions(-) create mode 100644 0001-build-unbreak-compilation-on-Linux.patch delete mode 100644 0001-fix-gzdoom.pk3-not-found-error.patch delete mode 100644 g4.8.2.tar.gz create mode 100644 g4.9.0.tar.gz delete mode 100644 gzdoom-sdlbug.patch diff --git a/0001-Revert-use-static_assert-to-make-32-bit-builds-fail.patch b/0001-Revert-use-static_assert-to-make-32-bit-builds-fail.patch index cbc635d..9f5cb7e 100644 --- a/0001-Revert-use-static_assert-to-make-32-bit-builds-fail.patch +++ b/0001-Revert-use-static_assert-to-make-32-bit-builds-fail.patch @@ -5,22 +5,19 @@ Subject: [PATCH] Revert "- use static_assert to make 32 bit builds fail." This reverts commit 8c244f6f850eeb5a5dede7f887f3f1ba87b3d8bc. --- - src/common/engine/i_interface.cpp | 2 -- + src/common/engine/i_interface.cpp | 2 -- 1 file changed, 2 deletions(-) -diff --git a/src/common/engine/i_interface.cpp b/src/common/engine/i_interface.cpp -index 13d35a3a9..217f9212f 100644 ---- a/src/common/engine/i_interface.cpp -+++ b/src/common/engine/i_interface.cpp -@@ -1,8 +1,6 @@ - #include "i_interface.h" - #include "st_start.h" +Index: gzdoom-g4.9.0/src/common/engine/i_interface.cpp +=================================================================== +--- gzdoom-g4.9.0.orig/src/common/engine/i_interface.cpp ++++ gzdoom-g4.9.0/src/common/engine/i_interface.cpp +@@ -5,8 +5,6 @@ + #include "c_cvars.h" + #include "gstrings.h" -static_assert(sizeof(void*) == 8, "32 builds are not supported"); - // Some global engine variables taken out of the backend code. FStartupScreen* StartWindow; SystemCallbacks sysCallbacks; --- -2.36.1 - diff --git a/0001-build-unbreak-compilation-on-Linux.patch b/0001-build-unbreak-compilation-on-Linux.patch new file mode 100644 index 0000000..02b20ee --- /dev/null +++ b/0001-build-unbreak-compilation-on-Linux.patch @@ -0,0 +1,59 @@ +From 040fafaf7260b51031e20d850aa5358c0a7bd9a7 Mon Sep 17 00:00:00 2001 +From: Jan Engelhardt +Date: Sat, 5 Nov 2022 22:30:07 +0100 +Subject: [PATCH] build: unbreak compilation on Linux +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +gzdoom/src/d_anonstats.cpp:14:10: fatal error: i_mainwindow.h: No such file or directory + 14 | #include "i_mainwindow.h" + | ^~~~~~~~~~~~~~~~ +compilation terminated. +make[2]: *** [src/CMakeFiles/zdoom.dir/build.make:1441: src/CMakeFiles/zdoom.dir/d_anonstats.cpp.o] Error 1 +make[2]: *** Waiting for unfinished jobs.... +make[1]: *** [CMakeFiles/Makefile2:959: src/CMakeFiles/zdoom.dir/all] Error 2 +make: *** [Makefile:136: all] Error 2 + +gzdoom/src/d_anonstats.cpp:126:17: error: ‘actor’ was not declared in this scope; did you mean ‘AActor’? + 126 | actor-> return false; // no host, disable + | ^~~~~ + | AActor + +$ find . -name "i_mainw*" +./src/common/platform/win32/i_mainwindow.h +./src/common/platform/win32/i_mainwindow.cpp + +Fixes: g4.5pre-1327-g6670bc09b +Fixes: g4.9pre-359-g082818405 +--- + src/d_anonstats.cpp | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/src/d_anonstats.cpp b/src/d_anonstats.cpp +index 1dcd05824..2e1456259 100644 +--- a/src/d_anonstats.cpp ++++ b/src/d_anonstats.cpp +@@ -11,9 +11,8 @@ void D_ConfirmSendStats() + + #else // !NO_SEND_STATS + +-#include "i_mainwindow.h" +- + #if defined(_WIN32) ++#include "i_mainwindow.h" + #define WIN32_LEAN_AND_MEAN + #include + #include +@@ -121,7 +120,7 @@ bool I_HTTPRequest(const char* request) + bool I_HTTPRequest(const char* request) + { + if ((*sys_statshost)[0] == 0) +- actor-> return false; // no host, disable ++ return false; // no host, disable + + int sockfd, portno, n; + struct sockaddr_in serv_addr; +-- +2.38.0 + diff --git a/0001-fix-gzdoom.pk3-not-found-error.patch b/0001-fix-gzdoom.pk3-not-found-error.patch deleted file mode 100644 index 69a6550..0000000 --- a/0001-fix-gzdoom.pk3-not-found-error.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 0f0b4b7620557410e4969cec6119a7771b8acf35 Mon Sep 17 00:00:00 2001 -From: Omar Polo -Date: Mon, 11 Jul 2022 11:52:43 +0200 -Subject: [PATCH] fix gzdoom.pk3 not found error - -Move the initialization before BaseFileSearch is called, otherwise -GameConfig is used not initialized and it doesn't find the gzdoom.pk3 -file. - -GameConfig used uninitalized was spotted by @LoneFox78. ---- - src/d_main.cpp | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: gzdoom-g4.8.2/src/d_main.cpp -=================================================================== ---- gzdoom-g4.8.2.orig/src/d_main.cpp -+++ gzdoom-g4.8.2/src/d_main.cpp -@@ -3534,6 +3534,8 @@ static int D_DoomMain_Internal (void) - - std::set_new_handler(NewFailure); - const char *batchout = Args->CheckValue("-errorlog"); -+ -+ D_DoomInit(); - - // [RH] Make sure zdoom.pk3 is always loaded, - // as it contains magic stuff we need. -@@ -3568,8 +3570,6 @@ static int D_DoomMain_Internal (void) - - if (!batchrun) Printf(PRINT_LOG, "%s version %s\n", GAMENAME, GetVersionString()); - -- D_DoomInit(); -- - extern void D_ConfirmSendStats(); - D_ConfirmSendStats(); - diff --git a/g4.8.2.tar.gz b/g4.8.2.tar.gz deleted file mode 100644 index ea05dd3..0000000 --- a/g4.8.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4edd60f8094c9dc3dfb7400bdbc0ebb0a5e574b0a6747eee4c8d9f1f6af77127 -size 24247668 diff --git a/g4.9.0.tar.gz b/g4.9.0.tar.gz new file mode 100644 index 0000000..54e243a --- /dev/null +++ b/g4.9.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f4354654ec54e505f37e2766f0f1dc27bd996bab2daf480cac56fd192c855f4 +size 24246263 diff --git a/gzdoom-sdlbug.patch b/gzdoom-sdlbug.patch deleted file mode 100644 index 645576d..0000000 --- a/gzdoom-sdlbug.patch +++ /dev/null @@ -1,35 +0,0 @@ -From: Jan Engelhardt -Date: 2020-06-12 02:05:34.009865606 +0200 - -When a SDL_PollEvent is sandwiched between SDL_CreateWindow and -SDL_CreateRenderer, SDL crashes during SDL_IME_PumpEvents because dbus message -still references the old window (still exists and pointer is non-NULL) and -tries to access members of window->driverdata (block was freed and pointer is -NULL.) - -Workaround this by recreating the SDL_Window object and immediately afterwards -creating the renderer. - -This crash only happens for gzdoom when running with the SoftPoly rasterizer, -as that is the only place that issues SDL_CreateRenderer after the mainloop has -started. - -Needs a bugreport on libsdl.org. - ---- - src/common/platform/posix/sdl/sdlglvideo.cpp | 2 ++ - 1 file changed, 2 insertions(+) - -Index: gzdoom-g4.4.1/src/common/platform/posix/sdl/sdlglvideo.cpp -=================================================================== ---- gzdoom-g4.4.1.orig/src/common/platform/posix/sdl/sdlglvideo.cpp -+++ gzdoom-g4.4.1/src/common/platform/posix/sdl/sdlglvideo.cpp -@@ -294,6 +294,8 @@ uint8_t *I_PolyPresentLock(int w, int h, - { - polyvsync = vsync; - -+ Priv::DestroyWindow(); -+ Priv::CreateWindow(SDL_WINDOW_VULKAN | (Priv::softpolyEnabled ? SDL_WINDOW_HIDDEN : 0)); - polyrendertarget = SDL_CreateRenderer(Priv::window, -1, vsync ? SDL_RENDERER_PRESENTVSYNC : 0); - if (!polyrendertarget) - { diff --git a/gzdoom.changes b/gzdoom.changes index a197041..64eb81b 100644 --- a/gzdoom.changes +++ b/gzdoom.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Sat Nov 5 19:55:42 UTC 2022 - Jan Engelhardt + +- Update to release 4.9.0 + * IQM bone model support + * Textured particles + * The SoftPoly renderer was removed +- Delete gzdoom-sdlbug.diff (obsolete), + 0001-fix-gzdoom.pk3-not-found-error.patch (merged) +- Add 0001-build-unbreak-compilation-on-Linux.patch + ------------------------------------------------------------------- Mon Oct 24 23:24:06 UTC 2022 - Jan Engelhardt diff --git a/gzdoom.spec b/gzdoom.spec index 78d7a3e..4eb2e7a 100644 --- a/gzdoom.spec +++ b/gzdoom.spec @@ -17,7 +17,7 @@ Name: gzdoom -Version: 4.8.2 +Version: 4.9.0 Release: 0 Summary: A DOOM source port with graphic and modding extensions License: GPL-3.0-only @@ -28,10 +28,9 @@ URL: https://zdoom.org/ Source: https://github.com/coelckers/gzdoom/archive/g%version.tar.gz Patch1: gzdoom-waddir.patch Patch2: gzdoom-lzma.patch -Patch4: gzdoom-sdlbug.patch +Patch3: 0001-build-unbreak-compilation-on-Linux.patch Patch5: gzdoom-vulkan.patch Patch6: gzdoom-discord.patch -Patch8: 0001-fix-gzdoom.pk3-not-found-error.patch Patch9: 0001-Revert-use-static_assert-to-make-32-bit-builds-fail.patch BuildRequires: cmake >= 2.8.7 BuildRequires: discord-rpc-devel From 5c248f341a2129eca4f9557cd18d525dbd75bfb2edadded8561afec70f6b8741 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 6 Nov 2022 09:53:50 +0000 Subject: [PATCH 2/3] patch name woes OBS-URL: https://build.opensuse.org/package/show/games/gzdoom?expand=0&rev=89 --- gzdoom.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gzdoom.changes b/gzdoom.changes index 64eb81b..e96100e 100644 --- a/gzdoom.changes +++ b/gzdoom.changes @@ -5,7 +5,7 @@ Sat Nov 5 19:55:42 UTC 2022 - Jan Engelhardt * IQM bone model support * Textured particles * The SoftPoly renderer was removed -- Delete gzdoom-sdlbug.diff (obsolete), +- Delete gzdoom-sdlbug.patch (obsolete), 0001-fix-gzdoom.pk3-not-found-error.patch (merged) - Add 0001-build-unbreak-compilation-on-Linux.patch From 96f3bbd0d4892a167174c5dabf0e797a9819ca83e178fd887825b4f68fb150f7 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sun, 6 Nov 2022 11:14:22 +0000 Subject: [PATCH 3/3] + 0001-removed-some-32bit-only-CMake-code.patch OBS-URL: https://build.opensuse.org/package/show/games/gzdoom?expand=0&rev=90 --- 0001-removed-some-32bit-only-CMake-code.patch | 47 +++++++++++++++++++ gzdoom.changes | 3 +- gzdoom.spec | 1 + 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 0001-removed-some-32bit-only-CMake-code.patch diff --git a/0001-removed-some-32bit-only-CMake-code.patch b/0001-removed-some-32bit-only-CMake-code.patch new file mode 100644 index 0000000..3bce930 --- /dev/null +++ b/0001-removed-some-32bit-only-CMake-code.patch @@ -0,0 +1,47 @@ +From 9e76faff1f93688d035062913cc29b294b831576 Mon Sep 17 00:00:00 2001 +From: Christoph Oelckers +Date: Thu, 20 Oct 2022 21:11:18 +0200 +Subject: [PATCH] - removed some 32bit only CMake code. + +--- + src/CMakeLists.txt | 25 +++++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + +Index: gzdoom-g4.9.0/src/CMakeLists.txt +=================================================================== +--- gzdoom-g4.9.0.orig/src/CMakeLists.txt ++++ gzdoom-g4.9.0/src/CMakeLists.txt +@@ -156,8 +156,33 @@ endif() + + # Decide on SSE setup + ++# SSE only matters on 32-bit targets. We check compiler flags to know if we can do it. ++if( CMAKE_SIZEOF_VOID_P MATCHES "4" AND NOT CMAKE_OSX_ARCHITECTURES MATCHES ppc ) ++ CHECK_CXX_COMPILER_FLAG( "-msse2 -mfpmath=sse" CAN_DO_MFPMATH ) ++ CHECK_CXX_COMPILER_FLAG( -arch:SSE2 CAN_DO_ARCHSSE2 ) ++ if( CAN_DO_MFPMATH ) ++ set( SSE1_ENABLE "-msse -mfpmath=sse" ) ++ set( SSE2_ENABLE "-msse2 -mfpmath=sse" ) ++ elseif( CAN_DO_ARCHSSE2 ) ++ set( SSE1_ENABLE -arch:SSE ) ++ set( SSE2_ENABLE -arch:SSE2 ) ++ endif() ++endif() ++ + if( X64 ) + set( HAVE_MMX 1 ) ++else( X64 ) ++ set( SAFE_CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ) ++ ++ if( DEM_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE ) ++ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmmx") ++ endif( DEM_CMAKE_COMPILER_IS_GNUCXX_COMPATIBLE ) ++ ++ CHECK_CXX_SOURCE_COMPILES("#include ++ int main(void) { __m64 v = _m_from_int(0); }" ++ HAVE_MMX) ++ ++ set( CMAKE_CXX_FLAGS ${SAFE_CMAKE_CXX_FLAGS} ) + endif( X64 ) + + CHECK_CXX_SOURCE_COMPILES("#include diff --git a/gzdoom.changes b/gzdoom.changes index e96100e..c2200b2 100644 --- a/gzdoom.changes +++ b/gzdoom.changes @@ -7,7 +7,8 @@ Sat Nov 5 19:55:42 UTC 2022 - Jan Engelhardt * The SoftPoly renderer was removed - Delete gzdoom-sdlbug.patch (obsolete), 0001-fix-gzdoom.pk3-not-found-error.patch (merged) -- Add 0001-build-unbreak-compilation-on-Linux.patch +- Add 0001-build-unbreak-compilation-on-Linux.patch, + 0001-removed-some-32bit-only-CMake-code.patch ------------------------------------------------------------------- Mon Oct 24 23:24:06 UTC 2022 - Jan Engelhardt diff --git a/gzdoom.spec b/gzdoom.spec index 4eb2e7a..8a886b7 100644 --- a/gzdoom.spec +++ b/gzdoom.spec @@ -31,6 +31,7 @@ Patch2: gzdoom-lzma.patch Patch3: 0001-build-unbreak-compilation-on-Linux.patch Patch5: gzdoom-vulkan.patch Patch6: gzdoom-discord.patch +Patch8: 0001-removed-some-32bit-only-CMake-code.patch Patch9: 0001-Revert-use-static_assert-to-make-32-bit-builds-fail.patch BuildRequires: cmake >= 2.8.7 BuildRequires: discord-rpc-devel