diff -urN beast-0.6.6.old/debian/changelog beast-0.6.6/debian/changelog
--- beast-0.6.6.old/debian/changelog	2006-04-21 11:49:01.000000000 +0200
+++ beast-0.6.6/debian/changelog	2006-04-21 12:32:38.000000000 +0200
@@ -1,3 +1,11 @@
+beast (0.6.6-4.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix sfi/glib-extra.{c,h} files for compiling properly against glib
+    2.10. Thanks to Tim Janik. Closes: #359639.
+
+ -- Arnaud Fontaine <arnaud@andesi.org>  Fri, 21 Apr 2006 11:55:49 +0200
+
 beast (0.6.6-4) unstable; urgency=low
 
   * debian/rules:
diff -urN beast-0.6.6.old/debian/control beast-0.6.6/debian/control
--- beast-0.6.6.old/debian/control	2006-04-21 11:49:01.000000000 +0200
+++ beast-0.6.6/debian/control	2006-04-21 12:07:01.000000000 +0200
@@ -2,7 +2,7 @@
 Section: gnome
 Priority: extra
 Maintainer: Sam Hocevar (Debian packages) <sam+deb@zoy.org>
-Build-Depends: debhelper (>= 4.0), libgtk2.0-dev (>= 2.2.2-2), libglib2.0-dev (>= 2.2.2-1), libaudiofile-dev, libvorbis-dev, guile-1.6-dev (>= 1.6.4-2.1), libart-2.0-dev, libgnomecanvas2-dev, libmad0-dev, libxml-parser-perl, libxml2-utils, imagemagick, gettext, g++-4.0 (>= 4.0.2-4)
+Build-Depends: debhelper (>= 4.0), libgtk2.0-dev (>= 2.2.2-2), libglib2.0-dev (>= 2.2.2-1), libaudiofile-dev, libvorbis-dev, guile-1.6-dev (>= 1.6.4-2.1), libart-2.0-dev, libgnomecanvas2-dev, libmad0-dev, libxml-parser-perl, libxml2-utils, imagemagick, gettext, g++-4.0 (>= 4.0.2-4), dpatch
 Standards-Version: 3.6.2.1
 
 Package: beast
diff -urN beast-0.6.6.old/debian/patches/00list beast-0.6.6/debian/patches/00list
--- beast-0.6.6.old/debian/patches/00list	1970-01-01 01:00:00.000000000 +0100
+++ beast-0.6.6/debian/patches/00list	2006-04-21 11:51:02.000000000 +0200
@@ -0,0 +1 @@
+01_glib
diff -urN beast-0.6.6.old/debian/patches/01_glib.dpatch beast-0.6.6/debian/patches/01_glib.dpatch
--- beast-0.6.6.old/debian/patches/01_glib.dpatch	1970-01-01 01:00:00.000000000 +0100
+++ beast-0.6.6/debian/patches/01_glib.dpatch	2006-04-21 12:18:26.000000000 +0200
@@ -0,0 +1,53 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_glib.dpatch by  <arnaud@andesi.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urN beast-0.6.6.old/ChangeLog beast-0.6.6/ChangeLog
+--- beast-0.6.6.old/ChangeLog	2006-04-21 11:49:19.000000000 +0200
++++ beast-0.6.6/ChangeLog	2006-04-21 11:48:46.000000000 +0200
+@@ -1,3 +1,8 @@
++Mon Mar 27 18:22:18 2006  Stefan Westerfeld  <stefan@space.twc.de>
++
++        * glib-extra.[hc]: g_intern_(static)_string only needs to be provided
++        for old glib versions (< glib-2.9.0).
++
+ Wed May 25 23:28:22 2005  Tim Janik  <timj@gtk.org>
+ 
+ 	* released beast 0.6.6.
+diff -urN beast-0.6.6.old/sfi/glib-extra.h beast-0.6.6/sfi/glib-extra.h
+--- beast-0.6.6.old/sfi/glib-extra.h	2006-04-21 11:54:37.000000000 +0200
++++ beast-0.6.6/sfi/glib-extra.h	2006-04-21 11:53:56.000000000 +0200
+@@ -90,8 +90,11 @@
+ gchar*		g_strdup_rstrip   (const gchar	 *string);
+ gchar*		g_strdup_lstrip   (const gchar	 *string);
+ 
++#if !GLIB_CHECK_VERSION (2, 9, 0)
+ const gchar*    g_intern_string         (const gchar   *string);
+ const gchar*    g_intern_static_string  (const gchar   *string);
++#endif
++
+ const gchar*    g_intern_strconcat      (const gchar   *first_string,
+                                          ...);
+ const gchar*    g_intern_printf         (const gchar   *format,
+diff -urN beast-0.6.6.old/sfi/glib-extra.c beast-0.6.6/sfi/glib-extra.c
+--- beast-0.6.6.old/sfi/glib-extra.c	2006-04-21 12:04:08.000000000 +0200
++++ beast-0.6.6/sfi/glib-extra.c	2006-04-21 12:03:57.000000000 +0200
+@@ -170,6 +170,7 @@
+   return NULL;
+ }
+ 
++#if !GLIB_CHECK_VERSION (2, 9, 0)
+ const gchar*
+ g_intern_string (const gchar *string)
+ {
+@@ -181,6 +182,7 @@
+ {
+   return string ? g_quark_to_string (g_quark_from_static_string (string)) : NULL;
+ }
++#endif
+ 
+ static gchar*
+ delim_concat_varargs (const gchar *first_string,
diff -urN beast-0.6.6.old/debian/rules beast-0.6.6/debian/rules
--- beast-0.6.6.old/debian/rules	2006-04-21 11:49:01.000000000 +0200
+++ beast-0.6.6/debian/rules	2006-04-21 12:21:42.000000000 +0200
@@ -19,7 +19,7 @@
 confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
 endif
 
-configure: configure-stamp
+configure: patch-stamp configure-stamp
 configure-stamp:
 	dh_testdir
 	# Remove stuff
@@ -36,14 +36,14 @@
 	  $(confflags)
 	touch configure-stamp
 
-build: configure-stamp build-stamp
-build-stamp:
+build: build-stamp
+build-stamp: configure
 	dh_testdir
 	# Compile the package.
 	$(MAKE)
 	touch build-stamp
 
-clean:
+clean: unpatch
 	dh_testdir
 	dh_testroot
 	rm -f build-stamp configure-stamp
@@ -54,6 +54,14 @@
 	rm -f po/de.gmo
 	dh_clean
 
+patch-stamp:
+	dpatch apply-all
+	touch patch-stamp
+
+unpatch:
+	dpatch deapply-all
+	rm -rf patch-stamp debian/patched
+
 install: build
 	dh_testdir
 	dh_testroot
