LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File blender-2.64a-fix-locale-files-path.patch of Package blender (Project graphics)

Index: blender-2.64a/source/creator/CMakeLists.txt
===================================================================
--- blender-2.64a.orig/source/creator/CMakeLists.txt
+++ blender-2.64a/source/creator/CMakeLists.txt
@@ -294,11 +294,16 @@
 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()
 
 # color management
Index: blender-2.64a/release/environment-unix
===================================================================
--- blender-2.64a.orig/release/environment-unix
+++ blender-2.64a/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.64a.orig/source/blender/blenfont/intern/blf_lang.c
+++ blender-2.64a/source/blender/blenfont/intern/blf_lang.c
@@ -113,17 +113,7 @@
 
 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/";
 }
 
 /* Get LANG/LANGUAGE environment variable. */
Index: blender-2.64a/source/blender/blenlib/intern/path_util.c
===================================================================
--- blender-2.64a.orig/source/blender/blenlib/intern/path_util.c
+++ blender-2.64a/source/blender/blenlib/intern/path_util.c
@@ -983,38 +983,6 @@
 	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)) {