Merge 0.10.35.2-1
diff --git a/debian/changelog b/debian/changelog
index 6b591b3..860b8fd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
-gstreamer0.11 (0.11.1-1) unstable; urgency=low
+gstreamer0.11 (0.11.1-1) experimental; urgency=low
 
+  [ Nicolas Dechesne ]
   * New upstream release.
     + debian/libstreamer.symbols
     + debian/control.in
@@ -11,7 +12,39 @@
       - removed xmllaunch, feedback and xmlinspect
       - replaced reference to GST_PLUGIN_FEATURE_NAME to GST_OBJECT_NAME
 
- -- Nicolas Dechesne <n-dechesne@ti.com>  Thu, 29 Sep 2011 20:45:16 +0200
+  [ Sebastian Dröge ]
+  * debian/copyright:
+    + Clean up, fix and complete copyright file.
+  * Merge 0.10.35.2-1.
+  * Upload to experimental
+
+ -- Sebastian Dröge <slomo@debian.org>  Mon, 12 Dec 2011 11:44:42 +0100
+
+gstreamer0.10 (0.10.35.2-1) experimental; urgency=low
+
+  * New upstream pre-release:
+    + debian/control.in:
+      - Build-depend on GLib >= 2.24.
+    + debian/patches/99_ltmain_as-needed.patch:
+      - Refreshed to apply cleanly again.
+    + debian/libgstreamer.symbols:
+      - Update symbols file with new API.
+  * debian/rules:
+    + Remove all dependency_libs from the .la files (Closes: #633319).
+  * debian/control.in:
+    + Put GI package into section introspection.
+  * debian/compat,
+    debian/control.in,
+    debian/gir1.2-gstreamer.install,
+    debian/libgstreamer-dev.install,
+    debian/libgstreamer.install,
+    debian/patches/79_multiarch-backwards-compat.patch,
+    debian/patches/80_ia32-hack.patch,
+    debian/rules:
+    + Transition package to multi-arch (Closes: #647481).
+      Patch taken from the Ubuntu package.
+
+ -- Sebastian Dröge <slomo@debian.org>  Sun, 11 Dec 2011 18:52:12 +0100
 
 gstreamer0.10 (0.10.35-1) unstable; urgency=low
 
diff --git a/debian/compat b/debian/compat
index 7f8f011..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-7
+9
diff --git a/debian/control.in b/debian/control.in
index ad2b6ad..1f473c8 100644
--- a/debian/control.in
+++ b/debian/control.in
@@ -6,15 +6,15 @@
            Sebastien Bacher <seb128@debian.org>,
            Sebastian Dröge <slomo@debian.org>,
            Sjoerd Simons <sjoerd@debian.org>
-Build-Depends: debhelper (>= 7),
-               cdbs (>= 0.4.20),
+Build-Depends: debhelper (>= 8.1.3~),
+               cdbs (>= 0.4.93~),
                gnome-pkg-tools (>= 0.7),
                autotools-dev,
                dh-autoreconf,
                autopoint,
                libxml2-dev (>= 2.6.0),
                zlib1g-dev (>= 1:1.1.4),
-               libglib2.0-dev (>= 2.22),
+               libglib2.0-dev (>= 2.24),
                libgmp3-dev,
                libgsl0-dev,
                pkg-config (>= 0.11.0),
@@ -44,7 +44,9 @@
 
 Package: @GST_LIB@
 Architecture: any
+Multi-Arch: same
 Section: libs
+Pre-Depends: ${misc:Pre-Depends}
 Depends: ${shlibs:Depends},
          ${misc:Depends}
 Suggests: @GST_PKGNAME@-tools,
@@ -61,6 +63,7 @@
 
 Package: @GST_LIB@-dbg
 Architecture: any
+Multi-Arch: same
 Section: debug
 Priority: extra
 Depends: @GST_LIB@ (= ${binary:Version}),
@@ -142,7 +145,7 @@
  This package contains versioned command-line tools for GStreamer.
 
 Package: gir1.2-gstreamer-@GST_ABI@
-Section: libs
+Section: introspection
 Architecture: any
 Depends: ${gir:Depends},
          ${shlibs:Depends},
diff --git a/debian/gir1.2-gstreamer.install b/debian/gir1.2-gstreamer.install
index 318141b..9803e33 100644
--- a/debian/gir1.2-gstreamer.install
+++ b/debian/gir1.2-gstreamer.install
@@ -1 +1 @@
-debian/tmp/usr/lib/girepository-*
+debian/tmp/usr/lib/*/girepository-* usr/lib
diff --git a/debian/libgstreamer-dev.install b/debian/libgstreamer-dev.install
index 6dfcb36..3459b0b 100644
--- a/debian/libgstreamer-dev.install
+++ b/debian/libgstreamer-dev.install
@@ -1,7 +1,7 @@
 debian/tmp/usr/include
-debian/tmp/usr/lib/*.{a,la,so}
-debian/tmp/usr/lib/gstreamer-@GST_ABI@/*.{a,la}
-debian/tmp/usr/lib/pkgconfig
+debian/tmp/usr/lib/*/*.{a,la,so}
+debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/*.{a,la}
+debian/tmp/usr/lib/*/pkgconfig
 debian/tmp/usr/share/aclocal
 debian/tmp/usr/share/gir-*
 debian/tmp/usr/bin/gst-codec-info-@GST_ABI@
diff --git a/debian/libgstreamer.install b/debian/libgstreamer.install
index 195e4e9..b2cfb9b 100644
--- a/debian/libgstreamer.install
+++ b/debian/libgstreamer.install
@@ -1,4 +1,4 @@
-debian/tmp/usr/lib/gstreamer-@GST_ABI@/*.so
-debian/tmp/usr/lib/gstreamer@GST_ABI@/gstreamer-@GST_ABI@/gst-plugin-scanner
-debian/tmp/usr/lib/*.so.*
+debian/tmp/usr/lib/*/gstreamer-@GST_ABI@/*.so
+debian/tmp/usr/lib/*/gstreamer@GST_ABI@/gstreamer-@GST_ABI@/gst-plugin-scanner
+debian/tmp/usr/lib/*/*.so.*
 debian/tmp/usr/share/locale
diff --git a/debian/patches/79_multiarch-backwards-compat.patch b/debian/patches/79_multiarch-backwards-compat.patch
new file mode 100644
index 0000000..f5f111c
--- /dev/null
+++ b/debian/patches/79_multiarch-backwards-compat.patch
@@ -0,0 +1,28 @@
+=== modified file 'gst/gstregistry.c'
+Index: gstreamer0.11/gst/gstregistry.c
+===================================================================
+--- gstreamer0.11.orig/gst/gstregistry.c	2011-12-12 11:37:12.173735080 +0100
++++ gstreamer0.11/gst/gstregistry.c	2011-12-12 11:50:39.093747189 +0100
+@@ -1507,7 +1507,7 @@
+    * path, and the plugins installed in the user's home directory */
+   plugin_path = g_getenv ("GST_PLUGIN_SYSTEM_PATH");
+   if (plugin_path == NULL) {
+-    char *home_plugins;
++    char *home_plugins, *backwards_compat_plugins;
+ 
+     GST_DEBUG ("GST_PLUGIN_SYSTEM_PATH not set");
+ 
+@@ -1524,6 +1524,13 @@
+     GST_DEBUG ("scanning main plugins %s", PLUGINDIR);
+     changed |= gst_registry_scan_path_internal (&context, PLUGINDIR);
+ 
++    /* finally, look in the /usr/lib backwards-compatibility path. */
++    backwards_compat_plugins = g_build_filename ("/usr/lib",
++        "gstreamer-" GST_MAJORMINOR, NULL);
++    GST_DEBUG ("scanning plugins %s", backwards_compat_plugins);
++    changed |= gst_registry_scan_path_internal (&context, backwards_compat_plugins);
++    g_free (backwards_compat_plugins);
++
+ #ifdef G_OS_WIN32
+     {
+       char *base_dir;
diff --git a/debian/patches/80_ia32-hack.patch b/debian/patches/80_ia32-hack.patch
index d5bb9b3..6c3dfcd 100644
--- a/debian/patches/80_ia32-hack.patch
+++ b/debian/patches/80_ia32-hack.patch
@@ -1,7 +1,7 @@
-Index: gstreamer0.10-0.10.31.2/gst/gstregistry.c
+Index: gstreamer0.11/gst/gstregistry.c
 ===================================================================
---- gstreamer0.10-0.10.31.2.orig/gst/gstregistry.c	2011-01-06 20:35:59.000000000 +0100
-+++ gstreamer0.10-0.10.31.2/gst/gstregistry.c	2011-01-08 17:05:28.959841191 +0100
+--- gstreamer0.11.orig/gst/gstregistry.c	2011-12-12 11:50:39.093747189 +0100
++++ gstreamer0.11/gst/gstregistry.c	2011-12-12 11:50:41.941747231 +0100
 @@ -121,6 +121,10 @@
  #include <stdio.h>
  #include <string.h>
@@ -13,31 +13,30 @@
  /* For g_stat () */
  #include <glib/gstdio.h>
  
-@@ -1493,6 +1497,10 @@
+@@ -1507,6 +1511,9 @@
     * path, and the plugins installed in the user's home directory */
    plugin_path = g_getenv ("GST_PLUGIN_SYSTEM_PATH");
    if (plugin_path == NULL) {
 +#if defined(__linux__) && defined (__i386__)
 +    struct utsname uts;
 +#endif
-+    char *plugindir = PLUGINDIR;
-     char *home_plugins;
+     char *home_plugins, *backwards_compat_plugins;
  
      GST_DEBUG ("GST_PLUGIN_SYSTEM_PATH not set");
-@@ -1506,8 +1514,14 @@
-     g_free (home_plugins);
- 
-     /* add the main (installed) library path */
--    GST_DEBUG ("scanning main plugins %s", PLUGINDIR);
--    changed |= gst_registry_scan_path_internal (&context, PLUGINDIR);
+@@ -1527,6 +1534,16 @@
+     /* finally, look in the /usr/lib backwards-compatibility path. */
+     backwards_compat_plugins = g_build_filename ("/usr/lib",
+         "gstreamer-" GST_MAJORMINOR, NULL);
 +#if defined(__linux__) && defined (__i386__)
 +    uname(&uts);
 +    if (!strcmp("x86_64", uts.machine)
 +         && !access("/usr/lib32/gstreamer-0.10", R_OK|X_OK))
-+       plugindir = "/usr/lib32/gstreamer-0.10";
++    {
++       g_free (backwards_compat_plugins);
++       backwards_compat_plugins = g_build_filename ("/usr/lib32",
++           "gstreamer-" GST_MAJORMINOR, NULL);
++    }
 +#endif
-+    GST_DEBUG ("scanning main plugins %s", plugindir);
-+    changed |= gst_registry_scan_path_internal (&context, plugindir);
- 
- #ifdef G_OS_WIN32
-     {
+     GST_DEBUG ("scanning plugins %s", backwards_compat_plugins);
+     changed |= gst_registry_scan_path_internal (&context, backwards_compat_plugins);
+     g_free (backwards_compat_plugins);
diff --git a/debian/patches/series b/debian/patches/series
index 1858e7c..aa61f96 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
+79_multiarch-backwards-compat.patch
 80_ia32-hack.patch
 99_ltmain_as-needed.patch
diff --git a/debian/rules b/debian/rules
index 5d3dc80..7e74447 100755
--- a/debian/rules
+++ b/debian/rules
@@ -196,6 +196,8 @@
 	--disable-examples \
 	--enable-DEBUG \
 	--enable-debug \
+	--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
+	--libexecdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)/gstreamer0.11 \
 	--with-package-name=$(GST_PACKAGE_NAME) \
 	--with-package-origin=$(GST_PACKAGE_ORIGIN)
 
@@ -222,9 +224,9 @@
 	mkdir -p debian/$(gst_pkgname)-doc/usr/share/lintian/overrides/
 	cp -a debian/$(gst_pkgname)-doc.lintian debian/$(gst_pkgname)-doc/usr/share/lintian/overrides/$(gst_pkgname)-doc
 
-DEB_DH_MAKESHLIBS_ARGS_$(gst_lib) += -X "/usr/lib/gstreamer-$(gst_abi)" -V $(gst_shlibs_dep) -- -c4
+DEB_DH_MAKESHLIBS_ARGS_$(gst_lib) += -X "/usr/lib/$(DEB_HOST_MULTIARCH)/gstreamer-$(gst_abi)" -V $(gst_shlibs_dep) -- -c4
 DEB_INSTALL_DOCS_ALL += debian/README.Debian NEWS
-DEB_SHLIBDEPS_INCLUDE += debian/$(gst_lib)/usr/lib
+DEB_SHLIBDEPS_INCLUDE += debian/$(gst_lib)/usr/lib/$(DEB_HOST_MULTIARCH)
 
 # override shlibs for libraries from this source before computing dependencies
 # of packages generated from this source; we already have inter-dependencies
@@ -246,7 +248,7 @@
 	-rm -f debian/shlibs.local
 
 install/$(gst_lib_dev)::
-	gcc -o debian/tmp/usr/bin/gst-codec-info-0.11 debian/gst-codec-info.c $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) `pkg-config --libs --cflags glib-2.0 gthread-2.0 gmodule-no-export-2.0 gobject-2.0 libxml-2.0` debian/tmp/usr/lib/libgstreamer-0.11.so -Idebian/tmp/usr/include/gstreamer-0.11
+	gcc -o debian/tmp/usr/bin/gst-codec-info-0.11 debian/gst-codec-info.c $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) `pkg-config --libs --cflags glib-2.0 gthread-2.0 gmodule-no-export-2.0 gobject-2.0 libxml-2.0` debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libgstreamer-0.11.so -Idebian/tmp/usr/include/gstreamer-0.11
 	perldoc -o man debian/dh_gstscancodecs > debian/tmp/usr/share/man/man1/dh_gstscancodecs.1
 
 .PHONY: maint