From dadf595b85bb7aca9a97caf995b45a984973d20b Mon Sep 17 00:00:00 2001 From: Ribbon Date: Fri, 7 Aug 2026 22:50:19 -0300 Subject: [PATCH] Add recipes --- recipes/wip/demos/franken-solver/recipe.toml | 6 + recipes/wip/demos/rs-cube/recipe.toml | 6 + recipes/wip/demos/topcat/recipe.toml | 7 + recipes/wip/dev/git-tools/drydock/recipe.toml | 7 + recipes/wip/emu/win/boxedwine64/recipe.toml | 30 +++ recipes/wip/emu/win/boxedwine64/redox.patch | 190 ++++++++++++++++++ recipes/wip/games/other/nbsdgames/recipe.toml | 16 ++ recipes/wip/games/puzzle/hsc/recipe.toml | 14 ++ recipes/wip/games/sim/termfarm/recipe.toml | 6 + .../wip/games/strategy/chessterm/recipe.toml | 6 + .../games/strategy/rusty-checkers/recipe.toml | 6 + recipes/wip/sci/papr/recipe.toml | 11 + recipes/wip/security/pass-tui/recipe.toml | 8 + recipes/wip/sys/crust-ui/recipe.toml | 6 + recipes/wip/text/mkd/recipe.toml | 6 + 15 files changed, 325 insertions(+) create mode 100644 recipes/wip/demos/franken-solver/recipe.toml create mode 100644 recipes/wip/demos/rs-cube/recipe.toml create mode 100644 recipes/wip/demos/topcat/recipe.toml create mode 100644 recipes/wip/dev/git-tools/drydock/recipe.toml create mode 100644 recipes/wip/emu/win/boxedwine64/recipe.toml create mode 100644 recipes/wip/emu/win/boxedwine64/redox.patch create mode 100644 recipes/wip/games/other/nbsdgames/recipe.toml create mode 100644 recipes/wip/games/puzzle/hsc/recipe.toml create mode 100644 recipes/wip/games/sim/termfarm/recipe.toml create mode 100644 recipes/wip/games/strategy/chessterm/recipe.toml create mode 100644 recipes/wip/games/strategy/rusty-checkers/recipe.toml create mode 100644 recipes/wip/sci/papr/recipe.toml create mode 100644 recipes/wip/security/pass-tui/recipe.toml create mode 100644 recipes/wip/sys/crust-ui/recipe.toml create mode 100644 recipes/wip/text/mkd/recipe.toml diff --git a/recipes/wip/demos/franken-solver/recipe.toml b/recipes/wip/demos/franken-solver/recipe.toml new file mode 100644 index 000000000..6f3ba2800 --- /dev/null +++ b/recipes/wip/demos/franken-solver/recipe.toml @@ -0,0 +1,6 @@ +#TODO compile and test +[source] +git = "https://github.com/prp/franken-solver" +shallow_clone = true +[build] +template = "cargo" diff --git a/recipes/wip/demos/rs-cube/recipe.toml b/recipes/wip/demos/rs-cube/recipe.toml new file mode 100644 index 000000000..905672677 --- /dev/null +++ b/recipes/wip/demos/rs-cube/recipe.toml @@ -0,0 +1,6 @@ +#TODO compile and test +[source] +git = "https://github.com/doprz/rs-cube" +shallow_clone = true +[build] +template = "cargo" diff --git a/recipes/wip/demos/topcat/recipe.toml b/recipes/wip/demos/topcat/recipe.toml new file mode 100644 index 000000000..e8718651b --- /dev/null +++ b/recipes/wip/demos/topcat/recipe.toml @@ -0,0 +1,7 @@ +#TODO compile and test +[source] +git = "https://github.com/tokio-rs/topcoat" +shallow_clone = true +[build] +template = "cargo" +cargopackages = ["hello-world"] diff --git a/recipes/wip/dev/git-tools/drydock/recipe.toml b/recipes/wip/dev/git-tools/drydock/recipe.toml new file mode 100644 index 000000000..5ba8b47a6 --- /dev/null +++ b/recipes/wip/dev/git-tools/drydock/recipe.toml @@ -0,0 +1,7 @@ +#TODO compile and test +[source] +git = "https://github.com/yetidevworks/drydock" +shallow_clone = true +[build] +template = "cargo" +cargopackages = ["drydock"] diff --git a/recipes/wip/emu/win/boxedwine64/recipe.toml b/recipes/wip/emu/win/boxedwine64/recipe.toml new file mode 100644 index 000000000..c54f7b8d8 --- /dev/null +++ b/recipes/wip/emu/win/boxedwine64/recipe.toml @@ -0,0 +1,30 @@ +#TODO verify possible patch conflict +[source] +git = "https://github.com/andrewnakas/Boxedwine64" +rev = "dee2ff3f08d9b5bdfe78c15bdefbf8f89b4f1639" +shallow_clone = true +patches = [ + "redox.patch" +] +[build] +template = "custom" +dependencies = [ + "curl", + "mesa", + "minizip-ng", + "openssl3", + "sdl2", +] +dev-dependencies = [ + "mesa-glu", +] +script = """ +DYNAMIC_INIT +export CPPFLAGS+=" -DUSE_FILE32API=1 -DBOXEDWINE_64=1 -D_GNU_SOURCE=1 -DGLEW_OSMESA=1 -DBOXEDWINE_ES=1" +rsync -a "${COOKBOOK_SOURCE}/" ./ +cd "./project/linux" +make release + +mkdir -p "${COOKBOOK_STAGE}/usr/bin" +cp -v "./Build/Release/boxedwine" "${COOKBOOK_STAGE}/usr/bin/boxedwine" +""" diff --git a/recipes/wip/emu/win/boxedwine64/redox.patch b/recipes/wip/emu/win/boxedwine64/redox.patch new file mode 100644 index 000000000..6b1740135 --- /dev/null +++ b/recipes/wip/emu/win/boxedwine64/redox.patch @@ -0,0 +1,190 @@ +diff --git a/include/platformBoxedwine.h b/include/platformBoxedwine.h +index b7a798d6..6ab00a3e 100644 +--- a/include/platformBoxedwine.h ++++ b/include/platformBoxedwine.h +@@ -30,7 +30,7 @@ + #include "platformtypes.h" + #define FD S32 + +-#ifdef __APPLE__ ++#if defined(USE_FILE32API) + #define lseek64 lseek + #endif + +diff --git a/lib/asmjit/asmjit/core/api-build_p.h b/lib/asmjit/asmjit/core/api-build_p.h +index 2de68d25..d0b56889 100644 +--- a/lib/asmjit/asmjit/core/api-build_p.h ++++ b/lib/asmjit/asmjit/core/api-build_p.h +@@ -40,7 +40,8 @@ + defined(__DragonFly__) || \ + defined(__FreeBSD__ ) || \ + defined(__NetBSD__ ) || \ +- defined(__OpenBSD__ ) ++ defined(__OpenBSD__ ) || \ ++ defined(__redox__ ) + #define ASMJIT_FILE64_API(NAME) NAME + #else + #define ASMJIT_FILE64_API(NAME) NAME##64 +diff --git a/lib/glew/src/glew.cpp b/lib/glew/src/glew.cpp +index d19534c6..994db49d 100644 +--- a/lib/glew/src/glew.cpp ++++ b/lib/glew/src/glew.cpp +@@ -38,6 +38,7 @@ + + #if defined(GLEW_OSMESA) + # define GLAPI extern ++# define APIENTRY + # include + #elif defined(GLEW_EGL) + # include +diff --git a/lib/imgui/imgui_draw.cpp b/lib/imgui/imgui_draw.cpp +index 69d18945..d6835166 100644 +--- a/lib/imgui/imgui_draw.cpp ++++ b/lib/imgui/imgui_draw.cpp +@@ -36,7 +36,7 @@ Index of this file: + + #include // vsnprintf, sscanf, printf + #if !defined(alloca) +-#if defined(__GLIBC__) || defined(__sun) || defined(__CYGWIN__) || defined(__APPLE__) || defined(__SWITCH__) ++#if defined(__GLIBC__) || defined(__sun) || defined(__CYGWIN__) || defined(__APPLE__) || defined(__redox__) || defined(__SWITCH__) + #include // alloca (glibc uses . Note that Cygwin may have _WIN32 defined, so the order matters here) + #elif defined(_WIN32) + #include // alloca +diff --git a/lib/simde/simde/simde-math.h b/lib/simde/simde/simde-math.h +index d18bf4f9..ebecd1c0 100644 +--- a/lib/simde/simde/simde-math.h ++++ b/lib/simde/simde/simde-math.h +@@ -1285,9 +1285,7 @@ simde_math_fpclass(double v, const int imm8) { + #endif + + #if !defined(simde_math_roundevenf) +- #if \ +- ((!defined(HEDLEY_EMSCRIPTEN_VERSION) || HEDLEY_EMSCRIPTEN_VERSION_CHECK(3, 1, 43)) && HEDLEY_HAS_BUILTIN(__builtin_roundevenf)) || \ +- HEDLEY_GCC_VERSION_CHECK(10,0,0) ++ #if 0 + #define simde_math_roundevenf(v) __builtin_roundevenf(v) + #elif defined(simde_math_roundf) && defined(simde_math_fabsf) + static HEDLEY_INLINE +diff --git a/project/linux/makefile b/project/linux/makefile +index 20565fd7..5f36dca1 100644 +--- a/project/linux/makefile ++++ b/project/linux/makefile +@@ -4,8 +4,9 @@ ifndef BUILD_DIR + + default all: release + +-uname_m := $(shell uname -m) +-uname_n := $(shell uname -n) ++TARGET ?= ++uname_m := $(firstword $(TARGET)) ++uname_n := $(word 3, $(TARGET)) + $(info uname -m is $(uname_m)) + ifeq ($(uname_m), armv7l) + export GCC_EXTRA_FLAGS := -fno-tree-vectorize +@@ -34,7 +35,7 @@ export MAKEFLAGS := -j $(cpus) + $(info MAKEFLAGS is $(MAKEFLAGS)) + endif + release test: +- @$(MAKE) ++ $(MAKE) + + clean: + $(RM) -r Build +@@ -53,7 +54,7 @@ SOURCES += $(wildcard $(PROJDIR)/lib/pugixml/src/*.cpp) + SOURCES += $(PROJDIR)/lib/glew/src/glew.cpp + SOURCES += $(PROJDIR)/lib/imgui/addon/imguitinyfiledialogs.cpp + SOURCES += $(PROJDIR)/lib/imgui/examples/imgui_impl_sdl.cpp +-SOURCES += $(PROJDIR)/lib/imgui/examples/imgui_impl_opengl2.cpp ++SOURCES += $(PROJDIR)/lib/imgui/examples/imgui_impl_opengl3.cpp + SOURCES += $(PROJDIR)/lib/imgui/imgui_widgets.cpp + SOURCES += $(PROJDIR)/lib/imgui/imgui_draw.cpp + SOURCES += $(PROJDIR)/lib/imgui/imgui.cpp +@@ -103,32 +104,35 @@ DEPS := $(ALL:.o=.d) + $(OBJS): INCLUDES := -I../../lib/asmjit -I../../include -I../../lib/glew/include -I../../lib/imgui -I../../lib/simde -I../../lib/pugixml/src -I../../lib/zlib -I../../lib/zlib/contrib/minizip + $(SOFT_OBJS): INCLUDES := -I../../lib/softfloat/source/include -I../../lib/softfloat/source -I../../lib/softfloat/source/8086-SSE + +-SDL_CFLAGS = $(shell sdl2-config --cflags) +-SDL_LIBS = $(shell sdl2-config --libs) +-CPPFLAGS ?= -std=c++20 -O2 $(EXTRA_CPP_FLAGS) $(GCC_EXTRA_FLAGS) -Werror=switch -Wall -Wno-invalid-offsetof -Wno-delete-incomplete -Wno-unused-result -Wno-unknown-pragmas -Wno-unused-local-typedefs -Wno-unused-variable -Wno-unused-function -Wno-unused-but-set-variable $(INCLUDES) -DBOXEDWINE_RECORDER -DBOXEDWINE_ZLIB -DBOXEDWINE_HAS_SETJMP -DSDL2=1 "-DGLH=" -DBOXEDWINE_OPENGL_SDL -DSIMDE_SSE2_NO_NATIVE -DBOXEDWINE_POSIX -DBOXEDWINE_OPENGL_IMGUI_V2 $(SDL_CFLAGS) +-CFLAGS ?= -O2 $(INCLUDES) +-LDFLAGS = -L./linux_build/lib -lcurl -lssl -lcrypto -lpthread -lm -lz -lGL -lstdc++ -lstdc++fs $(SDL_LIBS) +- ++PKG_CONFIG ?= pkg-config ++SDL_CFLAGS = $(shell $(PKG_CONFIG) --cflags sdl2) ++SDL_LIBS = $(shell $(PKG_CONFIG) --libs sdl2) ++CPPFLAGS ?= ++LDFLAGS ?= ++CPPFLAGS := $(CPPFLAGS) -O2 $(EXTRA_CPP_FLAGS) $(GCC_EXTRA_FLAGS) -Werror=switch -Wall -Wno-unused-result -Wno-unknown-pragmas -Wno-unused-local-typedefs -Wno-unused-variable -Wno-unused-function -Wno-unused-but-set-variable -DBOXEDWINE_RECORDER -DBOXEDWINE_ZLIB -DBOXEDWINE_HAS_SETJMP -DSDL2=1 "-DGLH=" -DSIMDE_SSE2_NO_NATIVE -DBOXEDWINE_POSIX -DIMGUI_IMPL_OPENGL_ES3 $(SDL_CFLAGS) ++LDFLAGS := $(LDFLAGS) -L./linux_build/lib -lcurl -lssl -lcrypto -lpthread -lm -lz -lminizip -lstdc++ -lOSMesa -lGLESv2 $(SDL_LIBS) ++CXXFLAGS := -std=c++20 -Wno-invalid-offsetof -Wno-delete-incomplete ++ + #$(TEST_BUILD_DIR)/boxedwineTest: $(TEST_OBJS) + # $(CC) $(TEST_OBJS) -o $@ $(LDFLAGS) + + $(BUILD_DIR)/$(TARGET_EXEC): $(ALL) +- @$(CC) $(ALL) -o $@ $(LDFLAGS) ++ $(CC) $(ALL) -o $@ $(LDFLAGS) + + # assembly + $(BUILD_DIR)/%.s.o: %.s +- @$(MKDIR_P) $(dir $@) +- @$(AS) $(ASFLAGS) -c $< -o $@ ++ $(MKDIR_P) $(dir $@) ++ $(AS) $(ASFLAGS) -c $< -o $@ + + # c source + $(BUILD_DIR)/%.c.o: %.c +- @$(MKDIR_P) $(dir $@) +- @$(CC) $(CFLAGS) -c $< -o $@ ++ $(MKDIR_P) $(dir $@) ++ $(CC) $(CPPFLAGS) $(INCLUDES) -c $< -o $@ + + # c++ source + $(BUILD_DIR)/%.cpp.o: %.cpp +- @$(MKDIR_P) $(dir $@) +- @$(CXX) $(CPPFLAGS) $(CXXFLAGS) -MMD -MP -c $< -o $@ ++ $(MKDIR_P) $(dir $@) ++ $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(INCLUDES) -MMD -MP -c $< -o $@ + + .PHONY: clean + +diff --git a/source/io/fs.h b/source/io/fs.h +index eb60eb6b..49227fff 100644 +--- a/source/io/fs.h ++++ b/source/io/fs.h +@@ -41,8 +41,6 @@ + #define K_O_CLOEXEC 0x080000 + #define K_O_TMPFILE 0x400000 + +-#define FD_CLOEXEC 1 +- + #define K_F_SEAL_SEAL 0x01 + #define K_F_SEAL_SHRINK 0x02 + #define K_F_SEAL_GROW 0x04 +diff --git a/source/kernel/knativesocket.cpp b/source/kernel/knativesocket.cpp +index 1d5f0ad1..7e7fd080 100644 +--- a/source/kernel/knativesocket.cpp ++++ b/source/kernel/knativesocket.cpp +@@ -33,6 +33,7 @@ static int winsock_intialized; + #pragma comment(lib, "Ws2_32.lib") + #undef min + #else ++#include + #include + #include + #include +@@ -576,10 +577,10 @@ KNativeSocketObject::KNativeSocketObject(U32 domain, U32 type, U32 protocol) : K + if (this->error) { + return; + } +-#ifdef __EMSCRIPTEN__ +- this->error = 0; +- return; +-#endif ++#ifdef __EMSCRIPTEN__ ++ this->error = 0; ++ return; ++#endif + this->nativeSocket = (S32)socket(AF_INET, nativeType, nativeProtocol); + LOG_SOCK("%x native socket: %x open nativeType=%x nativeProtocol=%x", KThread::currentThread()->id, nativeSocket, nativeType, nativeProtocol); + #ifndef BOXEDWINE_MULTI_THREADED diff --git a/recipes/wip/games/other/nbsdgames/recipe.toml b/recipes/wip/games/other/nbsdgames/recipe.toml new file mode 100644 index 000000000..0fe14f0ec --- /dev/null +++ b/recipes/wip/games/other/nbsdgames/recipe.toml @@ -0,0 +1,16 @@ +#TODO compile and test +[source] +git = "https://github.com/abakh/nbsdgames" +rev = "v6.0.2" +shallow_clone = true +[build] +template = "custom" +dependencies = [ + "ncursesw", +] +script = """ +rsync -av --delete "${COOKBOOK_SOURCE}/" ./ +cd src +DYNAMIC_INIT +"${COOKBOOK_MAKE}" install -j"$COOKBOOK_MAKE_JOBS" "${MAKEFLAGS[@]}" DESTDIR="$COOKBOOK_STAGE/usr" +""" diff --git a/recipes/wip/games/puzzle/hsc/recipe.toml b/recipes/wip/games/puzzle/hsc/recipe.toml new file mode 100644 index 000000000..05fb19ce5 --- /dev/null +++ b/recipes/wip/games/puzzle/hsc/recipe.toml @@ -0,0 +1,14 @@ +#TODO compile and test +[source] +git = "https://github.com/HactarCE/Hyperspeedcube" +branch = "v1" +shallow_clone = true +[build] +template = "cargo" +cargopackages = ["hyperspeedcube"] +#dependencies = [ # needed? + # "glib", + # "gtk3", + # "atk", + # "libxkbcommon", +#] diff --git a/recipes/wip/games/sim/termfarm/recipe.toml b/recipes/wip/games/sim/termfarm/recipe.toml new file mode 100644 index 000000000..8d8b2448f --- /dev/null +++ b/recipes/wip/games/sim/termfarm/recipe.toml @@ -0,0 +1,6 @@ +#TODO compile and test +[source] +git = "https://github.com/indium114/termfarm" +shallow_clone = true +[build] +template = "cargo" diff --git a/recipes/wip/games/strategy/chessterm/recipe.toml b/recipes/wip/games/strategy/chessterm/recipe.toml new file mode 100644 index 000000000..530ea7ad1 --- /dev/null +++ b/recipes/wip/games/strategy/chessterm/recipe.toml @@ -0,0 +1,6 @@ +#TODO compile and test +[source] +git = "https://github.com/Chewt/chessterm" +shallow_clone = true +[build] +template = "cargo" diff --git a/recipes/wip/games/strategy/rusty-checkers/recipe.toml b/recipes/wip/games/strategy/rusty-checkers/recipe.toml new file mode 100644 index 000000000..a19d7be9e --- /dev/null +++ b/recipes/wip/games/strategy/rusty-checkers/recipe.toml @@ -0,0 +1,6 @@ +#TODO compile and test +[source] +git = "https://github.com/dboone/rusty-checkers" +shallow_clone = true +[build] +template = "cargo" diff --git a/recipes/wip/sci/papr/recipe.toml b/recipes/wip/sci/papr/recipe.toml new file mode 100644 index 000000000..39e24ee6b --- /dev/null +++ b/recipes/wip/sci/papr/recipe.toml @@ -0,0 +1,11 @@ +#TODO compile and test +[source] +git = "https://github.com/AfrozSaqlain/Papr" +shallow_clone = true +[build] +template = "cargo" +cargopackages = ["papr-tui"] +cargoflags = ["--no-default-features"] +#dependencies = ["sqlite3"] # needed? +[package] +dependencies = ["xdg-utils"] diff --git a/recipes/wip/security/pass-tui/recipe.toml b/recipes/wip/security/pass-tui/recipe.toml new file mode 100644 index 000000000..5fc508e5b --- /dev/null +++ b/recipes/wip/security/pass-tui/recipe.toml @@ -0,0 +1,8 @@ +#TODO compile and test +[source] +git = "https://codeberg.org/frofor/pass-tui" +shallow_clone = true +[build] +template = "cargo" +cargoflags = ["--no-default-features --features=xdg"] +dependencies = ["gpgme"] diff --git a/recipes/wip/sys/crust-ui/recipe.toml b/recipes/wip/sys/crust-ui/recipe.toml new file mode 100644 index 000000000..5ed88aa2b --- /dev/null +++ b/recipes/wip/sys/crust-ui/recipe.toml @@ -0,0 +1,6 @@ +#TODO compile and test +[source] +git = "https://github.com/Sajid-RED/crust-ui" +shallow_clone = true +[build] +template = "cargo" diff --git a/recipes/wip/text/mkd/recipe.toml b/recipes/wip/text/mkd/recipe.toml new file mode 100644 index 000000000..e0591077f --- /dev/null +++ b/recipes/wip/text/mkd/recipe.toml @@ -0,0 +1,6 @@ +#TODO compile and test +[source] +git = "https://codeberg.org/badbee/mkd" +shallow_clone = true +[build] +template = "cargo"