File blender-fix-locale-files-path.patch of Package blender
Index: blender-2.63a/source/creator/CMakeLists.txt
===================================================================
--- blender-2.63a.orig/source/creator/CMakeLists.txt
+++ blender-2.63a/source/creator/CMakeLists.txt
@@ -295,11 +295,16 @@ endif()
if(WITH_INTERNATIONAL)
install(
DIRECTORY
- ${CMAKE_SOURCE_DIR}/release/datafiles/locale
${CMAKE_SOURCE_DIR}/release/datafiles/fonts
DESTINATION ${TARGETDIR_VER}/datafiles
PATTERN ".svn" EXCLUDE
)
+ install(
+ DIRECTORY
+ ${CMAKE_SOURCE_DIR}/release/datafiles/locale
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/share
+ PATTERN ".svn" EXCLUDE
+ )
endif()
# helpful tip when using make
Index: blender-2.63a/release/environment-unix
===================================================================
--- blender-2.63a.orig/release/environment-unix
+++ blender-2.63a/release/environment-unix
@@ -11,7 +11,7 @@
BLENDER_USER_BASE=${HOME}/.blender/${BLENDER_VERSION}
BLENDER_SYSTEM_BASE=${BLENDER_SHARE}/${BLENDER_VERSION}
BLENDER_USER_DATAFILES=${HOME}/.blender/${BLENDER_VERSION}/datafiles
-BLENDER_SYSTEM_DATAFILES=${BLENDER_SHARE}/${BLENDER_VERSION}/datafiles
+BLENDER_SYSTEM_DATAFILES=/usr/share
BLENDER_USER_PY=${HOME}/.blender/${BLENDER_VERSION}/py
BLENDER_SYSTEM_PY=${BLENDER_SHARE}/${BLENDER_VERSION}/py
BLENDER_USER_PLUGINS=${HOME}/.blender/${BLENDER_VERSION}/plugins
Index: blender-2.63a/source/blender/blenfont/intern/blf_lang.c
===================================================================
--- blender-2.63a.orig/source/blender/blenfont/intern/blf_lang.c
+++ blender-2.63a/source/blender/blenfont/intern/blf_lang.c
@@ -110,17 +110,7 @@ static const char *locales[] = {
void BLF_lang_init(void)
{
- char *messagepath = BLI_get_folder(BLENDER_DATAFILES, "locale");
-
- BLI_strncpy(global_encoding_name, SYSTEM_ENCODING_DEFAULT, sizeof(global_encoding_name));
-
- if (messagepath) {
- BLI_strncpy(global_messagepath, messagepath, sizeof(global_messagepath));
- }
- else {
- printf("%s: 'locale' data path for translations not found, continuing\n", __func__);
- global_messagepath[0] = '\0';
- }
+ *global_messagepath = "/usr/share/locale/";
}
Index: blender-2.63a/source/blender/blenlib/intern/path_util.c
===================================================================
--- blender-2.63a.orig/source/blender/blenlib/intern/path_util.c
+++ blender-2.63a/source/blender/blenlib/intern/path_util.c
@@ -994,38 +994,6 @@ static int get_path_system(char *targetp
char system_path[FILE_MAX];
const char *system_base_path;
-
- /* first allow developer only overrides to the system path
- * these are only used when running blender from source */
- char cwd[FILE_MAX];
- char relfolder[FILE_MAX];
-
- if (folder_name) {
- if (subfolder_name) {
- BLI_join_dirfile(relfolder, sizeof(relfolder), folder_name, subfolder_name);
- }
- else {
- BLI_strncpy(relfolder, folder_name, sizeof(relfolder));
- }
- }
- else {
- relfolder[0]= '\0';
- }
-
- /* try CWD/release/folder_name */
- if (BLI_current_working_dir(cwd, sizeof(cwd))) {
- if (test_path(targetpath, cwd, "release", relfolder)) {
- return 1;
- }
- }
-
- /* try EXECUTABLE_DIR/release/folder_name */
- if (test_path(targetpath, bprogdir, "release", relfolder))
- return 1;
- /* end developer overrides */
-
-
-
system_path[0] = '\0';
if (test_env_path(system_path, envvar)) {