Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gzdoom: only build for 64-bit architectures #52

Merged
merged 1 commit into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion games/gzdoom/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ PKG_LICENSE_FILES:=COPYING LICENSE

CMAKE_INSTALL:=1
PKG_BUILD_DEPENDS:=gzdoom/host vulkan-loader
PKG_BUILD_FLAGS:=no-mips16

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/host-build.mk
Expand All @@ -32,12 +33,14 @@ CMAKE_OPTIONS += \
-DVULKAN_USE_XLIB=OFF \
-DVULKAN_USE_WAYLAND=ON

TARGET_LDFLAGS += -latomic

define Package/gzdoom
SECTION:=games
CATEGORY:=Games
TITLE:=GZDoom
URL:=https://zdoom.org/
DEPENDS:=+alsa-lib +glib2 +libbz2 +libstdcpp +libzmusic +libvpx +libsdl2 +USE_MUSL:musl-fts
DEPENDS:=+alsa-lib +glib2 +libatomic +libbz2 +libstdcpp +libzmusic +libvpx +libsdl2 +USE_MUSL:musl-fts @(ARCH_64BIT||BROKEN)
endef

define Package/gzdoom/description
Expand Down
11 changes: 11 additions & 0 deletions games/gzdoom/patches/998-fix-vulkan-on-32-bit-platforms
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/src/common/platform/posix/sdl/sdlglvideo.cpp
+++ b/src/common/platform/posix/sdl/sdlglvideo.cpp
@@ -400,7 +400,7 @@ DFrameBuffer *SDLVideo::CreateFrameBuffe
builder.RequireExtension(names[i]);
auto instance = builder.Create();

- VkSurfaceKHR surfacehandle = nullptr;
+ VkSurfaceKHR surfacehandle = (VkSurfaceKHR)nullptr;
if (!I_CreateVulkanSurface(instance->Instance, &surfacehandle))
VulkanError("I_CreateVulkanSurface failed");

23 changes: 23 additions & 0 deletions games/gzdoom/patches/999-remove-64bit-assertion.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--- a/src/common/engine/i_interface.cpp
+++ b/src/common/engine/i_interface.cpp
@@ -6,13 +6,13 @@
#include "gstrings.h"
#include "version.h"

-static_assert(sizeof(void*) == 8,
- "Only LP64/LLP64 builds are officially supported. "
- "Please do not attempt to build for other platforms; "
- "even if the program succeeds in a MAP01 smoke test, "
- "there are e.g. known visual artifacts "
- "<https://forum.zdoom.org/viewtopic.php?f=7&t=75673> "
- "that lead to a bad user experience.");
+//static_assert(sizeof(void*) == 8,
+// "Only LP64/LLP64 builds are officially supported. "
+// "Please do not attempt to build for other platforms; "
+// "even if the program succeeds in a MAP01 smoke test, "
+// "there are e.g. known visual artifacts "
+// "<https://forum.zdoom.org/viewtopic.php?f=7&t=75673> "
+// "that lead to a bad user experience.");

// Some global engine variables taken out of the backend code.
FStartupScreen* StartWindow;
Loading