Created
May 1, 2012 19:20
-
-
Save marek-safar/2570657 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh /usr/share/dpatch/dpatch-run | |
## 04_fix_glib_2.31_threading.dpatch by Christopher James Halse Rogers <raof@ubuntu.com> | |
## | |
## All lines beginning with `## DP:' are a description of the patch. | |
## DP: Fix build against glib >= 2.31 | |
## DP: GLib's threading support is included and initialised by default | |
## DP: so Thread.Init () is now a no-op, and Thread.Supported is always true | |
## | |
## DP: glib removed the associated symbols. | |
@DPATCH@ | |
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' gtk-sharp2-2.12.10~/glib/Thread.cs gtk-sharp2-2.12.10/glib/Thread.cs | |
--- gtk-sharp2-2.12.10~/glib/Thread.cs 2009-01-31 06:51:10.000000000 +1100 | |
+++ gtk-sharp2-2.12.10/glib/Thread.cs 2012-03-02 11:36:06.583379301 +1100 | |
@@ -28,21 +28,15 @@ | |
{ | |
private Thread () {} | |
- [DllImport("libgthread-2.0-0.dll")] | |
- static extern void g_thread_init (IntPtr i); | |
- | |
public static void Init () | |
{ | |
- g_thread_init (IntPtr.Zero); | |
+ // GLib automatically inits threads in 2.31 and above | |
} | |
- [DllImport("glibsharpglue-2")] | |
- static extern bool glibsharp_g_thread_supported (); | |
- | |
public static bool Supported | |
{ | |
get { | |
- return glibsharp_g_thread_supported (); | |
+ return true; | |
} | |
} | |
} | |
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' gtk-sharp2-2.12.10~/glib/glue/Makefile.am gtk-sharp2-2.12.10/glib/glue/Makefile.am | |
--- gtk-sharp2-2.12.10~/glib/glue/Makefile.am 2009-01-08 03:54:06.000000000 +1100 | |
+++ gtk-sharp2-2.12.10/glib/glue/Makefile.am 2012-03-02 11:35:13.059378013 +1100 | |
@@ -13,8 +13,7 @@ | |
type.c \ | |
unichar.c \ | |
value.c \ | |
- valuearray.c \ | |
- thread.c | |
+ valuearray.c | |
# Adding a new glue file? | |
diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' gtk-sharp2-2.12.10~/glib/glue/thread.c gtk-sharp2-2.12.10/glib/glue/thread.c | |
--- gtk-sharp2-2.12.10~/glib/glue/thread.c 2009-01-08 03:54:06.000000000 +1100 | |
+++ gtk-sharp2-2.12.10/glib/glue/thread.c 1970-01-01 11:00:00.000000000 +1100 | |
@@ -1,32 +0,0 @@ | |
-/* thread.c : glue functions for GLib.Thread | |
- * | |
- * Author: Alp Toker <alp@atoker.com> | |
- * | |
- * Copyright (c) 2005 Alp Toker | |
- * | |
- * This program is free software; you can redistribute it and/or | |
- * modify it under the terms of version 2 of the Lesser GNU General | |
- * Public License as published by the Free Software Foundation. | |
- * | |
- * This program is distributed in the hope that it will be useful, | |
- * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
- * Lesser General Public License for more details. | |
- * | |
- * You should have received a copy of the GNU Lesser General Public | |
- * License along with this program; if not, write to the | |
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
- * Boston, MA 02111-1307, USA. | |
- */ | |
- | |
- | |
-#include <glib/gthread.h> | |
- | |
-gboolean glibsharp_g_thread_supported (void); | |
- | |
-gboolean | |
-glibsharp_g_thread_supported () | |
-{ | |
- return g_thread_supported (); | |
-} | |
- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment