mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-01 06:45:55 +02:00
4838b7b0e9
* gnu/packages/patches/gdk-pixbuf-honor-GUIX_GDK_PIXBUF_MODULE_FILES.patch: New file. * gnu/local.mk (dist_patch_DATA): Register patch. * gnu/packages/gtk.scm (gdk-pixbuf)[source]: Add patch. [native-search-paths]: Replace GDK_PIXBUF_MODULE_FILE with GUIX_GDK_PIXBUF_MODULE_FILES. Change-Id: Ibcf6ebf33f5de2c889bc27a88d59a5f444b77906 Fixes: GDK_PIXBUF_MODULE_FILE conflicts on foreign distros <https://issues.guix.gnu.org/75523> Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
35 lines
1.3 KiB
Diff
35 lines
1.3 KiB
Diff
This patch makes gdk-pixbuf look for additional modules in a list of files
|
|
specified by the environment variable "GUIX_GDK_PIXBUF_MODULE_FILES".
|
|
|
|
A similiar patch for "GDK_PIXBUF_MODULE_FILES" had been sent to upstream:
|
|
https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/merge_requests/180
|
|
|
|
We use a "GUIX_" prefixed one to avoid breaking foreign programs:
|
|
https://issues.guix.gnu.org/63853
|
|
https://issues.guix.gnu.org/75523
|
|
|
|
Upstream-status: N/A
|
|
---
|
|
diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
|
|
index e1df590..913ce89 100644
|
|
--- a/gdk-pixbuf/gdk-pixbuf-io.c
|
|
+++ b/gdk-pixbuf/gdk-pixbuf-io.c
|
|
@@ -670,6 +670,17 @@ gdk_pixbuf_io_init (void)
|
|
gboolean ret;
|
|
|
|
gdk_pixbuf_io_init_builtin ();
|
|
+
|
|
+ /* Load modules from GUIX_GDK_PIXBUF_MODULE_FILES. */
|
|
+ gchar *module_files_env = g_getenv ("GUIX_GDK_PIXBUF_MODULE_FILES");
|
|
+ if (module_files_env) {
|
|
+ gchar **module_files = g_strsplit (module_files_env,
|
|
+ G_SEARCHPATH_SEPARATOR_S, 0);
|
|
+ for (int i = 0; module_files[i] != NULL; i++)
|
|
+ gdk_pixbuf_io_init_modules (module_files[i], NULL);
|
|
+ g_strfreev (module_files);
|
|
+ }
|
|
+
|
|
#ifdef USE_GMODULE
|
|
module_file = gdk_pixbuf_get_module_file ();
|
|
#endif
|