From 8a9ac25e98a3d1b993718ea0d37ad6ce24bd4f3b Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Mon, 9 Sep 2019 22:04:26 +1000 Subject: [PATCH] SDLPoP: Fix working directory --- .../sdlpop/patches/sdlpop-1.19.patchset | 38 +++++++++++++++++-- games-arcade/sdlpop/sdlpop-1.19.recipe | 2 +- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/games-arcade/sdlpop/patches/sdlpop-1.19.patchset b/games-arcade/sdlpop/patches/sdlpop-1.19.patchset index 8cc14d310..9bfdff30f 100644 --- a/games-arcade/sdlpop/patches/sdlpop-1.19.patchset +++ b/games-arcade/sdlpop/patches/sdlpop-1.19.patchset @@ -1,14 +1,14 @@ -From 7920812ef10c49277568618b5be0bab8d119efd9 Mon Sep 17 00:00:00 2001 +From 604842a2d0e2cee9d054adead66ba238a533bc4e Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Thu, 27 Sep 2018 19:26:28 +1000 Subject: Disable haptic init diff --git a/src/seg009.c b/src/seg009.c -index 691954e..d5551b0 100644 +index 295d960..d6f0267 100644 --- a/src/seg009.c +++ b/src/seg009.c -@@ -2108,7 +2108,7 @@ void __pascal far set_gr_mode(byte grmode) { +@@ -2301,7 +2301,7 @@ void __pascal far set_gr_mode(byte grmode) { SDL_SetHint(SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING, "1"); #endif if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_NOPARACHUTE | @@ -18,5 +18,35 @@ index 691954e..d5551b0 100644 quit(1); } -- -2.19.0 +2.23.0 + + +From 9bfc4743827c52aab832805771d71881419935e3 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Mon, 9 Sep 2019 22:02:54 +1000 +Subject: Set working directory + + +diff --git a/src/main.c b/src/main.c +index 4f5b9f3..2a01eb4 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -22,6 +22,15 @@ The authors of this program may be contacted at http://forum.princed.org + + int main(int argc, char *argv[]) + { ++#ifdef __HAIKU__ ++ char *binpath = realpath(argv[0], NULL); ++ if (binpath != NULL) { ++ char *appdir = strrchr(binpath, '/'); ++ *appdir = '\0'; ++ chdir(binpath); ++ free(binpath); ++ } ++#endif + g_argc = argc; + g_argv = argv; + pop_main(); +-- +2.23.0 diff --git a/games-arcade/sdlpop/sdlpop-1.19.recipe b/games-arcade/sdlpop/sdlpop-1.19.recipe index 4a66561d4..1f5569f28 100644 --- a/games-arcade/sdlpop/sdlpop-1.19.recipe +++ b/games-arcade/sdlpop/sdlpop-1.19.recipe @@ -4,7 +4,7 @@ It is based on a disassembly of the DOS version, and uses SDL." HOMEPAGE="http://www.princed.org/" COPYRIGHT="Dávid Nagy" LICENSE="GNU GPL v3" -REVISION="1" +REVISION="2" SOURCE_URI="https://github.com/NagyD/SDLPoP/archive/v$portVersion.tar.gz" CHECKSUM_SHA256="e43e3a215e1377d74375fc06183cda76195328a0348a980a5991f3648bb91be2" SOURCE_DIR="SDLPoP-$portVersion"