Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
cookbook
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
redox-os
cookbook
Commits
3edc093b
Verified
Commit
3edc093b
authored
3 months ago
by
Jeremy Soller
Browse files
Options
Downloads
Patches
Plain Diff
Add love
parent
3ff6cdb7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
recipes/wip/games/other/love/recipe.toml
+79
-0
79 additions, 0 deletions
recipes/wip/games/other/love/recipe.toml
recipes/wip/games/other/love/redox.patch
+38
-0
38 additions, 0 deletions
recipes/wip/games/other/love/redox.patch
with
117 additions
and
0 deletions
recipes/wip/games/other/love/recipe.toml
0 → 100644
+
79
−
0
View file @
3edc093b
[source]
tar
=
"https://github.com/love2d/love/archive/refs/tags/11.5.tar.gz"
blake3
=
"1fe441b04af1c0aa12b5d12f274fd892e6f307bcc882888c3a1ec048294a25c7"
patches
=
[
"redox.patch"
]
[build]
template
=
"custom"
dependencies
=
[
"freetype2"
,
"libmodplug1"
,
"libogg"
,
"liborbital"
,
"libpng"
,
"libtheora"
,
"libvorbis"
,
"llvm18"
,
"luajit"
,
"openal"
,
"mesa"
,
"mpg123"
,
"sdl2"
,
"zlib"
,
]
script
=
"""
export CFLAGS="${CFLAGS} -I${COOKBOOK_SYSROOT}/include -I${COOKBOOK_SYSROOT}/include/SDL2"
export CXXFLAGS="${CXXFLAGS} -I${COOKBOOK_SYSROOT}/include -I${COOKBOOK_SYSROOT}/include/SDL2"
cat > redox.cmake <<EOF
# the name of the target operating system
set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_SYSTEM_PROCESSOR "${TARGET%%-*}")
# which compilers to use for C and C++
set(CMAKE_C_COMPILER "${TARGET}-gcc")
set(CMAKE_CXX_COMPILER "${TARGET}-g++")
# where is the target environment located
set(CMAKE_FIND_ROOT_PATH "${COOKBOOK_SYSROOT}")
# adjust the default behavior of the FIND_XXX() commands:
# search programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# search headers, libraries, and packages in the target environment
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
EOF
LIBS=(
$("${TARGET}-pkg-config" --libs libpng16)
$("${TARGET}-pkg-config" --libs vorbis)
-lSDL2
-lorbital
$("${TARGET}-pkg-config" --libs osmesa)
-lstdc++
)
COOKBOOK_CONFIGURE="cmake"
COOKBOOK_CONFIGURE_FLAGS=(
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX="/usr"
-DCMAKE_PREFIX_PATH="${COOKBOOK_SYSROOT}"
-DCMAKE_TOOLCHAIN_FILE=redox.cmake
-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[*]}"
"${COOKBOOK_SOURCE}"
)
"${COOKBOOK_CONFIGURE}" "${COOKBOOK_CONFIGURE_FLAGS[@]}"
"${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}"
# make install not possible, just copy love
mkdir -pv "${COOKBOOK_STAGE}/usr/bin"
cp -v love "${COOKBOOK_STAGE}/usr/bin/love"
"""
This diff is collapsed.
Click to expand it.
recipes/wip/games/other/love/redox.patch
0 → 100644
+
38
−
0
View file @
3edc093b
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
@@ -48,7 +48,7 @@
# define LOVE_MACOSX 1
# endif
#endif
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined (__redox__)
// 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
@@ -1,6 +1,6 @@
#include "compat.h"
-#if LUA_VERSION_NUM==501
+#if LUA_VERSION_NUM==501 && !defined(__redox__)
/*
** 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
@@ -4,7 +4,7 @@
#include "lua.h"
#include "lauxlib.h"
-#if LUA_VERSION_NUM==501
+#if LUA_VERSION_NUM==501 && !defined(__redox__)
void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup);
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment