Skip to content

Commit

Permalink
glib.recipe: Fix loading of GIO modules on Windows/MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
nirbheek committed Nov 27, 2019
1 parent 580966e commit 75f55c2
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
2 changes: 2 additions & 0 deletions recipes/glib.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ class Recipe(recipe.Recipe):
'glib/0001-gio-Also-support-modules-built-with-MSVC.patch',
# https://gitlab.gnome.org/GNOME/glib/merge_requests/187
'glib/0001-meson-use-the-new-python-module-instead-of-the-pytho.patch',
# https://gitlab.gnome.org/GNOME/glib/merge_requests/1254
'glib/0001-giomodule-gio-modules-are-no-longer-installed-in-bin.patch',
]

files_libs = [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From dd8fc003d4c3c0e622b61885367c29a1ddd27af9 Mon Sep 17 00:00:00 2001
From: Nirbheek Chauhan <nirbheek@centricular.com>
Date: Tue, 26 Nov 2019 23:45:19 +0530
Subject: [PATCH] giomodule: gio modules are no longer installed in bindir on
MSVC

Ever since the port to Meson, gio modules (f.ex., by glib-networking)
are installed inside libdir both for MinGW and MSVC.
---
gio/giomodule.c | 9 ---------
1 file changed, 9 deletions(-)

diff --git a/gio/giomodule.c b/gio/giomodule.c
index 10c608b..2b3dfb1 100644
--- a/gio/giomodule.c
+++ b/gio/giomodule.c
@@ -1076,18 +1076,9 @@ get_gio_module_dir (void)
gchar *install_dir;

install_dir = g_win32_get_package_installation_directory_of_module (gio_dll);
-#ifdef _MSC_VER
- /* On Visual Studio builds we have all the libraries and binaries in bin
- * so better load the gio modules from bin instead of lib
- */
- module_dir = g_build_filename (install_dir,
- "bin", "gio", "modules",
- NULL);
-#else
module_dir = g_build_filename (install_dir,
"lib", "gio", "modules",
NULL);
-#endif
g_free (install_dir);
#else
module_dir = g_strdup (GIO_MODULE_DIR);
--
2.23.0

0 comments on commit 75f55c2

Please sign in to comment.