summaryrefslogtreecommitdiff
path: root/recipes/kobodeluxe/files/kobodeluxe-putenv.patch
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/kobodeluxe/files/kobodeluxe-putenv.patch
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/kobodeluxe/files/kobodeluxe-putenv.patch')
-rw-r--r--recipes/kobodeluxe/files/kobodeluxe-putenv.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/recipes/kobodeluxe/files/kobodeluxe-putenv.patch b/recipes/kobodeluxe/files/kobodeluxe-putenv.patch
new file mode 100644
index 0000000000..05f7c72f81
--- /dev/null
+++ b/recipes/kobodeluxe/files/kobodeluxe-putenv.patch
@@ -0,0 +1,69 @@
+Index: KoboDeluxe-0.5.1/configure.in
+===================================================================
+--- KoboDeluxe-0.5.1.orig/configure.in 2008-02-10 12:27:11.000000000 +0100
++++ KoboDeluxe-0.5.1/configure.in 2008-02-10 15:50:11.000000000 +0100
+@@ -159,7 +159,6 @@
+ )
+ LIBS="$LIBS -lSDL_image"
+
+-
+ dnl-------------------------------------------------------
+ dnl Checks for OpenGL
+ dnl-------------------------------------------------------
+@@ -214,13 +213,18 @@
+ dnl-------------------------------------------------------
+ dnl Checks for library functions.
+ dnl-------------------------------------------------------
++dnl SDL_putenv may not be available in all SDL ports
++AC_CHECK_DECLS(SDL_putenv,,,[#include <SDL.h>])
++
+ AC_CHECK_FUNCS(strdup strstr strchr strrchr)
+ AC_CHECK_FUNCS(snprintf _snprintf vsnprintf _vsnprintf)
+ AC_CHECK_FUNCS(pow sqrt)
+ AC_CHECK_FUNCS(munmap mkdir select stat)
+ AC_CHECK_FUNCS(atexit floor memmove memset memcmp)
+-AC_CHECK_FUNCS(gettimeofday)
++AC_CHECK_FUNCS(gettimeofday putenv)
+ AC_CHECK_FUNCS(getegid setgid)
++
++
+ AC_FUNC_MEMCMP
+ AC_FUNC_STRTOD
+ AC_FUNC_VPRINTF
+Index: KoboDeluxe-0.5.1/graphics/gfxengine.cpp
+===================================================================
+--- KoboDeluxe-0.5.1.orig/graphics/gfxengine.cpp 2008-02-10 12:41:31.000000000 +0100
++++ KoboDeluxe-0.5.1/graphics/gfxengine.cpp 2008-02-10 15:58:06.000000000 +0100
+@@ -21,10 +21,15 @@
+
+ #define DBG(x) x
+
++#include <aconfig.h>
++
+ #include "logger.h"
+
+ #include <string.h>
+ #include <math.h>
++#if not (HAVE_DECL_SDL_PUTENV) and defined (HAVE_PUTENV)
++#include <stdlib.h>
++#endif
+
+ #include "gfxengine.h"
+ #include "filters.h"
+@@ -764,8 +769,14 @@
+ if(is_showing)
+ return 0;
+
+- if(_centered && !_fullscreen)
+- SDL_putenv((char *)"SDL_VIDEO_CENTERED=1");
++ if(_centered && !_fullscreen)
++#if HAVE_DECL_SDL_PUTENV
++ SDL_putenv("SDL_VIDEO_CENTERED=1");
++#elif defined(HAVE_PUTENV)
++ putenv("SDL_VIDEO_CENTERED=1");
++#else
++ #error Neither SDL_putenv() nor putenv() are available. Fix it!
++#endif
+
+ log_printf(DLOG, "Opening screen...\n");
+ if(!SDL_WasInit(SDL_INIT_VIDEO))