From 2e56e596e9731a304a08cf68b1bfb74fbcb9e29a Mon Sep 17 00:00:00 2001 From: mrtuxa Date: Wed, 9 Aug 2023 20:02:47 +0200 Subject: [PATCH] added OpenBSD Patch and make it runable --- patches/openbsd/generic.patch | 54 +++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 patches/openbsd/generic.patch diff --git a/patches/openbsd/generic.patch b/patches/openbsd/generic.patch new file mode 100644 index 0000000..bd419c4 --- /dev/null +++ b/patches/openbsd/generic.patch @@ -0,0 +1,54 @@ +diff --git a/lua_translate b/lua_translate +index b16ab97..f79b4d0 100755 +--- a/lua_translate ++++ b/lua_translate +@@ -23,9 +23,9 @@ functions = toml.loads(open("src/values/functions.toml").read()) + ofile = open("src/lua.c","w") + + ofile.write('''\ +-#include +-#include +-#include ++#include ++#include ++#include + lua_State * engine_lua_state; + #include "lua_manual.c" + +diff --git a/run b/run +index 03605cc..5d58be7 100755 +--- a/run ++++ b/run +@@ -1,5 +1,5 @@ + #!/usr/bin/env bash + set -e + ./lua_translate +-gcc src/main.c -g -lSDL2 -llua5.3 -o engine -O3 -Werror -Wall ++egcc src/main.c -g -lSDL2 -llua5.3 -o engine -O3 -Werror -Wall -I /usr/local/include + exec ./engine +diff --git a/src/frontend/sdl/main.c b/src/frontend/sdl/main.c +index 74578e3..e644e57 100644 +--- a/src/frontend/sdl/main.c ++++ b/src/frontend/sdl/main.c +@@ -131,4 +131,4 @@ void engine_window_destroy(struct ENGINE_WINDOW * window) { + engine_memory_free(window -> texture); + engine_memory_free(window -> fe_window); + engine_memory_free(window); +-} +\ No newline at end of file ++} +diff --git a/src/lua.c b/src/lua.c +index 00317da..eef8e43 100644 +--- a/src/lua.c ++++ b/src/lua.c +@@ -1,6 +1,6 @@ +-#include +-#include +-#include ++#include ++#include ++#include + lua_State * engine_lua_state; + #include "lua_manual.c" + +