summaryrefslogtreecommitdiffstats
path: root/build-aux/osx/build/updater/patches/enchant-relocatable.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 14:32:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 14:32:59 +0000
commitadb934701975f6b0214475d1a8d0d1ce727b9d4d (patch)
tree5688c745d10b64c8856586864ec416a6bdae881d /build-aux/osx/build/updater/patches/enchant-relocatable.patch
parentInitial commit. (diff)
downloadgedit-upstream.tar.xz
gedit-upstream.zip
Adding upstream version 3.38.1.upstream/3.38.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'build-aux/osx/build/updater/patches/enchant-relocatable.patch')
-rw-r--r--build-aux/osx/build/updater/patches/enchant-relocatable.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/build-aux/osx/build/updater/patches/enchant-relocatable.patch b/build-aux/osx/build/updater/patches/enchant-relocatable.patch
new file mode 100644
index 0000000..7e56eb7
--- /dev/null
+++ b/build-aux/osx/build/updater/patches/enchant-relocatable.patch
@@ -0,0 +1,40 @@
+--- a/src/enchant.c 2010-04-01 22:53:37.000000000 +0200
++++ b/src/enchant.c 2014-08-26 21:32:21.000000000 +0200
+@@ -210,6 +210,13 @@
+ char * module_dir = NULL;
+ char * prefix = NULL;
+
++ const char *envdir = g_getenv ("ENCHANT_MODULES_DIR");
++
++ if (envdir != NULL && *envdir != '\0')
++ {
++ module_dirs = enchant_slist_append_unique_path (module_dirs, g_strdup (envdir));
++ }
++
+ {
+ char* user_module_dir;
+
+@@ -239,7 +246,8 @@
+ module_dirs = enchant_slist_append_unique_path (module_dirs, module_dir);
+
+ #if defined(ENCHANT_GLOBAL_MODULE_DIR)
+- module_dirs = enchant_slist_append_unique_path (module_dirs, g_strdup (ENCHANT_GLOBAL_MODULE_DIR));
++ if (envdir == NULL || *envdir == '\0')
++ module_dirs = enchant_slist_append_unique_path (module_dirs, g_strdup (ENCHANT_GLOBAL_MODULE_DIR));
+ #else
+ /* Dynamically locate library and search for modules relative to it. */
+ prefix = enchant_get_prefix_dir();
+@@ -278,6 +286,13 @@
+ if (ordering_dir)
+ conf_dirs = enchant_slist_append_unique_path (conf_dirs, ordering_dir);
+
++ const char *envdir = g_getenv ("ENCHANT_DATA_DIR");
++
++ if (envdir != NULL && *envdir != '\0')
++ {
++ conf_dirs = enchant_slist_append_unique_path (conf_dirs, g_strdup (envdir));
++ }
++
+ /* Dynamically locate library and search for files relative to it. */
+ prefix = enchant_get_prefix_dir();
+ if(prefix)