[maemo-commits] [maemo-commits] r18279 - in projects/haf/branches/glib/glib-2-20/debian: . patches
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Thu May 7 13:58:19 EEST 2009
- Previous message: [maemo-commits] r18277 - in projects/haf/trunk/libmatchbox2: . matchbox/client-types matchbox/theme-engines
- Next message: [maemo-commits] r18281 - in projects/haf/branches/glib/glib-2-20/debian: . patches
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: csaavedra Date: 2009-05-07 13:58:18 +0300 (Thu, 07 May 2009) New Revision: 18279 Removed: projects/haf/branches/glib/glib-2-20/debian/patches/01_gettext-desktopfiles.patch projects/haf/branches/glib/glib-2-20/debian/patches/02_gettext-desktopfiles-ubuntu.patch projects/haf/branches/glib/glib-2-20/debian/patches/03_blacklist-directories.patch projects/haf/branches/glib/glib-2-20/debian/patches/04_homedir_env.patch Modified: projects/haf/branches/glib/glib-2-20/debian/changelog projects/haf/branches/glib/glib-2-20/debian/patches/series Log: Drop debian unstable patches. Modified: projects/haf/branches/glib/glib-2-20/debian/changelog =================================================================== --- projects/haf/branches/glib/glib-2-20/debian/changelog 2009-05-07 10:56:19 UTC (rev 18278) +++ projects/haf/branches/glib/glib-2-20/debian/changelog 2009-05-07 10:58:18 UTC (rev 18279) @@ -1,9 +1,13 @@ glib2.0 (2.20.1-1) unstable; urgency=low + [ Janne Karhunen ] * New upstream release; move maemo changes to debian/patches - -- Janne Karhunen <Janne.Karhunen at nokia.com> Tue, 28 Apr 2009 13:50:24 +0300 + [ Claudio Saavedra ] + * Drop debian unstable patches. + -- Claudio Saavedra <csaavedra at igalia.com> Thu, 07 May 2009 13:56:43 +0300 + glib2.0 (2.20.1-1) unstable; urgency=low * New upstream bugfix release: Deleted: projects/haf/branches/glib/glib-2-20/debian/patches/01_gettext-desktopfiles.patch =================================================================== --- projects/haf/branches/glib/glib-2-20/debian/patches/01_gettext-desktopfiles.patch 2009-05-07 10:56:19 UTC (rev 18278) +++ projects/haf/branches/glib/glib-2-20/debian/patches/01_gettext-desktopfiles.patch 2009-05-07 10:58:18 UTC (rev 18279) @@ -1,145 +0,0 @@ -# Description: If a .desktop file does not have inline translations, fall back to calling gettext. -# Ubuntu: https://launchpad.net/bugs/3935 -# Upstream: http://bugzilla.gnome.org/show_bug.cgi?id=569829 -Index: glib2.0-2.19.5/glib/gkeyfile.c -=================================================================== ---- glib2.0-2.19.5.orig/glib/gkeyfile.c 2009-01-30 15:34:03.000000000 +0100 -+++ glib2.0-2.19.5/glib/gkeyfile.c 2009-01-30 15:34:32.000000000 +0100 -@@ -83,6 +83,7 @@ - GKeyFileFlags flags; - - gchar **locales; -+ gchar *gettext_domain; - }; - - typedef struct _GKeyFileKeyValuePair GKeyFileKeyValuePair; -@@ -209,6 +210,7 @@ - key_file->list_separator = ';'; - key_file->flags = 0; - key_file->locales = g_strdupv ((gchar **)g_get_language_names ()); -+ key_file->gettext_domain = NULL; - } - - static void -@@ -228,6 +230,12 @@ - key_file->parse_buffer = NULL; - } - -+ if (key_file->gettext_domain) -+ { -+ g_free (key_file->gettext_domain); -+ key_file->gettext_domain = NULL; -+ } -+ - tmp = key_file->groups; - while (tmp != NULL) - { -@@ -448,6 +456,11 @@ - return FALSE; - } - -+ key_file->gettext_domain = g_key_file_get_string (key_file, -+ G_KEY_FILE_DESKTOP_GROUP, -+ G_KEY_FILE_DESKTOP_KEY_GETTEXT_DOMAIN, -+ NULL); -+ - return TRUE; - } - -@@ -554,6 +567,11 @@ - return FALSE; - } - -+ key_file->gettext_domain = g_key_file_get_string (key_file, -+ G_KEY_FILE_DESKTOP_GROUP, -+ G_KEY_FILE_DESKTOP_KEY_GETTEXT_DOMAIN, -+ NULL); -+ - return TRUE; - } - -@@ -1662,6 +1680,8 @@ - GError *key_file_error; - gchar **languages; - gboolean free_languages = FALSE; -+ gboolean try_gettext = FALSE; -+ const gchar *msg_locale; - gint i; - - g_return_val_if_fail (key_file != NULL, NULL); -@@ -1692,6 +1712,23 @@ - free_languages = FALSE; - } - -+ /* we're only interested in gettext translation if we don't have a -+ * translation in the .desktop file itself and if the key is one of the keys -+ * we know we want to translate: Name, GenericName, Comment. Blindly doing -+ * this for all keys can give strange result for the icons, since the Icon is -+ * a locale string in the spec, eg. We also only get translation in the mo -+ * file if the requested locale is the LC_MESSAGES one. Ideally, we should do -+ * more and change LC_MESSAGES to use the requested locale, but there's no -+ * guarantee it's installed on the system and it might have some -+ * side-effects. Since this is a corner case, let's ignore it. */ -+ -+ msg_locale = setlocale (LC_MESSAGES, NULL); -+ try_gettext = msg_locale && key_file->gettext_domain && -+ strcmp (group_name, G_KEY_FILE_DESKTOP_GROUP) == 0 && -+ (strcmp (key, G_KEY_FILE_DESKTOP_KEY_NAME) == 0 || -+ strcmp (key, G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME) == 0 || -+ strcmp (key, G_KEY_FILE_DESKTOP_KEY_COMMENT) == 0); -+ - for (i = 0; languages[i]; i++) - { - candidate_key = g_strdup_printf ("%s[%s]", key, languages[i]); -@@ -1708,6 +1745,39 @@ - translated_value = NULL; - } - -+ /* Fallback to gettext */ -+ if (try_gettext && !translated_value) -+ { -+ gchar *orig_value = g_key_file_get_string (key_file, group_name, key, NULL); -+ -+ if (orig_value) -+ { -+ gboolean codeset_set; -+ const gchar *translated; -+ gboolean has_gettext; -+ -+ codeset_set = bind_textdomain_codeset (key_file->gettext_domain, "UTF-8") != NULL; -+ translated = NULL; -+ -+ translated = g_dgettext (key_file->gettext_domain, -+ orig_value); -+ has_gettext = translated != orig_value; -+ -+ g_free (orig_value); -+ -+ if (has_gettext) -+ { -+ if (codeset_set) -+ translated_value = g_strdup (translated); -+ else -+ translated_value = g_locale_to_utf8 (translated, -+ -1, NULL, NULL, NULL); -+ } -+ else -+ translated_value = NULL; -+ } -+ } -+ - /* Fallback to untranslated key - */ - if (!translated_value) -Index: glib2.0-2.19.5/glib/gkeyfile.h -=================================================================== ---- glib2.0-2.19.5.orig/glib/gkeyfile.h 2009-01-30 15:34:03.000000000 +0100 -+++ glib2.0-2.19.5/glib/gkeyfile.h 2009-01-30 15:34:32.000000000 +0100 -@@ -240,6 +240,7 @@ - #define G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY "StartupNotify" - #define G_KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS "StartupWMClass" - #define G_KEY_FILE_DESKTOP_KEY_URL "URL" -+#define G_KEY_FILE_DESKTOP_KEY_GETTEXT_DOMAIN "X-GNOME-Gettext-Domain" - - #define G_KEY_FILE_DESKTOP_TYPE_APPLICATION "Application" - #define G_KEY_FILE_DESKTOP_TYPE_LINK "Link" Deleted: projects/haf/branches/glib/glib-2-20/debian/patches/02_gettext-desktopfiles-ubuntu.patch =================================================================== --- projects/haf/branches/glib/glib-2-20/debian/patches/02_gettext-desktopfiles-ubuntu.patch 2009-05-07 10:56:19 UTC (rev 18278) +++ projects/haf/branches/glib/glib-2-20/debian/patches/02_gettext-desktopfiles-ubuntu.patch 2009-05-07 10:58:18 UTC (rev 18279) @@ -1,40 +0,0 @@ -# Description: Provide backwards compatibility for 01_gettext-desktopfiles.patch for X-{Debian,Ubuntu}-Gettext-Domain -# UbuntuSpecific: 01_gettext-desktopfiles.patch was changed to use X-GNOME-, so this is necessary until all our .desktop files are converted -Index: glib2.0-2.19.5/glib/gkeyfile.c -=================================================================== ---- glib2.0-2.19.5.orig/glib/gkeyfile.c 2009-01-30 15:53:09.000000000 +0100 -+++ glib2.0-2.19.5/glib/gkeyfile.c 2009-01-30 15:55:46.000000000 +0100 -@@ -460,6 +460,16 @@ - G_KEY_FILE_DESKTOP_GROUP, - G_KEY_FILE_DESKTOP_KEY_GETTEXT_DOMAIN, - NULL); -+ if (!key_file->gettext_domain) -+ key_file->gettext_domain = g_key_file_get_string (key_file, -+ G_KEY_FILE_DESKTOP_GROUP, -+ "X-Ubuntu-Gettext-Domain", -+ NULL); -+ if (!key_file->gettext_domain) -+ key_file->gettext_domain = g_key_file_get_string (key_file, -+ G_KEY_FILE_DESKTOP_GROUP, -+ "X-Debian-Gettext-Domain", -+ NULL); - - return TRUE; - } -@@ -571,6 +581,16 @@ - G_KEY_FILE_DESKTOP_GROUP, - G_KEY_FILE_DESKTOP_KEY_GETTEXT_DOMAIN, - NULL); -+ if (!key_file->gettext_domain) -+ key_file->gettext_domain = g_key_file_get_string (key_file, -+ G_KEY_FILE_DESKTOP_GROUP, -+ "X-Ubuntu-Gettext-Domain", -+ NULL); -+ if (!key_file->gettext_domain) -+ key_file->gettext_domain = g_key_file_get_string (key_file, -+ G_KEY_FILE_DESKTOP_GROUP, -+ "X-Debian-Gettext-Domain", -+ NULL); - - return TRUE; - } Deleted: projects/haf/branches/glib/glib-2-20/debian/patches/03_blacklist-directories.patch =================================================================== --- projects/haf/branches/glib/glib-2-20/debian/patches/03_blacklist-directories.patch 2009-05-07 10:56:19 UTC (rev 18278) +++ projects/haf/branches/glib/glib-2-20/debian/patches/03_blacklist-directories.patch 2009-05-07 10:58:18 UTC (rev 18279) @@ -1,24 +0,0 @@ ---- glib2.0-2.18.0.orig/gio/gunixmounts.c 2008-09-02 17:09:19.000000000 +0200 -+++ glib2.0-2.18.0/gio/gunixmounts.c 2008-09-03 00:53:29.000000000 +0200 -@@ -221,6 +221,8 @@ - "/home", - "/lib", - "/lib64", -+ "/live/cow", -+ "/live/image", - "/media", - "/mnt", - "/opt", -@@ -231,7 +233,12 @@ - "/usr", - "/usr/local", - "/var", -+ "/var/crash", -+ "/var/local", -+ "/var/log", - "/var/log/audit", /* https://bugzilla.redhat.com/show_bug.cgi?id=333041 */ -+ "/var/mail", -+ "/var/run", - "/var/tmp", /* https://bugzilla.redhat.com/show_bug.cgi?id=335241 */ - "/proc", - "/sbin", Deleted: projects/haf/branches/glib/glib-2-20/debian/patches/04_homedir_env.patch =================================================================== --- projects/haf/branches/glib/glib-2-20/debian/patches/04_homedir_env.patch 2009-05-07 10:56:19 UTC (rev 18278) +++ projects/haf/branches/glib/glib-2-20/debian/patches/04_homedir_env.patch 2009-05-07 10:58:18 UTC (rev 18279) @@ -1,59 +0,0 @@ -Index: glib-2.18.3/docs/reference/glib/running.sgml -=================================================================== ---- glib-2.18.3.orig/docs/reference/glib/running.sgml 2008-11-26 12:01:53.559365436 +0100 -+++ glib-2.18.3/docs/reference/glib/running.sgml 2008-11-26 12:25:58.155366255 +0100 -@@ -194,6 +194,22 @@ variables like <envar>LANG</envar>, <env - </para> - </formalpara> - -+<formalpara id="G_HOME"> -+ <title><envar>G_HOME</envar></title> -+ -+ <para> -+ For various reasons, GLib applications ignore the <envar>HOME</envar> -+ environment variable on Unix systems and will use the user directory -+ as specified by the <filename>passwd</filename> entry, which is more -+ reliable. -+ </para> -+ <para> -+ The <envar>G_HOME</envar> environment variable will override any -+ other setting for the home directory. It is not meant for daily usage, -+ but it is useful in testing or building environments. -+ </para> -+</formalpara> -+ - </refsect2> - - <refsect2 id="setlocale"> -Index: glib-2.18.3/glib/gutils.c -=================================================================== ---- glib-2.18.3.orig/glib/gutils.c 2008-11-26 11:50:38.607861683 +0100 -+++ glib-2.18.3/glib/gutils.c 2008-11-26 12:00:29.035360081 +0100 -@@ -1520,11 +1520,14 @@ g_get_any_init_do (void) - } - #endif /* !G_OS_WIN32 */ - -+ g_home_dir = g_strdup (g_getenv ("G_HOME")); -+ - #ifdef G_OS_WIN32 - /* We check $HOME first for Win32, though it is a last resort for Unix - * where we prefer the results of getpwuid(). - */ -- g_home_dir = g_strdup (g_getenv ("HOME")); -+ if (!g_home_dir) -+ g_home_dir = g_strdup (g_getenv ("HOME")); - - /* Only believe HOME if it is an absolute path and exists */ - if (g_home_dir) -@@ -1820,6 +1823,11 @@ g_get_real_name (void) - * homedir = g_get_home_dir (<!-- -->); - * ]| - * -+ * However, to allow changing this value for testing and development -+ * purposes, the value of the <envar>G_HOME</envar> environment -+ * variable, if set, will override the <filename>passwd</filename> -+ * entry. -+ * - * Returns: the current user's home directory - */ - G_CONST_RETURN gchar* Modified: projects/haf/branches/glib/glib-2-20/debian/patches/series =================================================================== --- projects/haf/branches/glib/glib-2-20/debian/patches/series 2009-05-07 10:56:19 UTC (rev 18278) +++ projects/haf/branches/glib/glib-2-20/debian/patches/series 2009-05-07 10:58:18 UTC (rev 18279) @@ -1,7 +1,3 @@ -01_gettext-desktopfiles.patch -02_gettext-desktopfiles-ubuntu.patch -03_blacklist-directories.patch -04_homedir_env.patch 60_wait-longer-for-threads-to-die.patch 20-gunixmount.patch 25-gatomic.patch
- Previous message: [maemo-commits] r18277 - in projects/haf/trunk/libmatchbox2: . matchbox/client-types matchbox/theme-engines
- Next message: [maemo-commits] r18281 - in projects/haf/branches/glib/glib-2-20/debian: . patches
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]