From d289d81e5a589c69b07159d8f4f5968ea3acbf8a Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 5 Jan 2014 22:53:06 +0100 Subject: [PATCH] Allegro: work around missing $TERM variable in Haiku BeOS used toset $TERM to "dumb" when apps are run from Tracker, but Haiku leaves it unset. Make Allegro aware of the difference so it can detect when it's being started from Tracker. --- .../allegro/patches/allegro-4.4.1.1.patchset | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/media-libs/allegro/patches/allegro-4.4.1.1.patchset b/media-libs/allegro/patches/allegro-4.4.1.1.patchset index a1169f083..2b2cc81a0 100644 --- a/media-libs/allegro/patches/allegro-4.4.1.1.patchset +++ b/media-libs/allegro/patches/allegro-4.4.1.1.patchset @@ -154,3 +154,27 @@ index 654c01c..2a9b171 100644 -- 1.8.3.4 + +From 8a85c675661240b48a07625473da010646ea6e17 Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sat, 30 Nov 2013 11:36:07 +0100 +Subject: Avoid a crash when not started from terminal. + +BeOS seems to set TERM environment variable to "dumb", but we don't. + +diff --git a/src/beos/bsysapi.cpp b/src/beos/bsysapi.cpp +index c6e4dad..a7c9d46 100644 +--- a/src/beos/bsysapi.cpp ++++ b/src/beos/bsysapi.cpp +@@ -128,7 +128,7 @@ static int32 system_thread(void *data) + using_custom_allegro_app = false; + + term = getenv("TERM"); +- if (!strcmp(term, "dumb")) { ++ if (!term || !strcmp(term, "dumb")) { + /* The TERM environmental variable is set to "dumb" if the app was + * not started from a terminal. + */ +-- +1.8.3.4 +