[gedit/wip/3.14-osx] [osx] Make enchant relocatable
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit/wip/3.14-osx] [osx] Make enchant relocatable
- Date: Mon, 25 Aug 2014 17:02:25 +0000 (UTC)
commit 65adc6461669aead4bb74481a6bb653319e8b359
Author: Jesse van den Kieboom <jessevdk gmail com>
Date: Mon Aug 25 18:43:18 2014 +0200
[osx] Make enchant relocatable
osx/build/modulesets/gedit.modules | 1 +
.../patches/enchant/enchant-relocatable.patch | 39 ++++++++++++++++++++
osx/build/updater/gedit-overrides.modules | 1 +
.../updater/patches/enchant-relocatable.patch | 39 ++++++++++++++++++++
4 files changed, 80 insertions(+), 0 deletions(-)
---
diff --git a/osx/build/modulesets/gedit.modules b/osx/build/modulesets/gedit.modules
index 4164282..b582100 100644
--- a/osx/build/modulesets/gedit.modules
+++ b/osx/build/modulesets/gedit.modules
@@ -398,6 +398,7 @@
<branch module="1.6.0/enchant-1.6.0.tar.gz" version="1.6.0" repo="abisource/enchant">
<patch file="enchant/enchant-gsize.patch" strip="1"/>
<patch file="enchant/enchant-applespell.patch" strip="1"/>
+ <patch file="enchant/enchant-relocatable.patch" strip="1"/>
</branch>
<dependencies>
<dep package="glib"/>
diff --git a/osx/build/modulesets/patches/enchant/enchant-relocatable.patch
b/osx/build/modulesets/patches/enchant/enchant-relocatable.patch
new file mode 100644
index 0000000..9aee961
--- /dev/null
+++ b/osx/build/modulesets/patches/enchant/enchant-relocatable.patch
@@ -0,0 +1,39 @@
+--- a/src/enchant.c 2010-04-01 22:53:37.000000000 +0200
++++ b/src/enchant.c 2014-08-25 17:30:02.000000000 +0200
+@@ -210,6 +210,13 @@
+ char * module_dir = NULL;
+ char * prefix = NULL;
+
++ const char *envdir = 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,7 @@
+ 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));
++ /*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 +285,13 @@
+ if (ordering_dir)
+ conf_dirs = enchant_slist_append_unique_path (conf_dirs, ordering_dir);
+
++ const char *envdir = 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)
diff --git a/osx/build/updater/gedit-overrides.modules b/osx/build/updater/gedit-overrides.modules
index ddf2313..e7b6e62 100644
--- a/osx/build/updater/gedit-overrides.modules
+++ b/osx/build/updater/gedit-overrides.modules
@@ -21,6 +21,7 @@
repo="abisource/enchant">
<patch file="http://git.gnome.org/browse/gtk-osx/plain/patches/enchant-gsize.patch" strip="1"/>
<patch file="patches/enchant-applespell.patch" strip="1"/>
+ <patch file="patches/enchant-relocatable.patch" strip="1"/>
</branch>
<dependencies>
<dep package="glib"/>
diff --git a/osx/build/updater/patches/enchant-relocatable.patch
b/osx/build/updater/patches/enchant-relocatable.patch
new file mode 100644
index 0000000..9aee961
--- /dev/null
+++ b/osx/build/updater/patches/enchant-relocatable.patch
@@ -0,0 +1,39 @@
+--- a/src/enchant.c 2010-04-01 22:53:37.000000000 +0200
++++ b/src/enchant.c 2014-08-25 17:30:02.000000000 +0200
+@@ -210,6 +210,13 @@
+ char * module_dir = NULL;
+ char * prefix = NULL;
+
++ const char *envdir = 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,7 @@
+ 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));
++ /*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 +285,13 @@
+ if (ordering_dir)
+ conf_dirs = enchant_slist_append_unique_path (conf_dirs, ordering_dir);
+
++ const char *envdir = 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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]