[gtk-osx] Patch GtkSpell so that it looks in XDG_DATA_DIRS for iso-codes.
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-osx] Patch GtkSpell so that it looks in XDG_DATA_DIRS for iso-codes.
- Date: Fri, 9 Sep 2016 23:06:18 +0000 (UTC)
commit d7b8c1d75e50f68842243e15f3cc37ee4229c1e1
Author: John Ralls <jralls ceridwen us>
Date: Fri Sep 9 16:03:49 2016 -0700
Patch GtkSpell so that it looks in XDG_DATA_DIRS for iso-codes.
If XDG_DATA_DIRS is set. Note that if it is set and the iso-codes are
somewhere else and GtkSpell was built for that somewhere else it will
break because it will look only in iso-codes.
modulesets-stable/gtk-osx-random.modules | 3 +-
...of-XDG_DATA_DIRS-for-locating-iso-code-fi.patch | 29 ++++++++++++++++++++
2 files changed, 31 insertions(+), 1 deletions(-)
---
diff --git a/modulesets-stable/gtk-osx-random.modules b/modulesets-stable/gtk-osx-random.modules
index ebbc182..3c7f9e5 100644
--- a/modulesets-stable/gtk-osx-random.modules
+++ b/modulesets-stable/gtk-osx-random.modules
@@ -405,7 +405,8 @@ Libglade itself is deprecated. This is the last release. -->
<autotools id="gtkspell3" autogen-sh="configure">
<branch module="gtkspell/gtkspell3-3.0.7.tar.gz" repo="sourceforge"
- version="3.0.7">
+ version="3.0.7">
+ <patch
file="https://git.gnome.org/browse/gtk-osx/plain/patches/0001-Enable-use-of-XDG_DATA_DIRS-for-locating-iso-code-fi.patch"
strip="1"/>
</branch>
<dependencies>
<dep package="enchant"/>
diff --git a/patches/0001-Enable-use-of-XDG_DATA_DIRS-for-locating-iso-code-fi.patch
b/patches/0001-Enable-use-of-XDG_DATA_DIRS-for-locating-iso-code-fi.patch
new file mode 100644
index 0000000..b4d0348
--- /dev/null
+++ b/patches/0001-Enable-use-of-XDG_DATA_DIRS-for-locating-iso-code-fi.patch
@@ -0,0 +1,29 @@
+From afc08dfa25dc5a26d3f0ffae8bf31d3be0e89b57 Mon Sep 17 00:00:00 2001
+From: John Ralls <jralls ceridwen us>
+Date: Fri, 9 Sep 2016 15:46:34 -0700
+Subject: [PATCH] Enable use of XDG_DATA_DIRS for locating iso-code files.
+
+Permits using them in a relocatable package like a Mac application bundle.
+---
+ gtkspell/gtkspell-codetable.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/gtkspell/gtkspell-codetable.c b/gtkspell/gtkspell-codetable.c
+index b53951f..dcb5f1e 100644
+--- a/gtkspell/gtkspell-codetable.c
++++ b/gtkspell/gtkspell-codetable.c
+@@ -103,7 +103,10 @@ iso_codes_parse (const GMarkupParser *parser,
+ gchar *filename;
+ GError *error = NULL;
+
+- filename = g_build_filename (ISO_CODES_PREFIX, "share", "xml", "iso-codes",
++ const gchar *dirname = g_getenv("XDG_DATA_DIRS");
++ if (dirname == NULL)
++ dirname = g_build_filename (ISO_CODES_PREFIX, "share", NULL);
++ filename = g_build_filename (dirname, "xml", "iso-codes",
+ basename, NULL);
+ mapped_file = g_mapped_file_new (filename, FALSE, &error);
+ g_free (filename);
+--
+2.2.2
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]