From 9f300ab9b8893b22af4f99fd3b808a1c5e418dff Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 29 Oct 2025 07:25:45 -0600 Subject: [PATCH] love: fix compilation --- recipes/wip/games/other/love/recipe.toml | 6 ++--- recipes/wip/games/other/love/redox.patch | 33 +++++++++++++++--------- 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/recipes/wip/games/other/love/recipe.toml b/recipes/wip/games/other/love/recipe.toml index e91b4d719..c4fd36f5b 100644 --- a/recipes/wip/games/other/love/recipe.toml +++ b/recipes/wip/games/other/love/recipe.toml @@ -68,8 +68,8 @@ COOKBOOK_CONFIGURE_FLAGS=( -DCMAKE_VERBOSE_MAKEFILE=ON -DOPENGL_opengl_LIBRARY="/dev/null" -DOPENGL_glx_LIBRARY="/dev/null" - #TODO: This is a hack to add more libraries - -DCMAKE_CXX_STANDARD_LIBRARIES="${LIBS[*]}" + -DSDL2_INCLUDE_DIRS="${COOKBOOK_SYSROOT}/include/SDL2" + -DSDL2_LIBRARIES="${LIBS[*]}" "${COOKBOOK_SOURCE}" ) "${COOKBOOK_CONFIGURE}" "${COOKBOOK_CONFIGURE_FLAGS[@]}" @@ -77,4 +77,4 @@ COOKBOOK_CONFIGURE_FLAGS=( # make install not possible, just copy love mkdir -pv "${COOKBOOK_STAGE}/usr/bin" cp -v love "${COOKBOOK_STAGE}/usr/bin/love" -""" \ No newline at end of file +""" diff --git a/recipes/wip/games/other/love/redox.patch b/recipes/wip/games/other/love/redox.patch index 08c6e49d4..c02f25d24 100644 --- a/recipes/wip/games/other/love/redox.patch +++ b/recipes/wip/games/other/love/redox.patch @@ -1,7 +1,18 @@ -diff --git a/src/common/config.h b/src/common/config.h -index 5679849c..2188d8e5 100644 ---- a/src/common/config.h -+++ b/src/common/config.h +diff -ruwN source-old/CMakeLists.txt source/CMakeLists.txt +--- source-old/CMakeLists.txt 2023-12-03 05:44:36.000000000 -0700 ++++ source/CMakeLists.txt 2025-10-29 07:23:56.896601947 -0600 +@@ -188,7 +188,7 @@ + find_package(ModPlug REQUIRED) + find_package(OpenAL REQUIRED) + find_package(OpenGL REQUIRED) +- find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2main) ++ #find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2main) + find_package(Theora REQUIRED) + find_package(Vorbis REQUIRED) + find_package(ZLIB REQUIRED) +diff -ruwN source-old/src/common/config.h source/src/common/config.h +--- source-old/src/common/config.h 2023-12-03 05:44:36.000000000 -0700 ++++ source/src/common/config.h 2025-10-28 18:38:57.870055872 -0600 @@ -48,7 +48,7 @@ # define LOVE_MACOSX 1 # endif @@ -11,10 +22,9 @@ index 5679849c..2188d8e5 100644 // I know it's not linux, but it seems most "linux-only" code is bsd-compatible # define LOVE_LINUX 1 #endif -diff --git a/src/libraries/luasocket/libluasocket/compat.c b/src/libraries/luasocket/libluasocket/compat.c -index c2d99cb2..d887d5e1 100644 ---- a/src/libraries/luasocket/libluasocket/compat.c -+++ b/src/libraries/luasocket/libluasocket/compat.c +diff -ruwN source-old/src/libraries/luasocket/libluasocket/compat.c source/src/libraries/luasocket/libluasocket/compat.c +--- source-old/src/libraries/luasocket/libluasocket/compat.c 2023-12-03 05:44:36.000000000 -0700 ++++ source/src/libraries/luasocket/libluasocket/compat.c 2025-10-28 18:38:57.870118680 -0600 @@ -1,6 +1,6 @@ #include "compat.h" @@ -23,10 +33,9 @@ index c2d99cb2..d887d5e1 100644 /* ** Adapted from Lua 5.2 */ -diff --git a/src/libraries/luasocket/libluasocket/compat.h b/src/libraries/luasocket/libluasocket/compat.h -index 7bf8010e..5ae2853f 100644 ---- a/src/libraries/luasocket/libluasocket/compat.h -+++ b/src/libraries/luasocket/libluasocket/compat.h +diff -ruwN source-old/src/libraries/luasocket/libluasocket/compat.h source/src/libraries/luasocket/libluasocket/compat.h +--- source-old/src/libraries/luasocket/libluasocket/compat.h 2023-12-03 05:44:36.000000000 -0700 ++++ source/src/libraries/luasocket/libluasocket/compat.h 2025-10-28 18:38:57.870166330 -0600 @@ -4,7 +4,7 @@ #include "lua.h" #include "lauxlib.h"