mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
gnome2.libgnome: fix for new glib (my own patch)
This commit is contained in:
parent
ec736312d4
commit
469d098083
2 changed files with 68 additions and 1 deletions
|
@ -9,7 +9,9 @@ stdenv.mkDerivation rec {
|
|||
major = "2"; minor = "32"; patchlevel = "1";
|
||||
sha256 = "197pnq8y0knqjhm2fg4j6hbqqm3qfzfnd0irhwxpk1b4hqb3kimj";
|
||||
};
|
||||
|
||||
|
||||
patches = [ ./new-glib.patch ];
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ popt zlib intltool GConf gnome_vfs libcanberra libtool ];
|
||||
propagatedBuildInputs = [ glib libbonobo ];
|
||||
|
|
65
pkgs/desktops/gnome-2/platform/libgnome/new-glib.patch
Normal file
65
pkgs/desktops/gnome-2/platform/libgnome/new-glib.patch
Normal file
|
@ -0,0 +1,65 @@
|
|||
Porting libgnome to newer glib:
|
||||
* remove g_thread_init and g_thread_supported, which are longer needed
|
||||
https://developer.gnome.org/glib/2.36/glib-Deprecated-Thread-APIs.html#g-thread-init
|
||||
* replace GStaticRecMutex by GRecMutex
|
||||
https://developer.gnome.org/glib/2.36/glib-Deprecated-Thread-APIs.html#GStaticRecMutex
|
||||
|
||||
diff --git a/libgnome/gnome-i18n.c b/libgnome/gnome-i18n.c
|
||||
index 531c56c..f13d61e 100644
|
||||
--- a/libgnome/gnome-i18n.c
|
||||
+++ b/libgnome/gnome-i18n.c
|
||||
@@ -55,12 +55,14 @@
|
||||
const GList *
|
||||
gnome_i18n_get_language_list (const gchar *ignored)
|
||||
{
|
||||
- static GStaticRecMutex lang_list_lock = G_STATIC_REC_MUTEX_INIT;
|
||||
+ static GRecMutex lang_list_lock;
|
||||
+ g_rec_mutex_init (&lang_list_lock);
|
||||
+
|
||||
static GList *list = NULL;
|
||||
const char * const* langs;
|
||||
int i;
|
||||
|
||||
- g_static_rec_mutex_lock (&lang_list_lock);
|
||||
+ g_rec_mutex_lock (&lang_list_lock);
|
||||
|
||||
if (list == NULL) {
|
||||
langs = g_get_language_names ();
|
||||
@@ -71,7 +73,7 @@ gnome_i18n_get_language_list (const gchar *ignored)
|
||||
list = g_list_reverse (list);
|
||||
}
|
||||
|
||||
- g_static_rec_mutex_unlock (&lang_list_lock);
|
||||
+ g_rec_mutex_unlock (&lang_list_lock);
|
||||
|
||||
return list;
|
||||
}
|
||||
diff --git a/libgnome/gnome-init.c b/libgnome/gnome-init.c
|
||||
index fe3efd4..c6619af 100644
|
||||
--- a/libgnome/gnome-init.c
|
||||
+++ b/libgnome/gnome-init.c
|
||||
@@ -115,9 +115,6 @@ gnome_bonobo_module_info_get (void)
|
||||
static void
|
||||
bonobo_activation_pre_args_parse (GnomeProgram *program, GnomeModuleInfo *mod_info)
|
||||
{
|
||||
- if (!g_thread_supported ())
|
||||
- g_thread_init (NULL);
|
||||
-
|
||||
if (!bonobo_activation_is_initialized ())
|
||||
bonobo_activation_preinit (program, mod_info);
|
||||
}
|
||||
diff --git a/libgnome/gnome-program.c b/libgnome/gnome-program.c
|
||||
index 739765e..cd14999 100644
|
||||
--- a/libgnome/gnome-program.c
|
||||
+++ b/libgnome/gnome-program.c
|
||||
@@ -1878,10 +1878,6 @@ gnome_program_init (const char *app_id, const char *app_version,
|
||||
GnomeProgram *program;
|
||||
va_list args;
|
||||
|
||||
- /* g_thread_init() has to be the first GLib function called ever */
|
||||
- if (!g_threads_got_initialized)
|
||||
- g_thread_init (NULL);
|
||||
-
|
||||
g_type_init ();
|
||||
|
||||
va_start(args, first_property_name);
|
Loading…
Reference in a new issue