From d24f280d65276e0b913242103489d383993fa0df Mon Sep 17 00:00:00 2001 From: Nikolay Date: Sat, 3 Nov 2018 22:29:58 +0500 Subject: [PATCH] yamagi_quake2: fix find path (#3309) --- .../patches/yamagi_quake2-7.30.patchset | 40 +++++++++++++++++++ .../yamagi-quake2/yamagi_quake2-7.30.recipe | 2 +- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/games-fps/yamagi-quake2/patches/yamagi_quake2-7.30.patchset b/games-fps/yamagi-quake2/patches/yamagi_quake2-7.30.patchset index 6e3fc57de..3ccaa04af 100644 --- a/games-fps/yamagi-quake2/patches/yamagi_quake2-7.30.patchset +++ b/games-fps/yamagi-quake2/patches/yamagi_quake2-7.30.patchset @@ -86,3 +86,43 @@ index a2e6f18..9397d97 100644 -- 2.19.1 +From 7cf68509bfbd20fe3fa84f0598973e8558c28742 Mon Sep 17 00:00:00 2001 +From: Nikolay0054 +Date: Sat, 3 Nov 2018 14:10:59 +0500 +Subject: [PATCH] fix find path + +--- + src/backends/generic/misc.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/src/backends/generic/misc.c b/src/backends/generic/misc.c +index 973a2cba..11832be0 100644 +--- a/src/backends/generic/misc.c ++++ b/src/backends/generic/misc.c +@@ -45,6 +45,10 @@ + #include // _NSGetExecutablePath + #endif + ++#ifdef __HAIKU__ ++#include // find_path() ++#endif ++ + #ifndef PATH_MAX + // this is mostly for windows. windows has a MAX_PATH = 260 #define, but allows + // longer paths anyway.. this might not be the maximum allowed length, but is +@@ -119,6 +123,13 @@ static void SetExecutablePath(char* exePath) + // TODO: realpath() ? + // TODO: no idea what this is if the executable is in an app bundle + ++#elif defined(__HAIKU__) ++ ++ if(find_path(B_APP_IMAGE_SYMBOL, B_FIND_PATH_IMAGE_PATH, NULL, exePath, PATH_MAX) != B_OK) ++ { ++ exePath[0] = '\0'; ++ } ++ + #else + + // Several platforms (for example OpenBSD) donn't provide a +-- +2.19.1 diff --git a/games-fps/yamagi-quake2/yamagi_quake2-7.30.recipe b/games-fps/yamagi-quake2/yamagi_quake2-7.30.recipe index cba4b1359..c6aeac6e4 100644 --- a/games-fps/yamagi-quake2/yamagi_quake2-7.30.recipe +++ b/games-fps/yamagi-quake2/yamagi_quake2-7.30.recipe @@ -28,7 +28,7 @@ code is fully 64 bit clean and highly portable." HOMEPAGE="https://www.yamagi.org/quake2/" COPYRIGHT="OpenArena Team" LICENSE="GNU GPL v2" -REVISION="2" +REVISION="3" SOURCE_URI="https://deponie.yamagi.org/quake2/quake2-$portVersion.tar.xz" CHECKSUM_SHA256="f27b6d110c25feee18bbe9b414a143b52848327141b22349d7c4ef1fa46a7bbf" SOURCE_DIR="quake2-$portVersion"