From 4f7259db0df3f771f89cb34ec062a61c6dfcbb9c Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 30 Aug 2014 20:51:07 +0000
Subject: applying patch tuxpaint-0.9.22.patch


diff --git a/src/fonts.c b/src/fonts.c
index a81a2e6..b1e34aa 100644
--- a/src/fonts.c
+++ b/src/fonts.c
@@ -966,10 +966,12 @@ static void loadfonts(SDL_Surface * screen, const char *const dir)
        status_t result;
     result = find_directory(B_SYSTEM_FONTS_DIRECTORY, volume, false, buffer, sizeof(buffer));
        loadfonts(screen, buffer);
-    result = find_directory(B_COMMON_FONTS_DIRECTORY, volume, false, buffer, sizeof(buffer));
+    result = find_directory(B_SYSTEM_NONPACKAGED_FONTS_DIRECTORY, volume, false, buffer, sizeof(buffer));
        loadfonts(screen, buffer);
     result = find_directory(B_USER_FONTS_DIRECTORY, volume, false, buffer, sizeof(buffer));
        loadfonts(screen, buffer);
+    result = find_directory(B_USER_NONPACKAGED_FONTS_DIRECTORY, volume, false, buffer, sizeof(buffer));
+       loadfonts(screen, buffer);
 #elif defined(__APPLE__)
     loadfonts(screen, "/System/Library/Fonts");
     loadfonts(screen, "/Library/Fonts");
diff --git a/src/i18n.c b/src/i18n.c
index 4df46be..2e2298e 100644
--- a/src/i18n.c
+++ b/src/i18n.c
@@ -880,10 +880,11 @@ static int set_current_language(const char *restrict locale_choice) MUST_CHECK;
 static int set_current_language(const char *restrict loc)
 {
   int i;
+  int j = 0;
   int y_nudge = 0;
   char * oldloc;
   char *env_language;
-
+  char *env_language_lang;
 
   if (strlen(loc) > 0)
   {
@@ -974,8 +975,6 @@ printf ("Locale AFTER is: %s\n", setlocale(LC_ALL,NULL));//EP
       mysetenv("LANGUAGE", "C");
   }
     env_language = strdup(getenv("LANGUAGE"));
-    int j = 0;
-    char *env_language_lang;
     if (*env_language)
       {
       env_language_lang = strtok(env_language, ":");
-- 
1.8.3.4


From 7f502224dfd679b1e207e48a7f7ee35f7cb7b818 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 30 Aug 2014 21:07:09 +0000
Subject: NOSVG seems broken


diff --git a/src/tuxpaint.c b/src/tuxpaint.c
index afa90ab..d1b824f 100644
--- a/src/tuxpaint.c
+++ b/src/tuxpaint.c
@@ -1939,8 +1939,8 @@ static SDL_Surface * load_kpx(char * file);
 static SDL_Surface * load_svg(char * file);
 static float pick_best_scape(unsigned int orig_w, unsigned int orig_h,
                       unsigned int max_w, unsigned int max_h);
-static SDL_Surface * myIMG_Load_RWops(char * file);
 #endif
+static SDL_Surface * myIMG_Load_RWops(char * file);
 static SDL_Surface * myIMG_Load(char * file);
 static int trash(char * path);
 int file_exists(char * path);
-- 
1.8.3.4

--- tuxpaint-0.9.22/Makefile.org	2014-08-31 23:27:39.228327424 +0200
+++ tuxpaint-0.9.22/Makefile	2014-08-31 23:08:38.221773824 +0200
@@ -108,7 +108,7 @@
 windows_PREFIX:=/usr/local
 osx_PREFIX:=/usr/local
 
-beos_PREFIX=$(shell finddir B_APPS_DIRECTORY)/TuxPaint
+#beos_PREFIX=$(shell finddir B_APPS_DIRECTORY)/TuxPaint
 linux_PREFIX:=/usr/local
 PREFIX:=$($(OS)_PREFIX)
 
@@ -434,7 +434,7 @@
 
 windows_ARCH_INSTALL:=
 osx_ARCH_INSTALL:=
-beos_ARCH_INSTALL:=install-haiku
+#beos_ARCH_INSTALL:=install-haiku
 linux_ARCH_INSTALL:=install-gnome install-kde install-kde-icons
 ARCH_INSTALL:=$($(OS)_ARCH_INSTALL)
 
