From cca66b9ec4e494c1d919bff0f71a820d8afab1fa Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:24:48 +0200 Subject: Adding upstream version 1.2.2. Signed-off-by: Daniel Baumann --- .../modulesets/patches/enchant-relocatable.patch | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 packaging/macos/modulesets/patches/enchant-relocatable.patch (limited to 'packaging/macos/modulesets/patches/enchant-relocatable.patch') diff --git a/packaging/macos/modulesets/patches/enchant-relocatable.patch b/packaging/macos/modulesets/patches/enchant-relocatable.patch new file mode 100644 index 0000000..602b5c1 --- /dev/null +++ b/packaging/macos/modulesets/patches/enchant-relocatable.patch @@ -0,0 +1,38 @@ +diff --git a/src/lib.c b/src/lib.c +index d9d3c54..ae3642f 100644 +--- a/src/lib.c ++++ b/src/lib.c +@@ -130,6 +130,10 @@ enchant_get_conf_dirs (void) + char *pkgconfdir = NULL; + char *user_config_dir = NULL; + ++ const char *prefix = g_getenv("ENCHANT_PREFIX"); ++ if (prefix) ++ conf_dirs = g_slist_append(conf_dirs, g_build_filename(prefix, "/share/enchant", NULL)); ++ + if ((pkgdatadir = enchant_relocate (PKGDATADIR)) == NULL) + goto error_exit; + conf_dirs = g_slist_append (conf_dirs, pkgdatadir); +@@ -148,6 +152,7 @@ enchant_get_conf_dirs (void) + return conf_dirs; + + error_exit: ++ g_warning("error_exit in enchant_get_conf_dirs"); + free (pkgdatadir); + free (sysconfdir); + g_free (pkgconfdir); +@@ -878,7 +883,13 @@ enchant_load_providers_in_dir (EnchantBroker * broker, const char *dir_name) + static void + enchant_load_providers (EnchantBroker * broker) + { +- char *module_dir = enchant_relocate (PKGLIBDIR "-" ENCHANT_MAJOR_VERSION); ++ const char *prefix = g_getenv("ENCHANT_PREFIX"); ++ char *module_dir = NULL; ++ if (prefix) ++ module_dir = g_build_filename(prefix, "/lib/enchant-2", NULL); ++ else ++ module_dir = enchant_relocate (PKGLIBDIR "-" ENCHANT_MAJOR_VERSION); ++ + if (module_dir) + enchant_load_providers_in_dir (broker, module_dir); + free (module_dir); -- cgit v1.2.3