[SCM] blender/master: debian/patches: fix locales lookup

kiniou-guest at users.alioth.debian.org kiniou-guest at users.alioth.debian.org
Thu Jan 26 18:24:15 UTC 2012


The following commit has been merged in the master branch:
commit 4675327e1ece9098dad8102255bebcbbff1ac442
Author: Kevin Roy <kiniou at gmail.com>
Date:   Thu Jan 26 19:17:27 2012 +0100

    debian/patches: fix locales lookup

diff --git a/debian/patches/0007-locales_directory_install.patch b/debian/patches/0007-locales_directory_install.patch
index 0647f22..83ba141 100644
--- a/debian/patches/0007-locales_directory_install.patch
+++ b/debian/patches/0007-locales_directory_install.patch
@@ -4,9 +4,149 @@ Subject: locales_directory_install
 
 Change where locales are installed
 ---
- source/creator/CMakeLists.txt |    4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
+ source/blender/blenfont/intern/blf_lang.c |    2 +-
+ source/blender/blenlib/BLI_path_util.h    |    1 +
+ source/blender/blenlib/intern/path_util.c |   29 ++++++++++++++++-------------
+ source/creator/CMakeLists.txt             |    4 ++--
+ 4 files changed, 20 insertions(+), 16 deletions(-)
 
+diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c
+index 2ba23e5..ec585af 100644
+--- a/source/blender/blenfont/intern/blf_lang.c
++++ b/source/blender/blenfont/intern/blf_lang.c
+@@ -101,7 +101,7 @@ static const char *locales[] = {
+ 
+ void BLF_lang_init(void)
+ {
+-	char *messagepath= BLI_get_folder(BLENDER_DATAFILES, "locale");
++	char *messagepath= BLI_get_folder(BLENDER_SYSTEM_LOCALE, NULL);
+ 	
+ 	BLI_strncpy(global_encoding_name, SYSTEM_ENCODING_DEFAULT, sizeof(global_encoding_name));
+ 	
+diff --git a/source/blender/blenlib/BLI_path_util.h b/source/blender/blenlib/BLI_path_util.h
+index 68bb1a7..ba1852e 100644
+--- a/source/blender/blenlib/BLI_path_util.h
++++ b/source/blender/blenlib/BLI_path_util.h
+@@ -62,6 +62,7 @@ char *BLI_get_folder_version(const int id, const int ver, const int do_check);
+ #define BLENDER_SYSTEM_SCRIPTS		53
+ #define BLENDER_SYSTEM_PLUGINS		54
+ #define BLENDER_SYSTEM_PYTHON		54
++#define BLENDER_SYSTEM_LOCALE		55
+ 
+ /* for BLI_get_folder_version only */
+ #define BLENDER_RESOURCE_PATH_USER		0
+diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
+index e79d850..980e26b 100644
+--- a/source/blender/blenlib/intern/path_util.c
++++ b/source/blender/blenlib/intern/path_util.c
+@@ -28,7 +28,7 @@
+  */
+ 
+ /** \file blender/blenlib/intern/path_util.c
+- *  \ingroup bli
++ *	\ingroup bli
+  */
+ 
+ 
+@@ -56,7 +56,7 @@
+ #  include "BLI_fnmatch.h" /* use fnmatch included in blenlib */
+ #else
+ #  ifndef _GNU_SOURCE
+-#    define _GNU_SOURCE
++#	 define _GNU_SOURCE
+ #  endif
+ #  include <fnmatch.h>
+ #endif
+@@ -64,7 +64,7 @@
+ #ifdef WIN32
+ #  include <io.h>
+ #  ifdef _WIN32_IE
+-#    undef _WIN32_IE
++#	 undef _WIN32_IE
+ #  endif
+ #  define _WIN32_IE 0x0501
+ #  include <windows.h>
+@@ -72,7 +72,7 @@
+ #  include "BLI_winstuff.h"
+ #else /* non windows */
+ #  ifdef WITH_BINRELOC
+-#    include "binreloc.h"
++#	 include "binreloc.h"
+ #  endif
+ #endif /* WIN32 */
+ 
+@@ -85,9 +85,9 @@
+ #  define BLENDER_SYSTEM_FORMAT			"%s/Blender/%s"
+ #else /* UNIX */
+ #  ifndef WITH_XDG_USER_DIRS /* oldschool unix ~/.blender/ */
+-#    define BLENDER_USER_FORMAT			"%s/.blender/%s"
++#	 define BLENDER_USER_FORMAT			"%s/.blender/%s"
+ #  else /* new XDG ~/blender/.config/ */
+-#    define BLENDER_USER_FORMAT			"%s/blender/%s"
++#	 define BLENDER_USER_FORMAT			"%s/blender/%s"
+ #  endif // WITH_XDG_USER_DIRS
+ #  define BLENDER_SYSTEM_FORMAT			"%s/blender/%s"
+ #endif
+@@ -261,7 +261,7 @@ int BLI_uniquename_cb(int (*unique_check)(void *, const char *), void *arg, cons
+  * 
+  * For places where this is used, see constraint.c for example...
+  *
+- * 	name_offs: should be calculated using offsetof(structname, membername) macro from stddef.h
++ *	name_offs: should be calculated using offsetof(structname, membername) macro from stddef.h
+  *	len: maximum length of string (to prevent overflows, etc.)
+  *	defname: the name that should be used by default if none is specified already
+  *	delim: the character which acts as a delimeter between parts of the name
+@@ -331,9 +331,9 @@ void BLI_cleanup_path(const char *relabase, char *dir)
+ 	}
+ 	
+ 	/* Note
+-	 *   memmove( start, eind, strlen(eind)+1 );
++	 *	 memmove( start, eind, strlen(eind)+1 );
+ 	 * is the same as
+-	 *   strcpy( start, eind ); 
++	 *	 strcpy( start, eind ); 
+ 	 * except strcpy should not be used because there is overlap,
+ 	  * so use memmove's slightly more obscure syntax - Campbell
+ 	 */
+@@ -1088,6 +1088,9 @@ char *BLI_get_folder(int folder_id, const char *subfolder)
+ 			if (get_path_local(path, "python", subfolder, ver)) break;
+ 			if (get_path_system(path, "python", subfolder, "BLENDER_SYSTEM_PYTHON", ver)) break;
+ 			return NULL;
++
++		case BLENDER_SYSTEM_LOCALE:
++			BLI_strncpy(path,"/usr/share/locale",FILE_MAX);break;
+ 	}
+ 	
+ 	return path;
+@@ -1383,7 +1386,7 @@ int BLI_testextensie_array(const char *str, const char **ext_array)
+ }
+ 
+ /* semicolon separated wildcards, eg:
+- *  '*.zip;*.py;*.exe' */
++ *	'*.zip;*.py;*.exe' */
+ int BLI_testextensie_glob(const char *str, const char *ext_fnmatch)
+ {
+ 	const char *ext_step= ext_fnmatch;
+@@ -1443,8 +1446,8 @@ int BLI_ensure_extension(char *path, size_t maxlen, const char *ext)
+ 	size_t a;
+ 
+ 	/* first check the extension is alread there */
+-	if (    (ext_len <= path_len) &&
+-	        (strcmp(path + (path_len - ext_len), ext) == 0))
++	if (	(ext_len <= path_len) &&
++			(strcmp(path + (path_len - ext_len), ext) == 0))
+ 	{
+ 		return 1;
+ 	}
+@@ -1524,7 +1527,7 @@ void BLI_join_dirfile(char *dst, const size_t maxlen, const char *dir, const cha
+ 	/* inline BLI_add_slash */
+ 	if (dst[dirlen - 1] != SEP) {
+ 		dst[dirlen++]= SEP;
+-		dst[dirlen  ]= '\0';
++		dst[dirlen	]= '\0';
+ 	}
+ 
+ 	if (dirlen >= maxlen) {
 diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
 index 033cbf0..4f84792 100644
 --- a/source/creator/CMakeLists.txt

-- 
blender packaging



More information about the pkg-multimedia-commits mailing list