[SCM] Debian packaging of wesnoth branch, master, updated. debian/1.9.14-1-11-g83aac4c

Gerfried Fuchs rhonda at debian.org
Mon Jan 23 00:38:03 UTC 2012


The following commit has been merged in the master branch:
commit 83aac4cc2e171610f96326eeb7ccaced7e4335cf
Author: Gerfried Fuchs <rhonda at debian.org>
Date:   Mon Jan 23 01:37:00 2012 +0100

    Pull fix-xdg-path patch from upstream bug #19318

diff --git a/debian/changelog b/debian/changelog
index cde1980..9d044cc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 wesnoth-1.10 (1:1.10-1) unstable; urgency=low
 
   * New upstream stable release!  \o/
+  * Pull fix-xdg-path patch from upstream bug #19318.
 
  -- 
 
diff --git a/debian/patches/04fix-xdg-path b/debian/patches/04fix-xdg-path
new file mode 100644
index 0000000..8776987
--- /dev/null
+++ b/debian/patches/04fix-xdg-path
@@ -0,0 +1,58 @@
+Author: Ignacio R. Morelle <shadowmaster>	vim:ft=diff:
+Description: Wrong ~/.local/share/wesnoth/ directory created
+Bug-Upstream: https://gna.org/bugs/index.php?19318
+
+Index: b/src/filesystem.cpp
+===================================================================
+--- a/src/filesystem.cpp
++++ b/src/filesystem.cpp
+@@ -63,6 +63,7 @@ BPath be_path;
+ #include "loadscreen.hpp"
+ #include "scoped_resource.hpp"
+ #include "serialization/string_utils.hpp"
++#include "version.hpp"
+ 
+ static lg::log_domain log_filesystem("filesystem");
+ #define DBG_FS LOG_STREAM(debug, log_filesystem)
+@@ -501,6 +502,23 @@ static std::string user_data_dir, user_c
+ 
+ static void setup_user_data_dir();
+ 
++static const std::string& get_version_path_suffix()
++{
++	static std::string suffix;
++	
++	// We only really need to generate this once since
++	// the version number cannot change during runtime.
++	
++	if(suffix.empty()) {
++		std::ostringstream s;
++		s << game_config::wesnoth_version.major_version() << '.'
++		  << game_config::wesnoth_version.minor_version();
++		suffix = s.str();
++	}
++	
++	return suffix;
++}
++
+ void set_preferences_dir(std::string path)
+ {
+ #ifdef _WIN32
+@@ -537,7 +555,7 @@ void set_preferences_dir(std::string pat
+ 	if (path.empty()) path = PREFERENCES_DIR;
+ #endif
+ 
+-	std::string path2 = ".wesnoth" + game_config::version.substr(0,3);
++	std::string path2 = ".wesnoth" + get_version_path_suffix();
+ 
+ #ifdef _X11
+ 	const char *home_str = getenv("HOME");
+@@ -553,7 +571,7 @@ void set_preferences_dir(std::string pat
+ 			user_data_dir += "/.local/share";
+ 		} else user_data_dir = xdg_data;
+ 		user_data_dir += "/wesnoth/";
+-		user_data_dir += game_config::version.substr(0,3);
++		user_data_dir += get_version_path_suffix();
+ 		create_directory_if_missing_recursive(user_data_dir);
+ 		game_config::preferences_dir = user_data_dir;
+ 	} else {
diff --git a/debian/patches/series b/debian/patches/series
index 57b6465..4a2dfa8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 02wesnoth-nolog-desktop-file
 03wesnothd-name
+04fix-xdg-path

-- 
Debian packaging of wesnoth



More information about the Pkg-games-commits mailing list