diff --git a/0001-Don-t-start-a-DBus-server-when-built-as-static-lib.patch b/0001-Don-t-start-a-DBus-server-when-built-as-static-lib.patch new file mode 100644 index 0000000..a44de7d --- /dev/null +++ b/0001-Don-t-start-a-DBus-server-when-built-as-static-lib.patch @@ -0,0 +1,47 @@ +From f40b1bdb92a2a1d77bc7b451add6a587cc270100 Mon Sep 17 00:00:00 2001 +From: Erik van Pienbroek +Date: Sat, 5 May 2012 18:10:47 +0200 +Subject: [PATCH] Don't start a DBus server when built as static lib + +The new Win32 DBus server code which was recently introduced works +by retrieving the path of the gio DLL and using rundll32.exe to +create a new process which starts a DBus server using the gio DLL. + +This doesn't work when GLib is built as a static library as there is no +gio DLL available in that case. Therefore the code which tries to start +a DBus server using the above steps doesn't have to be executed as it +will always fail. + +This commit makes sure that no attempt is done to start a DBus server when +using a static compiled GLib and that a proper error message is automatically +returned to the caller. This also fixes a compilation failure which occurs +when GLib is compiled as static library +--- + gio/gdbusaddress.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c +index 4aa13b9..5fba139 100644 +--- a/gio/gdbusaddress.c ++++ b/gio/gdbusaddress.c +@@ -1390,6 +1390,8 @@ get_session_address_dbus_launch (GError **error) + + release_mutex (init_mutex); + ++#ifdef DLL_EXPORT ++ + if (address == NULL) + { + gio_path[MAX_PATH] = 0; +@@ -1428,6 +1430,8 @@ get_session_address_dbus_launch (GError **error) + } + } + ++#endif ++ + release_mutex (autolaunch_mutex); + + if (address == NULL) +-- +1.7.10.1 + diff --git a/mingw-glib2.spec b/mingw-glib2.spec index 8c93e2a..ee2b5fb 100644 --- a/mingw-glib2.spec +++ b/mingw-glib2.spec @@ -2,7 +2,7 @@ Name: mingw-glib2 Version: 2.32.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: MinGW Windows GLib2 library License: LGPLv2+ @@ -35,6 +35,10 @@ BuildRequires: gettext # Native version required for glib-genmarshal BuildRequires: glib2-devel >= 2.31.20 +# https://bugzilla.gnome.org/show_bug.cgi?id=675516 +Patch0: 0001-Don-t-start-a-DBus-server-when-built-as-static-lib.patch + + %description MinGW Windows Glib2 library. @@ -74,6 +78,7 @@ Static version of the MinGW Windows GLib2 library. %prep %setup -q -n glib-%{version} +%patch0 -p1 %build @@ -252,6 +257,9 @@ find $RPM_BUILD_ROOT -name "*.la" -delete %changelog +* Sat May 05 2012 Erik van Pienbroek - 2.32.2-2 +- Fix compile failure while building static library (GNOME BZ #675516) + * Tue May 01 2012 Kalev Lember - 2.32.2-1 - Update to 2.32.2 - Dropped upstreamed patches