From 69f0e4720d2168ba4fd398f43465a7c7f802c159 Mon Sep 17 00:00:00 2001 From: bill-auger Date: Thu, 23 Apr 2020 01:06:05 -0400 Subject: [gninjam][gconfmm][gconf-gtk2]: add packages --- pcr/gconf-gtk2/01_xml-gettext-domain.patch | 362 +++++++++++++++++++++ pcr/gconf-gtk2/PKGBUILD | 80 +++++ pcr/gconf-gtk2/dbus-dontspew.patch | 86 +++++ pcr/gconf-gtk2/gconf-install.hook | 11 + pcr/gconf-gtk2/gconf-merge-schema | 34 ++ pcr/gconf-gtk2/gconf-reload.patch | 20 ++ pcr/gconf-gtk2/gconf-remove.hook | 10 + pcr/gconf-gtk2/gconf.install | 17 + pcr/gconf-gtk2/gconfpkg | 50 +++ ...ings-data-convert-fix-invalid-schema-path.patch | 44 +++ pcr/gconfmm/PKGBUILD | 41 +++ pcr/gninjam/PKGBUILD | 38 +++ 12 files changed, 793 insertions(+) create mode 100644 pcr/gconf-gtk2/01_xml-gettext-domain.patch create mode 100644 pcr/gconf-gtk2/PKGBUILD create mode 100644 pcr/gconf-gtk2/dbus-dontspew.patch create mode 100644 pcr/gconf-gtk2/gconf-install.hook create mode 100755 pcr/gconf-gtk2/gconf-merge-schema create mode 100644 pcr/gconf-gtk2/gconf-reload.patch create mode 100644 pcr/gconf-gtk2/gconf-remove.hook create mode 100644 pcr/gconf-gtk2/gconf.install create mode 100755 pcr/gconf-gtk2/gconfpkg create mode 100644 pcr/gconf-gtk2/gsettings-data-convert-fix-invalid-schema-path.patch create mode 100644 pcr/gconfmm/PKGBUILD create mode 100644 pcr/gninjam/PKGBUILD diff --git a/pcr/gconf-gtk2/01_xml-gettext-domain.patch b/pcr/gconf-gtk2/01_xml-gettext-domain.patch new file mode 100644 index 000000000..d1323f61f --- /dev/null +++ b/pcr/gconf-gtk2/01_xml-gettext-domain.patch @@ -0,0 +1,362 @@ +# 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. +# Ubuntu: https://bugs.launchpad.net/bugs/123025 +# Upstream: http://bugzilla.gnome.org/show_bug.cgi?id=568845 +--- GConf-2.26.0/backends/markup-tree.c.gettext 2009-04-26 23:33:05.258484987 -0400 ++++ GConf-2.26.0/backends/markup-tree.c 2009-04-26 23:34:25.026700526 -0400 +@@ -52,6 +52,7 @@ struct _MarkupEntry + char *schema_name; + char *mod_user; + GTime mod_time; ++ const char *gettext_domain; + }; + + static LocalSchemaInfo* local_schema_info_new (void); +@@ -1593,6 +1594,8 @@ markup_entry_set_value (MarkupEntry + gconf_schema_get_type (schema)); + gconf_schema_set_owner (current_schema, + gconf_schema_get_owner (schema)); ++ gconf_schema_set_gettext_domain (current_schema, ++ gconf_schema_get_gettext_domain (schema)); + } + + /* Update mod time */ +@@ -1805,6 +1808,8 @@ markup_entry_get_value (MarkupEntry *ent + else if (c_local_schema && c_local_schema->long_desc) + gconf_schema_set_long_desc (schema, c_local_schema->long_desc); + ++ gconf_schema_set_gettext_domain (schema, entry->gettext_domain); ++ + return retval; + } + } +@@ -2339,8 +2344,9 @@ parse_value_element (GMarkupParseContext + const char *ltype; + const char *list_type; + const char *owner; ++ + GConfValueType vtype; +- const char *dummy1, *dummy2, *dummy3, *dummy4; ++ const char *dummy1, *dummy2, *dummy3, *dummy4, *dummy5; + + #if 0 + g_assert (ELEMENT_IS ("entry") || +@@ -2377,6 +2383,7 @@ parse_value_element (GMarkupParseContext + "muser", &dummy2, + "mtime", &dummy3, + "schema", &dummy4, ++ "gettext_domain", &dummy5, + + NULL)) + return; +@@ -2683,6 +2690,7 @@ parse_entry_element (GMarkupParseContext + const char *mtime; + const char *schema; + const char *type; ++ const char *gettext_domain; + const char *dummy1, *dummy2, *dummy3, *dummy4; + const char *dummy5, *dummy6, *dummy7; + GConfValue *value; +@@ -2693,6 +2701,7 @@ parse_entry_element (GMarkupParseContext + mtime = NULL; + schema = NULL; + type = NULL; ++ gettext_domain = NULL; + + if (!locate_attributes (context, element_name, attribute_names, attribute_values, + error, +@@ -2701,6 +2710,7 @@ parse_entry_element (GMarkupParseContext + "mtime", &mtime, + "schema", &schema, + "type", &type, ++ "gettext_domain", &gettext_domain, + + /* These are allowed but we don't use them until + * parse_value_element +@@ -2768,6 +2778,9 @@ parse_entry_element (GMarkupParseContext + */ + if (schema) + entry->schema_name = g_strdup (schema); ++ ++ if (gettext_domain) ++ entry->gettext_domain = g_intern_string (gettext_domain); + } + else + { +@@ -3716,6 +3729,7 @@ write_value_element (GConfValue *value, + GConfSchema *schema; + GConfValueType stype; + const char *owner; ++ const char *gettext_domain; + + schema = gconf_value_get_schema (value); + +@@ -3741,6 +3755,23 @@ write_value_element (GConfValue *value, + + g_free (s); + } ++ ++ gettext_domain = gconf_schema_get_gettext_domain (schema); ++ ++ if (gettext_domain) ++ { ++ char *s; ++ ++ s = g_markup_escape_text (gettext_domain, -1); ++ ++ if (fprintf (f, " gettext_domain=\"%s\"", s) < 0) ++ { ++ g_free (s); ++ return FALSE; ++ } ++ ++ g_free (s); ++ } + + if (stype == GCONF_VALUE_LIST) + { +diff -up GConf-2.26.0/doc/gconf-1.0.dtd.gettext GConf-2.26.0/doc/gconf-1.0.dtd +--- GConf-2.26.0/doc/gconf-1.0.dtd.gettext 2009-04-26 23:33:17.240736103 -0400 ++++ GConf-2.26.0/doc/gconf-1.0.dtd 2009-04-26 23:34:25.027700384 -0400 +@@ -7,7 +7,7 @@ + +- ++ + + + +diff -up GConf-2.26.0/gconf/gconf-internals.c.gettext GConf-2.26.0/gconf/gconf-internals.c +--- GConf-2.26.0/gconf/gconf-internals.c.gettext 2009-04-26 23:34:10.994700035 -0400 ++++ GConf-2.26.0/gconf/gconf-internals.c 2009-04-26 23:34:53.767450191 -0400 +@@ -513,6 +513,7 @@ gconf_fill_corba_schema_from_gconf_schem + cs->short_desc = CORBA_string_dup (gconf_schema_get_short_desc (sc) ? gconf_schema_get_short_desc (sc) : ""); + cs->long_desc = CORBA_string_dup (gconf_schema_get_long_desc (sc) ? gconf_schema_get_long_desc (sc) : ""); + cs->owner = CORBA_string_dup (gconf_schema_get_owner (sc) ? gconf_schema_get_owner (sc) : ""); ++ cs->gettext_domain = CORBA_string_dup (gconf_schema_get_gettext_domain (sc) ? gconf_schema_get_gettext_domain (sc) : ""); + + { + gchar* encoded; +@@ -600,6 +601,14 @@ gconf_schema_from_corba_schema(const Con + gconf_schema_set_owner(sc, cs->owner); + } + ++ if (*cs->gettext_domain != '\0') ++ { ++ if (!g_utf8_validate (cs->gettext_domain, -1, NULL)) ++ gconf_log (GCL_ERR, _("Invalid UTF-8 in gettext domain for schema")); ++ else ++ gconf_schema_set_gettext_domain(sc, cs->gettext_domain); ++ } ++ + { + GConfValue* val; + +diff -up GConf-2.26.0/gconf/gconf-schema.c.gettext GConf-2.26.0/gconf/gconf-schema.c +--- GConf-2.26.0/gconf/gconf-schema.c.gettext 2009-04-26 23:33:26.787483545 -0400 ++++ GConf-2.26.0/gconf/gconf-schema.c 2009-04-26 23:35:54.240450142 -0400 +@@ -32,9 +32,10 @@ typedef struct { + GConfValueType car_type; /* Pair car type of the described entry */ + GConfValueType cdr_type; /* Pair cdr type of the described entry */ + gchar* locale; /* Schema locale */ +- gchar* owner; /* Name of creating application */ ++ const gchar* owner; /* Name of creating application */ + gchar* short_desc; /* 40 char or less description, no newlines */ + gchar* long_desc; /* could be a paragraph or so */ ++ const gchar* gettext_domain; /* description gettext domain */ + GConfValue* default_value; /* Default value of the key */ + } GConfRealSchema; + +@@ -63,7 +64,6 @@ gconf_schema_free (GConfSchema* sc) + g_free (real->locale); + g_free (real->short_desc); + g_free (real->long_desc); +- g_free (real->owner); + + if (real->default_value) + gconf_value_free (real->default_value); +@@ -91,7 +91,9 @@ gconf_schema_copy (const GConfSchema* sc + + dest->long_desc = g_strdup (real->long_desc); + +- dest->owner = g_strdup (real->owner); ++ dest->gettext_domain = real->gettext_domain; ++ ++ dest->owner = real->owner; + + dest->default_value = real->default_value ? gconf_value_copy (real->default_value) : NULL; + +@@ -136,6 +138,17 @@ gconf_schema_set_locale (GConfSchema* sc + REAL_SCHEMA (sc)->locale = NULL; + } + ++void ++gconf_schema_set_gettext_domain (GConfSchema* sc, const gchar* domain) ++{ ++ g_return_if_fail (domain == NULL || g_utf8_validate (domain, -1, NULL)); ++ ++ if (domain) ++ REAL_SCHEMA (sc)->gettext_domain = g_intern_string (domain); ++ else ++ REAL_SCHEMA (sc)->gettext_domain = NULL; ++} ++ + void + gconf_schema_set_short_desc (GConfSchema* sc, const gchar* desc) + { +@@ -169,11 +182,8 @@ gconf_schema_set_owner (GConfSchema* sc, + { + g_return_if_fail (owner == NULL || g_utf8_validate (owner, -1, NULL)); + +- if (REAL_SCHEMA (sc)->owner) +- g_free (REAL_SCHEMA (sc)->owner); +- + if (owner) +- REAL_SCHEMA (sc)->owner = g_strdup (owner); ++ REAL_SCHEMA (sc)->owner = g_intern_string (owner); + else + REAL_SCHEMA (sc)->owner = NULL; + } +@@ -228,6 +238,14 @@ gconf_schema_validate (const GConfSchema + return FALSE; + } + ++ if (real->gettext_domain && !g_utf8_validate (real->gettext_domain, -1, NULL)) ++ { ++ g_set_error (err, GCONF_ERROR, ++ GCONF_ERROR_FAILED, ++ _("Schema contains invalid UTF-8")); ++ return FALSE; ++ } ++ + if (real->owner && !g_utf8_validate (real->owner, -1, NULL)) + { + g_set_error (err, GCONF_ERROR, +@@ -299,11 +317,32 @@ gconf_schema_get_locale (const GConfSche + } + + const char* ++gconf_schema_get_gettext_domain (const GConfSchema *schema) ++{ ++ g_return_val_if_fail (schema != NULL, NULL); ++ ++ return REAL_SCHEMA (schema)->gettext_domain; ++} ++ ++static inline const char * ++schema_translate (const GConfSchema *schema, ++ const char *string) ++{ ++ if (REAL_SCHEMA (schema)->gettext_domain) ++ { ++ bind_textdomain_codeset (REAL_SCHEMA (schema)->gettext_domain, "UTF-8"); ++ return g_dgettext(REAL_SCHEMA (schema)->gettext_domain, string); ++ } ++ else ++ return string; ++} ++ ++const char* + gconf_schema_get_short_desc (const GConfSchema *schema) + { + g_return_val_if_fail (schema != NULL, NULL); + +- return REAL_SCHEMA (schema)->short_desc; ++ return schema_translate (schema, REAL_SCHEMA (schema)->short_desc); + } + + const char* +@@ -311,7 +350,7 @@ gconf_schema_get_long_desc (const GConfS + { + g_return_val_if_fail (schema != NULL, NULL); + +- return REAL_SCHEMA (schema)->long_desc; ++ return schema_translate (schema, REAL_SCHEMA (schema)->long_desc); + } + + const char* +diff -up GConf-2.26.0/gconf/gconf-schema.h.gettext GConf-2.26.0/gconf/gconf-schema.h +--- GConf-2.26.0/gconf/gconf-schema.h.gettext 2009-04-26 23:33:33.979744088 -0400 ++++ GConf-2.26.0/gconf/gconf-schema.h 2009-04-26 23:34:25.030737043 -0400 +@@ -48,6 +48,8 @@ void gconf_schema_set_cdr_type + GConfValueType type); + void gconf_schema_set_locale (GConfSchema *sc, + const gchar *locale); ++void gconf_schema_set_gettext_domain (GConfSchema *sc, ++ const gchar *domain); + void gconf_schema_set_short_desc (GConfSchema *sc, + const gchar *desc); + void gconf_schema_set_long_desc (GConfSchema *sc, +@@ -65,6 +67,7 @@ GConfValueType gconf_schema_get_list_typ + GConfValueType gconf_schema_get_car_type (const GConfSchema *schema); + GConfValueType gconf_schema_get_cdr_type (const GConfSchema *schema); + const char* gconf_schema_get_locale (const GConfSchema *schema); ++const char* gconf_schema_get_gettext_domain(const GConfSchema *schema); + const char* gconf_schema_get_short_desc (const GConfSchema *schema); + const char* gconf_schema_get_long_desc (const GConfSchema *schema); + const char* gconf_schema_get_owner (const GConfSchema *schema); +diff -up GConf-2.26.0/gconf/gconftool.c.gettext GConf-2.26.0/gconf/gconftool.c +--- GConf-2.26.0/gconf/gconftool.c.gettext 2009-04-26 23:33:41.907451190 -0400 ++++ GConf-2.26.0/gconf/gconftool.c 2009-04-26 23:34:25.034736752 -0400 +@@ -3295,6 +3295,7 @@ struct _SchemaInfo { + GConfValueType cdr_type; + GConfValue* global_default; + GHashTable* hash; ++ gchar* gettext_domain; + }; + + static int +@@ -3547,6 +3548,15 @@ extract_global_info(xmlNodePtr node, + else + g_printerr (_("WARNING: empty node")); + } ++ else if (strcmp((char *)iter->name, "gettext_domain") == 0) ++ { ++ tmp = (char *)xmlNodeGetContent(iter); ++ if (tmp) ++ { ++ info->gettext_domain = g_strdup(tmp); ++ xmlFree(tmp); ++ } ++ } + else + g_printerr (_("WARNING: node <%s> not understood below \n"), + iter->name); +@@ -3636,6 +3646,9 @@ process_locale_info(xmlNodePtr node, Sch + if (info->owner != NULL) + gconf_schema_set_owner(schema, info->owner); + ++ if (info->gettext_domain != NULL) ++ gconf_schema_set_gettext_domain(schema, info->gettext_domain); ++ + xmlFree(name); + + /* Locale-specific info */ +@@ -3765,6 +3778,7 @@ get_schema_from_xml(xmlNodePtr node, gch + info.apply_to = NULL; + info.owner = NULL; + info.global_default = NULL; ++ info.gettext_domain = NULL; + info.hash = g_hash_table_new(g_str_hash, g_str_equal); + + extract_global_info(node, &info); +@@ -3801,6 +3815,8 @@ get_schema_from_xml(xmlNodePtr node, gch + ; /* nothing */ + else if (strcmp((char *)iter->name, "applyto") == 0) + ; /* nothing */ ++ else if (strcmp((char *)iter->name, "gettext_domain") == 0) ++ ; /* nothing */ + else if (strcmp((char *)iter->name, "locale") == 0) + { + process_locale_info(iter, &info); +diff -up GConf-2.26.0/gconf/GConfX.idl.gettext GConf-2.26.0/gconf/GConfX.idl +--- GConf-2.26.0/gconf/GConfX.idl.gettext 2009-04-26 23:33:58.457483190 -0400 ++++ GConf-2.26.0/gconf/GConfX.idl 2009-04-26 23:34:53.764448732 -0400 +@@ -16,6 +16,7 @@ struct ConfigSchema { + string short_desc; + string long_desc; + string owner; ++ string gettext_domain; + // Work around lack of recursive data types + string encoded_default_value; + }; diff --git a/pcr/gconf-gtk2/PKGBUILD b/pcr/gconf-gtk2/PKGBUILD new file mode 100644 index 000000000..8615e9eda --- /dev/null +++ b/pcr/gconf-gtk2/PKGBUILD @@ -0,0 +1,80 @@ +# Maintainer: bill-auger +# Maintainer (AUR): Brian Bidulock +# Contributor (AUR): Jan de Groot + + +pkgname=gconf-gtk2 +pkgver=3.2.6 +pkgrel=5 +pkgdesc="A configuration database system compiled for GTK2" +arch=(armv7h i686 x86_64) +license=('LGPL') +provides=("gconf=$pkgver") +conflicts=('gconf') +depends=('libxml2' 'polkit' 'libldap' 'dbus-glib' 'gtk2') +makedepends=('intltool' 'gtk-doc' 'gobject-introspection') +install=gconf.install +url="http://www.gnome.org" +source=(https://download.gnome.org/sources/GConf/3.2/GConf-$pkgver.tar.xz + gconf-merge-schema + gconfpkg + gconf-reload.patch + gconf-{install,remove}.hook + 01_xml-gettext-domain.patch + dbus-dontspew.patch + gsettings-data-convert-fix-invalid-schema-path.patch) +# the AUR repo also contains these unused files +# * gconf-dbus-fix-shutdown.patch +# * gconf-dbus-fix-use-after-free.patch +# * gsettings-schema-convert-dont-fail.patch +sha256sums=('1912b91803ab09a5eed34d364bf09fe3a2a9c96751fde03a4e0cfa51a04d784c' + 'ee6b6e6f4975dad13a8c45f1c1f0547a99373bdecdcd6604bfc12965c328a028' + 'bf1928718caa5df2b9e54a13cfd0f15a8fe0e09e86b84385ce023616a114e898' + '567b78d8b4b4bbcb77c5f134d57bc503c34867fcc6341c0b01716bcaa4a21694' + '2732b2a6b187c5620105a036bde12edee99669605f70cbde56fe5f39619c3dc0' + '436a65ff290095bc3d35d7d6297cf4d647f61e9f9922cea7ef9f1e251b447ff7' + 'c883dec2b96978874a53700cfe7f26f24f8296767203e970bc6402b4b9945eb8' + 'b490394b0f541ca92134478fa2235536bdb1ccd3b3200d5040dd458cec33bfe8' + '0f2057fbd20837091cbcc1e291bb64c9c6066534891a4ee010bbf5b304bd831d') + +prepare() { + cd "GConf-$pkgver" + + # Patch from fedora - reloads gconf after installing schemas + patch -Np1 -i "$srcdir/gconf-reload.patch" + # http://bugzilla.gnome.org/show_bug.cgi?id=568845 + patch -Np1 -i "$srcdir/01_xml-gettext-domain.patch" + + # Upstream fixes + patch -Np1 -i ../dbus-dontspew.patch + patch -Np1 -i ../gsettings-data-convert-fix-invalid-schema-path.patch + + # Python2 fix + sed -i '1s|#!/usr/bin/env python$|&2|' gsettings/gsettings-schema-convert +} + +build() { + cd "GConf-$pkgver" + + ./configure --prefix=/usr --sysconfdir=/etc \ + --localstatedir=/var --libexecdir=/usr/lib/GConf \ + --disable-static --enable-defaults-service \ + --with-gtk=2.0 \ + --disable-orbit + + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool + + make pkglibdir=/usr/lib/GConf +} + +package() { + cd "GConf-$pkgver" + make DESTDIR="$pkgdir" install + + install -m755 -d "$pkgdir/etc/gconf/gconf.xml.system" + install -m755 "$srcdir/gconf-merge-schema" "$pkgdir/usr/bin/" + install -m755 "$srcdir/gconfpkg" "$pkgdir/usr/bin/gconfpkg" + + install -dm755 "$pkgdir"/usr/share/libalpm/hooks/ + install -m644 "$srcdir"/gconf-{install,remove}.hook "$pkgdir"/usr/share/libalpm/hooks/ +} diff --git a/pcr/gconf-gtk2/dbus-dontspew.patch b/pcr/gconf-gtk2/dbus-dontspew.patch new file mode 100644 index 000000000..0b4cd37af --- /dev/null +++ b/pcr/gconf-gtk2/dbus-dontspew.patch @@ -0,0 +1,86 @@ +From b0895e1998ebc83ab030ec0f17c0685439f5b404 Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Mon, 15 Apr 2013 09:57:34 -0400 +Subject: dbus: Don't spew to console when unable to connect to dbus daemon + +Instead pass the error up for the caller to decide what to do. + +This prevent untrappable warning messages from showing up at the +console if gconftool --makefile-install-rule is called. +--- + gconf/gconf-dbus.c | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) + +diff --git a/gconf/gconf-dbus.c b/gconf/gconf-dbus.c +index 5610fcf..048e3ea 100644 +--- a/gconf/gconf-dbus.c ++++ b/gconf/gconf-dbus.c +@@ -105,7 +105,7 @@ static GHashTable *engines_by_db = NULL; + static GHashTable *engines_by_address = NULL; + static gboolean dbus_disconnected = FALSE; + +-static gboolean ensure_dbus_connection (void); ++static gboolean ensure_dbus_connection (GError **error); + static gboolean ensure_service (gboolean start_if_not_found, + GError **err); + static gboolean ensure_database (GConfEngine *conf, +@@ -383,7 +383,7 @@ gconf_engine_detach (GConfEngine *conf) + } + + static gboolean +-ensure_dbus_connection (void) ++ensure_dbus_connection (GError **err) + { + DBusError error; + +@@ -392,7 +392,9 @@ ensure_dbus_connection (void) + + if (dbus_disconnected) + { +- g_warning ("The connection to DBus was broken. Can't reinitialize it."); ++ g_set_error (err, GCONF_ERROR, ++ GCONF_ERROR_NO_SERVER, ++ "The connection to DBus was broken. Can't reinitialize it."); + return FALSE; + } + +@@ -402,7 +404,10 @@ ensure_dbus_connection (void) + + if (!global_conn) + { +- g_warning ("Client failed to connect to the D-BUS daemon:\n%s", error.message); ++ g_set_error (err, GCONF_ERROR, ++ GCONF_ERROR_NO_SERVER, ++ "Client failed to connect to the D-BUS daemon:\n%s", ++ error.message); + + dbus_error_free (&error); + return FALSE; +@@ -431,13 +436,8 @@ ensure_service (gboolean start_if_not_found, + + if (global_conn == NULL) + { +- if (!ensure_dbus_connection ()) +- { +- g_set_error (err, GCONF_ERROR, +- GCONF_ERROR_NO_SERVER, +- _("No D-BUS daemon running\n")); +- return FALSE; +- } ++ if (!ensure_dbus_connection (err)) ++ return FALSE; + + g_assert (global_conn != NULL); + } +@@ -2512,7 +2512,7 @@ gconf_ping_daemon (void) + { + if (global_conn == NULL) + { +- if (!ensure_dbus_connection ()) ++ if (!ensure_dbus_connection (NULL)) + { + return FALSE; + } +-- +cgit v0.12 + diff --git a/pcr/gconf-gtk2/gconf-install.hook b/pcr/gconf-gtk2/gconf-install.hook new file mode 100644 index 000000000..999185458 --- /dev/null +++ b/pcr/gconf-gtk2/gconf-install.hook @@ -0,0 +1,11 @@ +[Trigger] +Type = File +Operation = Install +Operation = Upgrade +Target = usr/share/gconf/schemas/*.schemas + +[Action] +Description = Installing GConf schemas... +When = PostTransaction +Exec = /bin/bash -c 'while read -r f; do f=$(basename "$f" .schemas); /usr/bin/gconfpkg --install $f; done' +NeedsTargets diff --git a/pcr/gconf-gtk2/gconf-merge-schema b/pcr/gconf-gtk2/gconf-merge-schema new file mode 100755 index 000000000..992c162e6 --- /dev/null +++ b/pcr/gconf-gtk2/gconf-merge-schema @@ -0,0 +1,34 @@ +#!/bin/bash +if [ ! "$1" -a ! "$2" ]; then + echo "Usage: $0 output.schemas [--domain gettextdomain] file1.schemas [file2.schemas [...]]" + exit 1 +fi + +OUTFILE="$1" +DOMAIN="" +shift + +if [ "$1" = "--domain" ]; then + shift + DOMAIN=$1 + shift +fi + +echo '' > "$OUTFILE" +echo '' >> "$OUTFILE" + +while [ "$1" ]; do + if [ -f "$1" ]; then + sed -e '/||g' \ + -e 's|||g' \ + -e 's|||g' \ + -e 's|||g' "$1" >> "$OUTFILE" + fi + shift +done + +echo '' >> "$OUTFILE" +if [ "$DOMAIN" != "" ]; then + sed -ri "s/^([[:space:]]*)()/\1$DOMAIN<\/gettext_domain>\n\1\2/; /^[[:space:]]*[[:space:]]*\$/ d; /^$/d; s/<\/schema>$/&\n/" "$OUTFILE" +fi diff --git a/pcr/gconf-gtk2/gconf-reload.patch b/pcr/gconf-gtk2/gconf-reload.patch new file mode 100644 index 000000000..910f0dae4 --- /dev/null +++ b/pcr/gconf-gtk2/gconf-reload.patch @@ -0,0 +1,20 @@ +--- GConf-2.16.0/gconf/gconftool.c.orig 2006-10-14 17:37:14.000000000 +0000 ++++ GConf-2.16.0/gconf/gconftool.c 2006-10-14 17:39:27.000000000 +0000 +@@ -963,6 +963,8 @@ main (int argc, char** argv) + + gconf_engine_unref (conf); + ++ g_spawn_command_line_sync ("/usr/bin/killall -q -TERM " GCONF_SERVERDIR "/" GCONFD, NULL, NULL, NULL, NULL); ++ + return retval; + } + +@@ -975,6 +977,8 @@ main (int argc, char** argv) + + gconf_engine_unref (conf); + ++ g_spawn_command_line_sync ("/usr/bin/killall -q -TERM " GCONF_SERVERDIR "/" GCONFD, NULL, NULL, NULL, NULL); ++ + return retval; + } + diff --git a/pcr/gconf-gtk2/gconf-remove.hook b/pcr/gconf-gtk2/gconf-remove.hook new file mode 100644 index 000000000..8206d1e29 --- /dev/null +++ b/pcr/gconf-gtk2/gconf-remove.hook @@ -0,0 +1,10 @@ +[Trigger] +Type = File +Operation = Remove +Target = usr/share/gconf/schemas/*.schemas + +[Action] +Description = Uninstalling GConf schemas... +When = PreTransaction +Exec = /bin/bash -c 'while read -r f; do f=$(basename "$f" .schemas); /usr/bin/gconfpkg --uninstall $f; done' +NeedsTargets diff --git a/pcr/gconf-gtk2/gconf.install b/pcr/gconf-gtk2/gconf.install new file mode 100644 index 000000000..a5ea777a5 --- /dev/null +++ b/pcr/gconf-gtk2/gconf.install @@ -0,0 +1,17 @@ +post_install() { + ldconfig -r . + chmod 755 etc/gconf/gconf.xml.system + usr/bin/gio-querymodules usr/lib/gio/modules +} + +post_upgrade() { + ldconfig -r . + chmod 755 etc/gconf/gconf.xml.system + usr/bin/gio-querymodules usr/lib/gio/modules + + pkill /usr/lib/GConf/gconfd-2 || return 0 +} + +post_remove() { + usr/bin/gio-querymodules usr/lib/gio/modules +} diff --git a/pcr/gconf-gtk2/gconfpkg b/pcr/gconf-gtk2/gconfpkg new file mode 100755 index 000000000..72021e45e --- /dev/null +++ b/pcr/gconf-gtk2/gconfpkg @@ -0,0 +1,50 @@ +#!/bin/sh + +usage() { +cat << _EOF +Usage: + gconfpkg [OPTION] [PACKAGE] + + Help Options: + -?, --help Show help options + + Application Options: + --install Install schemas for a given package + --uninstall Uninstall schemas for a given package + +_EOF +} + +install() { + GCONF_CONFIG_SOURCE=`/usr/bin/gconftool-2 --get-default-source` \ + /usr/bin/gconftool-2 --makefile-install-rule /usr/share/gconf/schemas/${pkgname}.schemas >/dev/null +} + +uninstall() { + if [ -f /usr/share/gconf/schemas/${pkgname}.schemas ]; then + schemas=/usr/share/gconf/schemas/${pkgname}.schemas + elif [ -f /opt/gnome/share/gconf/schemas/${pkgname}.schemas ]; then + schemas=/opt/gnome/share/gconf/schemas/${pkgname}.schemas + else + schemas=`pacman -Ql ${pkgname} | grep 'gconf/schemas/.*schemas$' | awk '{ print $2 }'` + fi + GCONF_CONFIG_SOURCE=`/usr/bin/gconftool-2 --get-default-source` \ + /usr/bin/gconftool-2 --makefile-uninstall-rule ${schemas} >/dev/null +} + +if [ -z "$2" ]; then + usage +else + pkgname="$2" + case "$1" in + --install) + install + ;; + --uninstall) + uninstall + ;; + *) + usage + ;; + esac +fi diff --git a/pcr/gconf-gtk2/gsettings-data-convert-fix-invalid-schema-path.patch b/pcr/gconf-gtk2/gsettings-data-convert-fix-invalid-schema-path.patch new file mode 100644 index 000000000..9a141d354 --- /dev/null +++ b/pcr/gconf-gtk2/gsettings-data-convert-fix-invalid-schema-path.patch @@ -0,0 +1,44 @@ +From 405f865c07261a95c8c9a09a84ab679c6dd0a330 Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Thu, 24 Oct 2013 16:27:24 -0400 +Subject: gsettings-data-convert: Warn (and fix) invalid schema paths + +See https://bugzilla.gnome.org/show_bug.cgi?id=704802 + +https://bugzilla.gnome.org/show_bug.cgi?id=710836 +--- + gsettings/gsettings-data-convert.c | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +diff --git a/gsettings/gsettings-data-convert.c b/gsettings/gsettings-data-convert.c +index 9b2d1d0..160ed41 100644 +--- a/gsettings/gsettings-data-convert.c ++++ b/gsettings/gsettings-data-convert.c +@@ -182,7 +182,23 @@ handle_file (const gchar *filename) + } + + if (schema_path[1] != NULL) +- settings = g_settings_new_with_path (schema_path[0], schema_path[1]); ++ { ++ char *compat_path_alloced = NULL; ++ char *compat_path; ++ /* Work around broken .convert files: ++ https://bugzilla.gnome.org/show_bug.cgi?id=704802 ++ */ ++ if (!g_str_has_suffix (schema_path[1], "/")) ++ { ++ g_warning ("Schema file '%s' has missing trailing / in '%s'", ++ filename, schema_path[1]); ++ compat_path = compat_path_alloced = g_strconcat (schema_path[1], "/", NULL); ++ } ++ else ++ compat_path = schema_path[1]; ++ settings = g_settings_new_with_path (schema_path[0], compat_path); ++ g_free (compat_path_alloced); ++ } + else + settings = g_settings_new (schema_path[0]); + +-- +cgit v0.12 + diff --git a/pcr/gconfmm/PKGBUILD b/pcr/gconfmm/PKGBUILD new file mode 100644 index 000000000..257afebab --- /dev/null +++ b/pcr/gconfmm/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: bill-auger +# Maintainer (AUR): Andrew Sun +# Contributor (AUR): Jan de Groot +# Contributor (AUR): Kritoke + + +pkgbase=gconfmm +pkgname=('gconfmm' 'gconfmm-docs') +pkgver=2.28.3 +pkgrel=6 +arch=(i686 x86_64) # archarm carries this package +url="http://gconfmm.sourceforge.net/" +license=('LGPL') +makedepends=('pkgconfig' 'gtkmm' 'glibmm-docs' 'gconf' 'glibmm') +source=(https://download.gnome.org/sources/${pkgname}/2.28/${pkgname}-${pkgver}.tar.xz) +sha256sums=('d7bd2d29c1a87b85329547fb29a0eca52d944e60699982152775002e24c09228') + +build() { + cd "${srcdir}/${pkgbase}-${pkgver}" + CXXFLAGS+=' -std=c++11' + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var + make +} + +package_gconfmm() { + pkgdesc="C++ bindings for GConf" + depends=('gconf' 'glibmm') + + cd "${srcdir}/${pkgbase}-${pkgver}" + sed -i -e 's/^doc_subdirs/#doc_subdirs/' Makefile + make DESTDIR="${pkgdir}" install +} + +package_gconfmm-docs() { + pkgdesc="Developer documentation for gconfmm" + + cd "${srcdir}/${pkgbase}-${pkgver}/docs" + make DESTDIR="${pkgdir}" install +} diff --git a/pcr/gninjam/PKGBUILD b/pcr/gninjam/PKGBUILD new file mode 100644 index 000000000..6cf577f44 --- /dev/null +++ b/pcr/gninjam/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: bill-auger + + +pkgname=gninjam +pkgver=0.1.1 +pkgrel=1 +pkgdesc="GTK NINJAM client" +arch=(armv7h i686 x86_64) +url=https://github.com/libninjam/gninjam +license=(GPL2) +groups=(pro-audio) + +depends=(gconf-gtk2 gconfmm gtkmm 'libninjam>=0.7') +source=(${pkgname}-${pkgver}.tar.gz::https://github.com/libninjam/${pkgname}/archive/v${pkgver}.tar.gz) +sha256sums=('022e4bae0f2afb07b6f2ff90c818178bfabb3d21451ce6be74c26b54d1dfc875') + + +prepare() +{ + cd ${pkgname}-${pkgver} + + ./autogen.sh + ./configure --prefix=/usr +} + +build() +{ + cd ${pkgname}-${pkgver} + + make +} + +package() +{ + cd ${pkgname}-${pkgver} + + make DESTDIR="${pkgdir}/" install +} -- cgit v1.2.3