Update LZDoom to 4.14.3a (#13370)

This commit is contained in:
Peppersawce
2025-12-17 01:35:10 +01:00
committed by GitHub
parent 1c2c081647
commit 9da80ca8f1
3 changed files with 114 additions and 305 deletions

View File

@@ -1,10 +1,9 @@
SUMMARY="Advanced Doom source port with lower system requirements"
DESCRIPTION="ZDoom is a family of enhanced ports of the Doom engine for modern operating systems, with many \
new features not found in the games as originally published by id Software.
DESCRIPTION="ZDoom is a family of enhanced ports of the Doom engine for modern operating systems, \
with many new features not found in the games as originally published by id Software.
LZDoom is based on an older version of GZDoom. It does not provide all features \
currently supported by GZDoom but in turn is capable of running the hardware renderer \
on older hardware which does not support modern OpenGL features.
LZDoom is based on GZDoom and UZDoom. It does not provide all current UZDoom features but in turn \
is capable of running the hardware renderer on older hardware which does not support modern OpenGL features.
LZDoom comes with 2 optional UIs, a feature-rich one enabled by installing GTK3, \
and a more lightweight one using KDialog.
@@ -12,22 +11,22 @@ Running LZDoom without installed UIs from command-line will provide a simple .wa
These interfaces require compatible game data (.wad, .pk3 or other) to be present to work properly.
The binaries will look for .wad files in:
* ~/config/non-packaged/data/lzdoom
* ~/config/non-packaged/data/games/lzdoom
* ~/config/non-packaged/data/games/doom
* ~/config/non-packaged/data/doomdata
* ~/config/non-packaged/data/doom
* /boot/system/non-packaged/data/doomdata
* Any compatible game data package
The binaries can be also used via command-line with the -iwad command.
Example: 'LZDoom -iwad /path/to/doom.wad'"
HOMEPAGE="https://zdoom.org/"
COPYRIGHT="
1998-2025 ZDoom + GZDoom, LZDoom teams, and contributors
1998-2025 ZDoom + GZDoom, UZDoom, LZDoom teams, and contributors
1997 id Software, Raven Software, and contributors
"
LICENSE="GNU GPL v3"
REVISION="2"
REVISION="1"
SOURCE_URI="https://github.com/drfrag666/lzdoom/archive/l$portVersion.tar.gz"
CHECKSUM_SHA256="dd4fc8ea2a566cb6b614b1aede39a0cc57a4f9d81b3c0f5e74323e92aea8c05e"
CHECKSUM_SHA256="dbb8dc288bba1f0b14764d76d84250bbdfdb85db25e82cbb2debd5185cb259e8"
SOURCE_DIR="lzdoom-l$portVersion"
PATCHES="lzdoom-$portVersion.patchset"
ADDITIONAL_FILES="lzdoom.rdef.in"
@@ -58,7 +57,7 @@ BUILD_REQUIRES="
devel:libbz2$secondaryArchSuffix
devel:libexecinfo$secondaryArchSuffix
devel:libGL$secondaryArchSuffix # For OpenGL renderer
devel:libgtk_3$secondaryArchSuffix # For GTK3 interface, needed with DYN_GTK=OFF, optional with DYN_GTK=ON, skipped with NO_GTK=ON
devel:libgtk_3$secondaryArchSuffix # For GTK3 interface support
devel:libSDL2_2.0$secondaryArchSuffix
devel:libvpx$secondaryArchSuffix
devel:libzmusic$secondaryArchSuffix
@@ -79,8 +78,8 @@ BUILD()
-DCMAKE_EXE_LINKER_FLAGS="-lbsd -lnetwork" \
-DINSTALL_PATH=$appsDir \
-DINSTALL_DOCS_PATH=$docDir \
-DINSTALL_PK3_PATH=$dataDir/lzdoom \
-DINSTALL_SOUNDFONT_PATH=$dataDir/lzdoom \
-DINSTALL_PK3_PATH=$dataDir/games/lzdoom \
-DINSTALL_SOUNDFONT_PATH=$dataDir/games/lzdoom \
-DVULKAN_USE_XLIB=OFF
make -C build $jobArgs
@@ -91,6 +90,9 @@ INSTALL()
make -C build install
mv $appsDir/lzdoom $appsDir/LZDoom
# Remove *nixy desktop files
rm -r $prefix/share
# Generate the rdef
local APP_SIGNATURE="application/x-vnd.lzdoom"
local MAJOR="`echo "$portVersion" | cut -d. -f1`"

View File

@@ -1,292 +0,0 @@
From c3162d5458aaaf8bd9d632725aff6be56fea5433 Mon Sep 17 00:00:00 2001
From: Peppersawce <michaelpeppers89@yahoo.it>
Date: Sun, 2 Nov 2025 19:05:29 +0100
Subject: Apply fixes taken from GZDoom patches
diff --git a/cmake/FindSDL2.cmake b/cmake/FindSDL2.cmake
index 02c6bba..f57538e 100644
--- a/cmake/FindSDL2.cmake
+++ b/cmake/FindSDL2.cmake
@@ -73,7 +73,8 @@ FIND_PATH(SDL2_INCLUDE_DIR SDL.h
/opt/local # DarwinPorts
/opt/csw # Blastwave
/opt
- /boot/system/develop/headers/SDL2 #Hiaku OS
+ /boot/system/develop/headers/SDL2 #Haiku
+ /boot/system/develop/headers/x86/SDL2 #Haiku x86
)
#MESSAGE("SDL2_INCLUDE_DIR is ${SDL2_INCLUDE_DIR}")
@@ -87,7 +88,8 @@ FIND_LIBRARY(SDL2_LIBRARY_TEMP
/opt/local
/opt/csw
/opt
- /system/lib #Hiaku OS
+ /system/lib #Haiku
+ /system/lib/x86 #Haiku x86
)
#MESSAGE("SDL2_LIBRARY_TEMP is ${SDL2_LIBRARY_TEMP}")
diff --git a/src/common/platform/posix/i_system.h b/src/common/platform/posix/i_system.h
index 02acf0e..d9a42cd 100644
--- a/src/common/platform/posix/i_system.h
+++ b/src/common/platform/posix/i_system.h
@@ -54,6 +54,7 @@ bool I_WriteIniFailed (const char* filename);
class FGameTexture;
bool I_SetCursor(FGameTexture *);
+#ifndef __HAIKU__
static inline char *strlwr(char *str)
{
char *ptr = str;
@@ -64,6 +65,7 @@ static inline char *strlwr(char *str)
}
return str;
}
+#endif
inline int I_GetNumaNodeCount() { return 1; }
inline int I_GetNumaNodeThreadCount(int numaNode) { return std::max<int>(std::thread::hardware_concurrency(), 1); }
diff --git a/src/common/rendering/gl_load/gl_load.c b/src/common/rendering/gl_load/gl_load.c
index e29207f..9db3ed1 100644
--- a/src/common/rendering/gl_load/gl_load.c
+++ b/src/common/rendering/gl_load/gl_load.c
@@ -18,7 +18,7 @@ static void* AppleGLGetProcAddress (const char *name)
#endif /* __APPLE__ */
/* BEGINNING OF MANUAL CHANGES, DO NOT REMOVE! */
-#if defined(__sgi) || defined (__sun) || defined(__unix__)
+#if defined(__sgi) || defined (__sun) || defined(__unix__) || defined(__HAIKU__)
#include <dlfcn.h>
#include <stdio.h>
@@ -125,7 +125,7 @@ static PROC WinGetProcAddress(const char *name)
#if defined(__APPLE__)
#define IntGetProcAddress(name) AppleGLGetProcAddress(name)
#else
- #if defined(__sgi) || defined(__sun) || defined(__unix__)
+ #if defined(__sgi) || defined(__sun) || defined(__unix__) || defined(__HAIKU__)
void* SDL_GL_GetProcAddress(const char* proc);
#define IntGetProcAddress(name) SDL_GL_GetProcAddress((const char*)name)
//#define IntGetProcAddress(name) PosixGetProcAddress((const GLubyte*)name)
diff --git a/src/common/utility/gitinfo.cpp b/src/common/utility/gitinfo.cpp
index 4ef00dc..111c05c 100644
--- a/src/common/utility/gitinfo.cpp
+++ b/src/common/utility/gitinfo.cpp
@@ -54,12 +54,12 @@ const char *GetGitTime()
const char *GetVersionString()
{
- if (GetGitDescription()[0] == '\0')
+ //if (GetGitDescription()[0] == '\0')
{
return VERSIONSTR;
}
- else
+ /*else
{
return GIT_DESCRIPTION;
- }
+ }*/
}
diff --git a/src/gameconfigfile.cpp b/src/gameconfigfile.cpp
index 15a03f8..dd18c16 100644
--- a/src/gameconfigfile.cpp
+++ b/src/gameconfigfile.cpp
@@ -107,6 +107,14 @@ FGameConfigFile::FGameConfigFile ()
SetSection ("IWADSearch.Directories", true);
SetValueForKey ("Path", ".", true);
SetValueForKey ("Path", "$DOOMWADDIR", true);
+ SetValueForKey ("Path", "$HOME/config/non-packaged/data/doomdata", true);
+ SetValueForKey ("Path", "$HOME/config/non-packaged/data/doom", true);
+ SetValueForKey ("Path", "$HOME/config/non-packaged/data/lzdoom", true);
+ SetValueForKey ("Path", "/boot/system/data/doomdata", true);
+ SetValueForKey ("Path", "/boot/system/data/lzdoom", true);
+ SetValueForKey ("Path", "/boot/system/non-packaged/data/doomdata", true);
+ SetValueForKey ("Path", "$HOME/config/data/doomdata", true);
+ SetValueForKey ("Path", "$HOME/config/data/lzdoom", true);
#ifdef __APPLE__
SetValueForKey ("Path", user_docs.GetChars(), true);
SetValueForKey ("Path", user_app_support.GetChars(), true);
@@ -132,6 +140,14 @@ FGameConfigFile::FGameConfigFile ()
if (!SetSection ("FileSearch.Directories"))
{
SetSection ("FileSearch.Directories", true);
+ SetValueForKey ("Path", "$HOME/config/non-packaged/data/doomdata", true);
+ SetValueForKey ("Path", "$HOME/config/non-packaged/data/doom", true);
+ SetValueForKey ("Path", "$HOME/config/non-packaged/data/lzdoom", true);
+ SetValueForKey ("Path", "/boot/system/data/doomdata", true);
+ SetValueForKey ("Path", "/boot/system/data/lzdoom", true);
+ SetValueForKey ("Path", "/boot/system/non-packaged/data/doomdata", true);
+ SetValueForKey ("Path", "$HOME/config/data/doomdata", true);
+ SetValueForKey ("Path", "$HOME/config/data/lzdoom", true);
#ifdef __APPLE__
SetValueForKey ("Path", user_docs.GetChars(), true);
SetValueForKey ("Path", user_app_support.GetChars(), true);
@@ -155,6 +171,10 @@ FGameConfigFile::FGameConfigFile ()
if (!SetSection("SoundfontSearch.Directories"))
{
SetSection("SoundfontSearch.Directories", true);
+ SetValueForKey ("Path", "/boot/system/data/lzdoom/soundfonts", true);
+ SetValueForKey ("Path", "/boot/system/data/lzdoom/fm_banks", true);
+ SetValueForKey ("Path", "$HOME/config/data/lzdoom/soundfonts", true);
+ SetValueForKey ("Path", "$HOME/config/data/lzdoom/fm_banks", true);
#ifdef __APPLE__
SetValueForKey("Path", (user_docs + "/soundfonts").GetChars(), true);
SetValueForKey("Path", (user_docs + "/fm_banks").GetChars(), true);
diff --git a/src/version.h b/src/version.h
index 9f8326f..becd527 100644
--- a/src/version.h
+++ b/src/version.h
@@ -107,6 +107,8 @@ const char *GetVersionString();
#if defined(__APPLE__) || defined(_WIN32)
#define GAME_DIR GAMENAME
+#elif defined(__HAIKU__)
+#define GAME_DIR "config/settings/" GAMENAME
#else
#define GAME_DIR ".config/" GAMENAMELOWERCASE
#endif
--
2.51.0
From b6bd9498c2313411858bdfe3b8828423fb63270a Mon Sep 17 00:00:00 2001
From: Peppersawce <michaelpeppers89@yahoo.it>
Date: Sun, 2 Nov 2025 19:55:54 +0100
Subject: More patches ported from GZDoom
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c074c4c..255096a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -309,7 +309,7 @@ else()
# If we're compiling with a custom GCC on the Mac (which we know since g++-4.2 doesn't support C++11) statically link libgcc.
set( ALL_C_FLAGS "-static-libgcc" )
endif()
- elseif( NOT MINGW )
+ elseif( NOT MINGW AND NOT HAIKU)
# Generic GCC/Clang requires position independent executable to be enabled explicitly
set( ALL_C_FLAGS "${ALL_C_FLAGS} -fPIE" )
set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie" )
diff --git a/libraries/ZVulkan/CMakeLists.txt b/libraries/ZVulkan/CMakeLists.txt
index 3b47b7b..4cd7133 100644
--- a/libraries/ZVulkan/CMakeLists.txt
+++ b/libraries/ZVulkan/CMakeLists.txt
@@ -188,7 +188,11 @@ if(WIN32)
add_definitions(-DUNICODE -D_UNICODE)
else()
set(ZVULKAN_SOURCES ${ZVULKAN_SOURCES} ${ZVULKAN_UNIX_SOURCES})
- set(ZVULKAN_LIBS ${CMAKE_DL_LIBS} -ldl)
+ if(NOT HAIKU)
+ set(ZVULKAN_LIBS ${CMAKE_DL_LIBS} -ldl)
+ else()
+ set(ZVULKAN_LIBS ${CMAKE_DL_LIBS})
+ endif()
add_definitions(-DUNIX -D_UNIX)
add_link_options(-pthread)
endif()
diff --git a/src/common/engine/i_specialpaths.h b/src/common/engine/i_specialpaths.h
index 01710b6..fb75230 100644
--- a/src/common/engine/i_specialpaths.h
+++ b/src/common/engine/i_specialpaths.h
@@ -2,7 +2,7 @@
#include "zstring.h"
-#ifdef __unix__
+#if defined(__unix__) || defined(__HAIKU__)
FString GetUserFile (const char *path);
#endif
FString M_GetAppDataPath(bool create);
--
2.51.0
From 9d93eebe1e098b45807bcc247015e43ba7333c12 Mon Sep 17 00:00:00 2001
From: Peppersawce <michaelpeppers89@yahoo.it>
Date: Mon, 3 Nov 2025 12:54:32 +0100
Subject: Replaxe xdg-open with open
diff --git a/src/common/platform/posix/sdl/i_system.cpp b/src/common/platform/posix/sdl/i_system.cpp
index 58a6a2f..dd2b659 100644
--- a/src/common/platform/posix/sdl/i_system.cpp
+++ b/src/common/platform/posix/sdl/i_system.cpp
@@ -452,7 +452,11 @@ void I_OpenShellFolder(const char* infolder)
if (!chdir(infolder))
{
Printf("Opening folder: %s\n", infolder);
- std::system("xdg-open .");
+ #ifdef __HAIKU__
+ std::system("open .");
+ #else
+ std::system("xdg-open .");
+ #endif
chdir(curdir);
}
else
--
2.51.0
From d7f391fc77737a4365a9b18a29ece72b9aef5a15 Mon Sep 17 00:00:00 2001
From: Peppersawce <michaelpeppers89@yahoo.it>
Date: Wed, 12 Nov 2025 11:38:16 +0100
Subject: Fix build for x86
diff --git a/src/common/platform/posix/sdl/sdlglvideo.cpp b/src/common/platform/posix/sdl/sdlglvideo.cpp
index 6f1de4b..2992a21 100644
--- a/src/common/platform/posix/sdl/sdlglvideo.cpp
+++ b/src/common/platform/posix/sdl/sdlglvideo.cpp
@@ -452,7 +452,7 @@ DFrameBuffer *SDLVideo::CreateFrameBuffer ()
builder.RequireExtension(names[i]);
auto instance = builder.Create();
- VkSurfaceKHR surfacehandle = nullptr;
+ VkSurfaceKHR surfacehandle = VK_NULL_HANDLE;
if (!I_CreateVulkanSurface(instance->Instance, &surfacehandle))
VulkanError("I_CreateVulkanSurface failed");
--
2.51.0
From a7d5831d3d6e2ac894e75ab3f9d66eb5941f51b1 Mon Sep 17 00:00:00 2001
From: Peppersawce <michaelpeppers89@yahoo.it>
Date: Wed, 12 Nov 2025 18:26:28 +0100
Subject: Default video backend to Softpoly (vid_preferbackend 2)
And rendermode to True-Color Software Rendering (vid_rendermode 1)
diff --git a/src/common/rendering/v_video.cpp b/src/common/rendering/v_video.cpp
index d58dd2c..d5dee82 100644
--- a/src/common/rendering/v_video.cpp
+++ b/src/common/rendering/v_video.cpp
@@ -94,7 +94,7 @@ CUSTOM_CVAR(Int, vid_maxfps, 200, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
}
}
-CUSTOM_CVAR(Int, vid_preferbackend, 3, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
+CUSTOM_CVAR(Int, vid_preferbackend, 2, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
{
// [SP] This may seem pointless - but I don't want to implement live switching just
// yet - I'm pretty sure it's going to require a lot of reinits and destructions to
diff --git a/src/d_main.cpp b/src/d_main.cpp
index 4214f75..1522af8 100644
--- a/src/d_main.cpp
+++ b/src/d_main.cpp
@@ -227,7 +227,7 @@ CUSTOM_CVAR(Float, i_timescale, 1.0f, CVAR_NOINITCALL | CVAR_VIRTUAL)
// PUBLIC DATA DEFINITIONS -------------------------------------------------
#ifndef NO_SWRENDERER
-CUSTOM_CVAR(Int, vid_rendermode, 4, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
+CUSTOM_CVAR(Int, vid_rendermode, 1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
{
if (self < 0 || self > 4)
{
--
2.51.0

View File

@@ -0,0 +1,99 @@
From f5ce1b02c36137421a4b8769969810fed629e150 Mon Sep 17 00:00:00 2001
From: Peppersawce <michaelpeppers89@yahoo.it>
Date: Tue, 16 Dec 2025 01:11:55 +0100
Subject: Add some more paths
diff --git a/src/gameconfigfile.cpp b/src/gameconfigfile.cpp
index 7b7f2d3..62e1461 100644
--- a/src/gameconfigfile.cpp
+++ b/src/gameconfigfile.cpp
@@ -144,6 +144,9 @@ FGameConfigFile::FGameConfigFile ()
SetValueForKey ("Path", "$HOME/config/data/games/" GAMENAMELOWERCASE, true);
SetValueForKey ("Path", "$HOME/config/data/games/doom", true);
SetValueForKey ("Path", "$HOME/config/data/doom", true);
+ SetValueForKey ("Path", dataDir + "/doomdata", true);
+ SetValueForKey ("Path", SHARE_DIR "/doomdata", true);
+ SetValueForKey ("Path", "$HOME/config/data/doomdata", true);
#else
SetValueForKey ("Path", "/usr/share/games/" GAMENAMELOWERCASE, true);
SetValueForKey ("Path", "/usr/share/games/doom", true);
@@ -181,6 +184,9 @@ FGameConfigFile::FGameConfigFile ()
SetValueForKey ("Path", "$HOME/config/data/games/" GAMENAMELOWERCASE, true);
SetValueForKey ("Path", "$HOME/config/data/games/doom", true);
SetValueForKey ("Path", "$HOME/config/data/doom", true);
+ SetValueForKey ("Path", dataDir + "/doomdata", true);
+ SetValueForKey ("Path", SHARE_DIR "/doomdata", true);
+ SetValueForKey ("Path", "$HOME/config/data/doomdata", true);
#else
SetValueForKey ("Path", "/usr/share/games/" GAMENAMELOWERCASE, true);
SetValueForKey ("Path", "/usr/share/games/doom", true);
--
2.51.0
From 25d4a6f996f2473560cf62dfd4198781745ef6d4 Mon Sep 17 00:00:00 2001
From: Peppersawce <michaelpeppers89@yahoo.it>
Date: Tue, 16 Dec 2025 01:25:53 +0100
Subject: Default video backend to Softpoly (vid_preferbackend 2) and rendermode to True-Color Software Rendering (vid_rendermode 1)
diff --git a/src/common/rendering/v_video.cpp b/src/common/rendering/v_video.cpp
index 40280e7..2a561ae 100644
--- a/src/common/rendering/v_video.cpp
+++ b/src/common/rendering/v_video.cpp
@@ -102,7 +102,7 @@ CUSTOM_CVAR(Int, vid_maxfps, 500, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
}
}
-CUSTOM_CVAR(Int, vid_preferbackend, 3, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
+CUSTOM_CVAR(Int, vid_preferbackend, 2, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
{
// [SP] This may seem pointless - but I don't want to implement live switching just
// yet - I'm pretty sure it's going to require a lot of reinits and destructions to
diff --git a/src/d_main.cpp b/src/d_main.cpp
index b489150..61106a0 100644
--- a/src/d_main.cpp
+++ b/src/d_main.cpp
@@ -228,7 +228,7 @@ CUSTOM_CVAR(Float, i_timescale, 1.0f, CVAR_NOINITCALL | CVAR_VIRTUAL)
// PUBLIC DATA DEFINITIONS -------------------------------------------------
#ifndef NO_SWRENDERER
-CUSTOM_CVAR(Int, vid_rendermode, 4, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
+CUSTOM_CVAR(Int, vid_rendermode, 1, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
{
if (self < 0 || self > 4)
{
--
2.51.0
From a1dbc8a16740fe1f19f588853619219b3e4601f4 Mon Sep 17 00:00:00 2001
From: Peppersawce <michaelpeppers89@yahoo.it>
Date: Tue, 16 Dec 2025 01:41:51 +0100
Subject: Disable git version string
diff --git a/src/common/utility/gitinfo.cpp b/src/common/utility/gitinfo.cpp
index 4ef00dc..111c05c 100644
--- a/src/common/utility/gitinfo.cpp
+++ b/src/common/utility/gitinfo.cpp
@@ -54,12 +54,12 @@ const char *GetGitTime()
const char *GetVersionString()
{
- if (GetGitDescription()[0] == '\0')
+ //if (GetGitDescription()[0] == '\0')
{
return VERSIONSTR;
}
- else
+ /*else
{
return GIT_DESCRIPTION;
- }
+ }*/
}
--
2.51.0