wok rev 7924
Removed arch patches for GConf. There not working and i don't think we need them.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sun Jan 09 22:30:39 2011 +0000 (2011-01-09) |
parents | 53dc53ed56a8 |
children | a82ead0ea109 |
files | GConf/receipt GConf/stuff/01_xml-gettext-domain.patch GConf/stuff/gconf-reload.patch |
line diff
1.1 --- a/GConf/receipt Sun Jan 09 22:22:13 2011 +0000 1.2 +++ b/GConf/receipt Sun Jan 09 22:30:39 2011 +0000 1.3 @@ -20,10 +20,7 @@ 1.4 compile_rules() 1.5 { 1.6 cd $src 1.7 - # Patch from fedora - reloads gconf after installing schemas 1.8 - patch -Np1 -i ../stuff/gconf-reload.patch 1.9 - # http://bugzilla.gnome.org/show_bug.cgi?id=568845 1.10 - patch -Np1 -i ../stuff/01_xml-gettext-domain.patch 1.11 + 1.12 ./configure \ 1.13 --prefix=/usr \ 1.14 --sysconfdir=/etc \
2.1 --- a/GConf/stuff/01_xml-gettext-domain.patch Sun Jan 09 22:22:13 2011 +0000 2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 2.3 @@ -1,362 +0,0 @@ 2.4 -# Description: Support calling gettext at runtime and putting the gettext domain into the .schemas file instead of replicating translations in /usr/share/gconf/schemas/*.schemas *and* /var/lib/gconf/defaults/%gconf-tree-$LANG.xml. This saves in the order of 90 MB uncompressed/10 MB compressed on hard disks. 2.5 -# Ubuntu: https://bugs.launchpad.net/bugs/123025 2.6 -# Upstream: http://bugzilla.gnome.org/show_bug.cgi?id=568845 2.7 ---- GConf-2.26.0/backends/markup-tree.c.gettext 2009-04-26 23:33:05.258484987 -0400 2.8 -+++ GConf-2.26.0/backends/markup-tree.c 2009-04-26 23:34:25.026700526 -0400 2.9 -@@ -52,6 +52,7 @@ struct _MarkupEntry 2.10 - char *schema_name; 2.11 - char *mod_user; 2.12 - GTime mod_time; 2.13 -+ const char *gettext_domain; 2.14 - }; 2.15 - 2.16 - static LocalSchemaInfo* local_schema_info_new (void); 2.17 -@@ -1593,6 +1594,8 @@ markup_entry_set_value (MarkupEntry 2.18 - gconf_schema_get_type (schema)); 2.19 - gconf_schema_set_owner (current_schema, 2.20 - gconf_schema_get_owner (schema)); 2.21 -+ gconf_schema_set_gettext_domain (current_schema, 2.22 -+ gconf_schema_get_gettext_domain (schema)); 2.23 - } 2.24 - 2.25 - /* Update mod time */ 2.26 -@@ -1805,6 +1808,8 @@ markup_entry_get_value (MarkupEntry *ent 2.27 - else if (c_local_schema && c_local_schema->long_desc) 2.28 - gconf_schema_set_long_desc (schema, c_local_schema->long_desc); 2.29 - 2.30 -+ gconf_schema_set_gettext_domain (schema, entry->gettext_domain); 2.31 -+ 2.32 - return retval; 2.33 - } 2.34 - } 2.35 -@@ -2339,8 +2344,9 @@ parse_value_element (GMarkupParseContext 2.36 - const char *ltype; 2.37 - const char *list_type; 2.38 - const char *owner; 2.39 -+ 2.40 - GConfValueType vtype; 2.41 -- const char *dummy1, *dummy2, *dummy3, *dummy4; 2.42 -+ const char *dummy1, *dummy2, *dummy3, *dummy4, *dummy5; 2.43 - 2.44 - #if 0 2.45 - g_assert (ELEMENT_IS ("entry") || 2.46 -@@ -2377,6 +2383,7 @@ parse_value_element (GMarkupParseContext 2.47 - "muser", &dummy2, 2.48 - "mtime", &dummy3, 2.49 - "schema", &dummy4, 2.50 -+ "gettext_domain", &dummy5, 2.51 - 2.52 - NULL)) 2.53 - return; 2.54 -@@ -2683,6 +2690,7 @@ parse_entry_element (GMarkupParseContext 2.55 - const char *mtime; 2.56 - const char *schema; 2.57 - const char *type; 2.58 -+ const char *gettext_domain; 2.59 - const char *dummy1, *dummy2, *dummy3, *dummy4; 2.60 - const char *dummy5, *dummy6, *dummy7; 2.61 - GConfValue *value; 2.62 -@@ -2693,6 +2701,7 @@ parse_entry_element (GMarkupParseContext 2.63 - mtime = NULL; 2.64 - schema = NULL; 2.65 - type = NULL; 2.66 -+ gettext_domain = NULL; 2.67 - 2.68 - if (!locate_attributes (context, element_name, attribute_names, attribute_values, 2.69 - error, 2.70 -@@ -2701,6 +2710,7 @@ parse_entry_element (GMarkupParseContext 2.71 - "mtime", &mtime, 2.72 - "schema", &schema, 2.73 - "type", &type, 2.74 -+ "gettext_domain", &gettext_domain, 2.75 - 2.76 - /* These are allowed but we don't use them until 2.77 - * parse_value_element 2.78 -@@ -2768,6 +2778,9 @@ parse_entry_element (GMarkupParseContext 2.79 - */ 2.80 - if (schema) 2.81 - entry->schema_name = g_strdup (schema); 2.82 -+ 2.83 -+ if (gettext_domain) 2.84 -+ entry->gettext_domain = g_intern_string (gettext_domain); 2.85 - } 2.86 - else 2.87 - { 2.88 -@@ -3716,6 +3729,7 @@ write_value_element (GConfValue *value, 2.89 - GConfSchema *schema; 2.90 - GConfValueType stype; 2.91 - const char *owner; 2.92 -+ const char *gettext_domain; 2.93 - 2.94 - schema = gconf_value_get_schema (value); 2.95 - 2.96 -@@ -3741,6 +3755,23 @@ write_value_element (GConfValue *value, 2.97 - 2.98 - g_free (s); 2.99 - } 2.100 -+ 2.101 -+ gettext_domain = gconf_schema_get_gettext_domain (schema); 2.102 -+ 2.103 -+ if (gettext_domain) 2.104 -+ { 2.105 -+ char *s; 2.106 -+ 2.107 -+ s = g_markup_escape_text (gettext_domain, -1); 2.108 -+ 2.109 -+ if (fprintf (f, " gettext_domain=\"%s\"", s) < 0) 2.110 -+ { 2.111 -+ g_free (s); 2.112 -+ return FALSE; 2.113 -+ } 2.114 -+ 2.115 -+ g_free (s); 2.116 -+ } 2.117 - 2.118 - if (stype == GCONF_VALUE_LIST) 2.119 - { 2.120 -diff -up GConf-2.26.0/doc/gconf-1.0.dtd.gettext GConf-2.26.0/doc/gconf-1.0.dtd 2.121 ---- GConf-2.26.0/doc/gconf-1.0.dtd.gettext 2009-04-26 23:33:17.240736103 -0400 2.122 -+++ GConf-2.26.0/doc/gconf-1.0.dtd 2009-04-26 23:34:25.027700384 -0400 2.123 -@@ -7,7 +7,7 @@ 2.124 - <!-- A single schema. What I am trying to say is "this set of 2.125 - elements, in any order". Duplicate elements (apart from <locale>) are 2.126 - not allowed). --> 2.127 --<!ELEMENT schema (key|applyto*|owner?|type|(list_type|(car_type,cdr_type))?|default?|locale*)*> 2.128 -+<!ELEMENT schema (key|applyto*|owner?|type|(list_type|(car_type,cdr_type))?|default?|locale*|gettext_domain?)*> 2.129 - 2.130 - <!-- The key for this schema (e.g. /schemas/apps/foo/bar) --> 2.131 - <!ELEMENT key (#PCDATA)> 2.132 -diff -up GConf-2.26.0/gconf/gconf-internals.c.gettext GConf-2.26.0/gconf/gconf-internals.c 2.133 ---- GConf-2.26.0/gconf/gconf-internals.c.gettext 2009-04-26 23:34:10.994700035 -0400 2.134 -+++ GConf-2.26.0/gconf/gconf-internals.c 2009-04-26 23:34:53.767450191 -0400 2.135 -@@ -513,6 +513,7 @@ gconf_fill_corba_schema_from_gconf_schem 2.136 - cs->short_desc = CORBA_string_dup (gconf_schema_get_short_desc (sc) ? gconf_schema_get_short_desc (sc) : ""); 2.137 - cs->long_desc = CORBA_string_dup (gconf_schema_get_long_desc (sc) ? gconf_schema_get_long_desc (sc) : ""); 2.138 - cs->owner = CORBA_string_dup (gconf_schema_get_owner (sc) ? gconf_schema_get_owner (sc) : ""); 2.139 -+ cs->gettext_domain = CORBA_string_dup (gconf_schema_get_gettext_domain (sc) ? gconf_schema_get_gettext_domain (sc) : ""); 2.140 - 2.141 - { 2.142 - gchar* encoded; 2.143 -@@ -600,6 +601,14 @@ gconf_schema_from_corba_schema(const Con 2.144 - gconf_schema_set_owner(sc, cs->owner); 2.145 - } 2.146 - 2.147 -+ if (*cs->gettext_domain != '\0') 2.148 -+ { 2.149 -+ if (!g_utf8_validate (cs->gettext_domain, -1, NULL)) 2.150 -+ gconf_log (GCL_ERR, _("Invalid UTF-8 in gettext domain for schema")); 2.151 -+ else 2.152 -+ gconf_schema_set_gettext_domain(sc, cs->gettext_domain); 2.153 -+ } 2.154 -+ 2.155 - { 2.156 - GConfValue* val; 2.157 - 2.158 -diff -up GConf-2.26.0/gconf/gconf-schema.c.gettext GConf-2.26.0/gconf/gconf-schema.c 2.159 ---- GConf-2.26.0/gconf/gconf-schema.c.gettext 2009-04-26 23:33:26.787483545 -0400 2.160 -+++ GConf-2.26.0/gconf/gconf-schema.c 2009-04-26 23:35:54.240450142 -0400 2.161 -@@ -32,9 +32,10 @@ typedef struct { 2.162 - GConfValueType car_type; /* Pair car type of the described entry */ 2.163 - GConfValueType cdr_type; /* Pair cdr type of the described entry */ 2.164 - gchar* locale; /* Schema locale */ 2.165 -- gchar* owner; /* Name of creating application */ 2.166 -+ const gchar* owner; /* Name of creating application */ 2.167 - gchar* short_desc; /* 40 char or less description, no newlines */ 2.168 - gchar* long_desc; /* could be a paragraph or so */ 2.169 -+ const gchar* gettext_domain; /* description gettext domain */ 2.170 - GConfValue* default_value; /* Default value of the key */ 2.171 - } GConfRealSchema; 2.172 - 2.173 -@@ -63,7 +64,6 @@ gconf_schema_free (GConfSchema* sc) 2.174 - g_free (real->locale); 2.175 - g_free (real->short_desc); 2.176 - g_free (real->long_desc); 2.177 -- g_free (real->owner); 2.178 - 2.179 - if (real->default_value) 2.180 - gconf_value_free (real->default_value); 2.181 -@@ -91,7 +91,9 @@ gconf_schema_copy (const GConfSchema* sc 2.182 - 2.183 - dest->long_desc = g_strdup (real->long_desc); 2.184 - 2.185 -- dest->owner = g_strdup (real->owner); 2.186 -+ dest->gettext_domain = real->gettext_domain; 2.187 -+ 2.188 -+ dest->owner = real->owner; 2.189 - 2.190 - dest->default_value = real->default_value ? gconf_value_copy (real->default_value) : NULL; 2.191 - 2.192 -@@ -136,6 +138,17 @@ gconf_schema_set_locale (GConfSchema* sc 2.193 - REAL_SCHEMA (sc)->locale = NULL; 2.194 - } 2.195 - 2.196 -+void 2.197 -+gconf_schema_set_gettext_domain (GConfSchema* sc, const gchar* domain) 2.198 -+{ 2.199 -+ g_return_if_fail (domain == NULL || g_utf8_validate (domain, -1, NULL)); 2.200 -+ 2.201 -+ if (domain) 2.202 -+ REAL_SCHEMA (sc)->gettext_domain = g_intern_string (domain); 2.203 -+ else 2.204 -+ REAL_SCHEMA (sc)->gettext_domain = NULL; 2.205 -+} 2.206 -+ 2.207 - void 2.208 - gconf_schema_set_short_desc (GConfSchema* sc, const gchar* desc) 2.209 - { 2.210 -@@ -169,11 +182,8 @@ gconf_schema_set_owner (GConfSchema* sc, 2.211 - { 2.212 - g_return_if_fail (owner == NULL || g_utf8_validate (owner, -1, NULL)); 2.213 - 2.214 -- if (REAL_SCHEMA (sc)->owner) 2.215 -- g_free (REAL_SCHEMA (sc)->owner); 2.216 -- 2.217 - if (owner) 2.218 -- REAL_SCHEMA (sc)->owner = g_strdup (owner); 2.219 -+ REAL_SCHEMA (sc)->owner = g_intern_string (owner); 2.220 - else 2.221 - REAL_SCHEMA (sc)->owner = NULL; 2.222 - } 2.223 -@@ -228,6 +238,14 @@ gconf_schema_validate (const GConfSchema 2.224 - return FALSE; 2.225 - } 2.226 - 2.227 -+ if (real->gettext_domain && !g_utf8_validate (real->gettext_domain, -1, NULL)) 2.228 -+ { 2.229 -+ g_set_error (err, GCONF_ERROR, 2.230 -+ GCONF_ERROR_FAILED, 2.231 -+ _("Schema contains invalid UTF-8")); 2.232 -+ return FALSE; 2.233 -+ } 2.234 -+ 2.235 - if (real->owner && !g_utf8_validate (real->owner, -1, NULL)) 2.236 - { 2.237 - g_set_error (err, GCONF_ERROR, 2.238 -@@ -299,11 +317,32 @@ gconf_schema_get_locale (const GConfSche 2.239 - } 2.240 - 2.241 - const char* 2.242 -+gconf_schema_get_gettext_domain (const GConfSchema *schema) 2.243 -+{ 2.244 -+ g_return_val_if_fail (schema != NULL, NULL); 2.245 -+ 2.246 -+ return REAL_SCHEMA (schema)->gettext_domain; 2.247 -+} 2.248 -+ 2.249 -+static inline const char * 2.250 -+schema_translate (const GConfSchema *schema, 2.251 -+ const char *string) 2.252 -+{ 2.253 -+ if (REAL_SCHEMA (schema)->gettext_domain) 2.254 -+ { 2.255 -+ bind_textdomain_codeset (REAL_SCHEMA (schema)->gettext_domain, "UTF-8"); 2.256 -+ return g_dgettext(REAL_SCHEMA (schema)->gettext_domain, string); 2.257 -+ } 2.258 -+ else 2.259 -+ return string; 2.260 -+} 2.261 -+ 2.262 -+const char* 2.263 - gconf_schema_get_short_desc (const GConfSchema *schema) 2.264 - { 2.265 - g_return_val_if_fail (schema != NULL, NULL); 2.266 - 2.267 -- return REAL_SCHEMA (schema)->short_desc; 2.268 -+ return schema_translate (schema, REAL_SCHEMA (schema)->short_desc); 2.269 - } 2.270 - 2.271 - const char* 2.272 -@@ -311,7 +350,7 @@ gconf_schema_get_long_desc (const GConfS 2.273 - { 2.274 - g_return_val_if_fail (schema != NULL, NULL); 2.275 - 2.276 -- return REAL_SCHEMA (schema)->long_desc; 2.277 -+ return schema_translate (schema, REAL_SCHEMA (schema)->long_desc); 2.278 - } 2.279 - 2.280 - const char* 2.281 -diff -up GConf-2.26.0/gconf/gconf-schema.h.gettext GConf-2.26.0/gconf/gconf-schema.h 2.282 ---- GConf-2.26.0/gconf/gconf-schema.h.gettext 2009-04-26 23:33:33.979744088 -0400 2.283 -+++ GConf-2.26.0/gconf/gconf-schema.h 2009-04-26 23:34:25.030737043 -0400 2.284 -@@ -48,6 +48,8 @@ void gconf_schema_set_cdr_type 2.285 - GConfValueType type); 2.286 - void gconf_schema_set_locale (GConfSchema *sc, 2.287 - const gchar *locale); 2.288 -+void gconf_schema_set_gettext_domain (GConfSchema *sc, 2.289 -+ const gchar *domain); 2.290 - void gconf_schema_set_short_desc (GConfSchema *sc, 2.291 - const gchar *desc); 2.292 - void gconf_schema_set_long_desc (GConfSchema *sc, 2.293 -@@ -65,6 +67,7 @@ GConfValueType gconf_schema_get_list_typ 2.294 - GConfValueType gconf_schema_get_car_type (const GConfSchema *schema); 2.295 - GConfValueType gconf_schema_get_cdr_type (const GConfSchema *schema); 2.296 - const char* gconf_schema_get_locale (const GConfSchema *schema); 2.297 -+const char* gconf_schema_get_gettext_domain(const GConfSchema *schema); 2.298 - const char* gconf_schema_get_short_desc (const GConfSchema *schema); 2.299 - const char* gconf_schema_get_long_desc (const GConfSchema *schema); 2.300 - const char* gconf_schema_get_owner (const GConfSchema *schema); 2.301 -diff -up GConf-2.26.0/gconf/gconftool.c.gettext GConf-2.26.0/gconf/gconftool.c 2.302 ---- GConf-2.26.0/gconf/gconftool.c.gettext 2009-04-26 23:33:41.907451190 -0400 2.303 -+++ GConf-2.26.0/gconf/gconftool.c 2009-04-26 23:34:25.034736752 -0400 2.304 -@@ -3295,6 +3295,7 @@ struct _SchemaInfo { 2.305 - GConfValueType cdr_type; 2.306 - GConfValue* global_default; 2.307 - GHashTable* hash; 2.308 -+ gchar* gettext_domain; 2.309 - }; 2.310 - 2.311 - static int 2.312 -@@ -3547,6 +3548,15 @@ extract_global_info(xmlNodePtr node, 2.313 - else 2.314 - g_printerr (_("WARNING: empty <applyto> node")); 2.315 - } 2.316 -+ else if (strcmp((char *)iter->name, "gettext_domain") == 0) 2.317 -+ { 2.318 -+ tmp = (char *)xmlNodeGetContent(iter); 2.319 -+ if (tmp) 2.320 -+ { 2.321 -+ info->gettext_domain = g_strdup(tmp); 2.322 -+ xmlFree(tmp); 2.323 -+ } 2.324 -+ } 2.325 - else 2.326 - g_printerr (_("WARNING: node <%s> not understood below <schema>\n"), 2.327 - iter->name); 2.328 -@@ -3636,6 +3646,9 @@ process_locale_info(xmlNodePtr node, Sch 2.329 - if (info->owner != NULL) 2.330 - gconf_schema_set_owner(schema, info->owner); 2.331 - 2.332 -+ if (info->gettext_domain != NULL) 2.333 -+ gconf_schema_set_gettext_domain(schema, info->gettext_domain); 2.334 -+ 2.335 - xmlFree(name); 2.336 - 2.337 - /* Locale-specific info */ 2.338 -@@ -3765,6 +3778,7 @@ get_schema_from_xml(xmlNodePtr node, gch 2.339 - info.apply_to = NULL; 2.340 - info.owner = NULL; 2.341 - info.global_default = NULL; 2.342 -+ info.gettext_domain = NULL; 2.343 - info.hash = g_hash_table_new(g_str_hash, g_str_equal); 2.344 - 2.345 - extract_global_info(node, &info); 2.346 -@@ -3801,6 +3815,8 @@ get_schema_from_xml(xmlNodePtr node, gch 2.347 - ; /* nothing */ 2.348 - else if (strcmp((char *)iter->name, "applyto") == 0) 2.349 - ; /* nothing */ 2.350 -+ else if (strcmp((char *)iter->name, "gettext_domain") == 0) 2.351 -+ ; /* nothing */ 2.352 - else if (strcmp((char *)iter->name, "locale") == 0) 2.353 - { 2.354 - process_locale_info(iter, &info); 2.355 -diff -up GConf-2.26.0/gconf/GConfX.idl.gettext GConf-2.26.0/gconf/GConfX.idl 2.356 ---- GConf-2.26.0/gconf/GConfX.idl.gettext 2009-04-26 23:33:58.457483190 -0400 2.357 -+++ GConf-2.26.0/gconf/GConfX.idl 2009-04-26 23:34:53.764448732 -0400 2.358 -@@ -16,6 +16,7 @@ struct ConfigSchema { 2.359 - string short_desc; 2.360 - string long_desc; 2.361 - string owner; 2.362 -+ string gettext_domain; 2.363 - // Work around lack of recursive data types 2.364 - string encoded_default_value; 2.365 - };
3.1 --- a/GConf/stuff/gconf-reload.patch Sun Jan 09 22:22:13 2011 +0000 3.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 3.3 @@ -1,20 +0,0 @@ 3.4 ---- GConf-2.16.0/gconf/gconftool.c.orig 2006-10-14 17:37:14.000000000 +0000 3.5 -+++ GConf-2.16.0/gconf/gconftool.c 2006-10-14 17:39:27.000000000 +0000 3.6 -@@ -963,6 +963,8 @@ main (int argc, char** argv) 3.7 - 3.8 - gconf_engine_unref (conf); 3.9 - 3.10 -+ g_spawn_command_line_sync ("/usr/bin/killall -q -TERM " GCONF_SERVERDIR "/" GCONFD, NULL, NULL, NULL, NULL); 3.11 -+ 3.12 - return retval; 3.13 - } 3.14 - 3.15 -@@ -975,6 +977,8 @@ main (int argc, char** argv) 3.16 - 3.17 - gconf_engine_unref (conf); 3.18 - 3.19 -+ g_spawn_command_line_sync ("/usr/bin/killall -q -TERM " GCONF_SERVERDIR "/" GCONFD, NULL, NULL, NULL, NULL); 3.20 -+ 3.21 - return retval; 3.22 - } 3.23 -