severity 665550 serious tags 665550 patch user [email protected] usertags 665550 ubuntu-patch precise thanks
On Sat, Mar 24, 2012 at 08:04:45PM +0100, [email protected] wrote: > Starting with glib 2.32 it is now mandatory to include glib.h instead > of individual headers [1], or the compiler will generate an error. Now that glib 2.32 is in sid, gtk-sharp2 FTBFS, so upgrading severity. It also needs to be corrected for the threading changes in 2.32. Here's the diff from 2.12.10-2ubuntu2 to 2.12.10-2ubuntu4 in Ubuntu, which I think is basically what you want here: [ Christopher James Halse Rogers ] * debian/patches/04_fix_glib_2.31_threading.dpatch: + GLib 2.31 always has threading support, always initialises it, and has dropped some deprecated functions. Update glibsharpglue and Thread.cs to match. Fixes FTBFS (LP: #911125, LP: #935518) * debian/control: + Add versioned dependency on glib > 2.31 to libglib2.0-cil, as we depend on the threading behaviour of those GLibs. * debian/control: * debian/rules: + Add dh_autoreconf to update build system for patch * debian/patches/99_ltmain_as_needed: + Drop; dh_autoreconf does this better [ Colin Watson ] * Include <glib.h> rather than individual headers (closes: #665550). diff -u gtk-sharp2-2.12.10/debian/rules gtk-sharp2-2.12.10/debian/rules --- gtk-sharp2-2.12.10/debian/rules +++ gtk-sharp2-2.12.10/debian/rules @@ -35,6 +35,7 @@ config: config-stamp config-stamp: patch-stamp dh_testdir + dh_autoreconf --as-needed CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --prefix=/usr RUNTIME=/usr/bin/cli CSC=/usr/bin/mono-csc MONO_CAIRO_LIBS=-r:Mono.Cairo MONO_CAIRO_CFLAGS=" " touch config-stamp @@ -58,6 +59,7 @@ [ ! -f Makefile ] || $(MAKE) distclean RUNTIME=/usr/bin/cli rm -f config-stamp build-indep-stamp build-arch-stamp rm -rf $(MONO_SHARED_DIR)/.wapi + dh_autoreconf_clean dh_clean install: diff -u gtk-sharp2-2.12.10/debian/control gtk-sharp2-2.12.10/debian/control --- gtk-sharp2-2.12.10/debian/control +++ gtk-sharp2-2.12.10/debian/control @@ -3,7 +3,7 @@ Priority: optional Maintainer: Debian CLI Libraries Team <[email protected]> Uploaders: Mirco Bauer <[email protected]>, Sebastian Dröge <[email protected]> -Build-Depends: debhelper (>= 5), cli-common-dev (>= 0.5.7), dpatch, mono-devel (>= 2.4.2.3), monodoc-base (>= 1.0), pkg-config, libglib2.0-dev (>= 2.12.0), libgtk2.0-dev (>= 2.12.0), libpango1.0-dev, libglade2-dev (>= 2.3.6), libmono-cairo2.0-cil +Build-Depends: debhelper (>= 5), cli-common-dev (>= 0.5.7), dpatch, mono-devel (>= 2.4.2.3), monodoc-base (>= 1.0), pkg-config, libglib2.0-dev (>= 2.12.0), libgtk2.0-dev (>= 2.12.0), libpango1.0-dev, libglade2-dev (>= 2.3.6), libmono-cairo2.0-cil, dh-autoreconf, Standards-Version: 3.8.4 Homepage: http://www.mono-project.com/GtkSharp Vcs-Git: git://git.debian.org/git/pkg-cli-libs/packages/gtk-sharp2.git @@ -49,7 +49,7 @@ Package: libglib2.0-cil Architecture: any Suggests: monodoc-gtk2.0-manual -Depends: ${shlibs:Depends}, ${misc:Depends}, ${cli:Depends} +Depends: libglib2.0-0 (>= 2.31), ${shlibs:Depends}, ${misc:Depends}, ${cli:Depends} Replaces: gtk-sharp2-gapi (<< 2.10.0-1) Description: CLI binding for the GLib utility library 2.12 This package provides the glib-sharp assembly that allows CLI (.NET) programs reverted: --- gtk-sharp2-2.12.10/debian/patches/99_ltmain_as-needed.dpatch +++ gtk-sharp2-2.12.10.orig/debian/patches/99_ltmain_as-needed.dpatch @@ -1,37 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -# -## DP: fixes the behaviour of LDFLAGS="-Wl,--as-needed", -## DP: useful to remove unneeded dependencies. - -@DPATCH@ - ---- gtk-sharp/ltmain.sh.old 2008-02-29 06:36:13.000000000 +0100 -+++ gtk-sharp/ltmain.sh 2008-02-29 06:36:48.000000000 +0100 -@@ -1794,6 +1794,11 @@ - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; - -+ -Wl,--as-needed) -+ deplibs="$deplibs $arg" -+ continue -+ ;; -+ - -Wl,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` - arg= -@@ -2134,6 +2139,15 @@ - lib= - found=no - case $deplib in -+ -Wl,--as-needed) -+ if test "$linkmode,$pass" = "prog,link"; then -+ compile_deplibs="$deplib $compile_deplibs" -+ finalize_deplibs="$deplib $finalize_deplibs" -+ else -+ deplibs="$deplib $deplibs" -+ fi -+ continue -+ ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" diff -u gtk-sharp2-2.12.10/debian/patches/00list gtk-sharp2-2.12.10/debian/patches/00list --- gtk-sharp2-2.12.10/debian/patches/00list +++ gtk-sharp2-2.12.10/debian/patches/00list @@ -3 +3,3 @@ -99_ltmain_as-needed +04_fix_glib_2.31_threading.dpatch +05_glib_single_include.dpatch + only in patch2: unchanged: --- gtk-sharp2-2.12.10.orig/debian/patches/05_glib_single_include.dpatch +++ gtk-sharp2-2.12.10/debian/patches/05_glib_single_include.dpatch @@ -0,0 +1,32 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 05_glib_single_include.dpatch by Colin Watson <[email protected]> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Include <glib.h> rather than individual headers. +## DP: http://bugs.debian.org/665550 + +@DPATCH@ +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' gtk-sharp2-2.12.10~/glib/glue/list.c gtk-sharp2-2.12.10/glib/glue/list.c +--- gtk-sharp2-2.12.10~/glib/glue/list.c 2009-01-07 16:54:06.000000000 +0000 ++++ gtk-sharp2-2.12.10/glib/glue/list.c 2012-04-02 23:50:36.000000000 +0100 +@@ -20,7 +20,7 @@ + */ + + +-#include <glib/glist.h> ++#include <glib.h> + + /* Forward declarations */ + gpointer gtksharp_list_get_data (GList *l); +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' gtk-sharp2-2.12.10~/glib/glue/slist.c gtk-sharp2-2.12.10/glib/glue/slist.c +--- gtk-sharp2-2.12.10~/glib/glue/slist.c 2009-01-07 16:54:06.000000000 +0000 ++++ gtk-sharp2-2.12.10/glib/glue/slist.c 2012-04-02 23:50:40.000000000 +0100 +@@ -20,7 +20,7 @@ + */ + + +-#include <glib/gslist.h> ++#include <glib.h> + + /* Forward declarations */ + gpointer gtksharp_slist_get_data (GSList *l); only in patch2: unchanged: --- gtk-sharp2-2.12.10.orig/debian/patches/04_fix_glib_2.31_threading.dpatch +++ gtk-sharp2-2.12.10/debian/patches/04_fix_glib_2.31_threading.dpatch @@ -0,0 +1,87 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 04_fix_glib_2.31_threading.dpatch by Christopher James Halse Rogers <[email protected]> +## +## 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 <[email protected]> +- * +- * 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 (); +-} +- Thanks, -- Colin Watson [[email protected]] -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

