summaryrefslogtreecommitdiff
path: root/glib
diff options
context:
space:
mode:
authorFredrik Rinnestam <fredrik@crux.nu>2014-09-04 23:29:07 +0200
committerFredrik Rinnestam <fredrik@crux.nu>2014-09-06 12:46:23 +0200
commit078a1e09886c81fc9caefbc6b78ca17bd80eae41 (patch)
treee366d83d42edb3fe22d87c7a208ae7c11f1a41a0 /glib
parente7d166a74d690e871836608c644ba32bb7eff84d (diff)
downloadopt-078a1e09886c81fc9caefbc6b78ca17bd80eae41.tar.gz
opt-078a1e09886c81fc9caefbc6b78ca17bd80eae41.tar.xz
glib: refined patch
Diffstat (limited to 'glib')
-rw-r--r--glib/.md5sum1
-rw-r--r--glib/Pkgfile6
-rw-r--r--glib/no-schemas-segfault-fix-2.patch77
3 files changed, 82 insertions, 2 deletions
diff --git a/glib/.md5sum b/glib/.md5sum
index 8d8b91eea..c077f0f85 100644
--- a/glib/.md5sum
+++ b/glib/.md5sum
@@ -1 +1,2 @@
05fb7cb17eacbc718e90366a1eae60d9 glib-2.40.0.tar.xz
+24872bc2df71836f349a0b9f246e20bf no-schemas-segfault-fix-2.patch
diff --git a/glib/Pkgfile b/glib/Pkgfile
index a9a47ed9b..4e2d90828 100644
--- a/glib/Pkgfile
+++ b/glib/Pkgfile
@@ -5,11 +5,13 @@
name=glib
version=2.40.0
-release=1
-source=(http://download.gnome.org/sources/$name/2.40/$name-$version.tar.xz)
+release=3
+source=(http://download.gnome.org/sources/$name/2.40/$name-$version.tar.xz \
+ no-schemas-segfault-fix-2.patch)
build () {
cd $name-$version
+ patch -p1 -i $SRC/no-schemas-segfault-fix-2.patch
./configure --prefix=/usr \
--disable-man \
diff --git a/glib/no-schemas-segfault-fix-2.patch b/glib/no-schemas-segfault-fix-2.patch
new file mode 100644
index 000000000..d13eceb4c
--- /dev/null
+++ b/glib/no-schemas-segfault-fix-2.patch
@@ -0,0 +1,77 @@
+diff -u -N -r a/gio/gsettingsschema.c b/gio/gsettingsschema.c
+--- a/gio/gsettingsschema.c 2014-02-12 21:08:36.000000000 +0100
++++ b/gio/gsettingsschema.c 2014-09-04 20:50:16.923420403 +0200
+@@ -200,6 +200,9 @@
+ GSettingsSchemaSource *
+ g_settings_schema_source_ref (GSettingsSchemaSource *source)
+ {
++ if (source == NULL)
++ g_error ("g_settings_schema_source_ref() called with source == NULL!");
++
+ g_atomic_int_inc (&source->ref_count);
+
+ return source;
+@@ -216,6 +219,9 @@
+ void
+ g_settings_schema_source_unref (GSettingsSchemaSource *source)
+ {
++ if (source == NULL)
++ g_error ("g_settings_schema_source_unref() called with source == NULL!");
++
+ if (g_atomic_int_dec_and_test (&source->ref_count))
+ {
+ if (source == schema_sources)
+diff -u -N -r a/gio/gsettings-tool.c b/gio/gsettings-tool.c
+--- a/gio/gsettings-tool.c 2014-02-03 18:40:41.000000000 +0100
++++ b/gio/gsettings-tool.c 2014-09-04 21:09:40.306794238 +0200
+@@ -674,6 +674,8 @@
+ gchar *tmp;
+ #endif
+
++ GSettingsSchemaSource * schema_source;
++
+ setlocale (LC_ALL, "");
+ textdomain (GETTEXT_PACKAGE);
+
+@@ -692,7 +694,25 @@
+ if (argc < 2)
+ return gsettings_help (FALSE, NULL);
+
+- global_schema_source = g_settings_schema_source_ref (g_settings_schema_source_get_default ());
++ if (strcmp (argv[1], "help") == 0)
++ if (argc == 2)
++ return gsettings_help (TRUE, NULL);
++ else
++ return gsettings_help (TRUE, argv[2]);
++
++ if (argc == 2 && strcmp (argv[1], "--version") == 0)
++ {
++ gsettings_print_version();
++ return 0;
++ }
++
++ schema_source = g_settings_schema_source_get_default ();
++ if (schema_source == NULL)
++ {
++ g_printerr (_("No global schema source found!\n"));
++ return 1;
++ }
++ global_schema_source = g_settings_schema_source_ref (schema_source);
+
+ if (argc > 3 && g_str_equal (argv[1], "--schemadir"))
+ {
+@@ -715,13 +735,7 @@
+ argc -= 2;
+ }
+
+- if (strcmp (argv[1], "help") == 0)
+- return gsettings_help (TRUE, argv[2]);
+-
+- else if (argc == 2 && strcmp (argv[1], "--version") == 0)
+- function = gsettings_print_version;
+-
+- else if (argc == 2 && strcmp (argv[1], "list-schemas") == 0)
++ if (argc == 2 && strcmp (argv[1], "list-schemas") == 0)
+ function = gsettings_list_schemas;
+
+ else if (argc == 2 && strcmp (argv[1], "list-relocatable-schemas") == 0)

Generated by cgit