Origin: upstream, other, *
Description: Applied patches. See Vcs-* headers in debian/control.

--- xine-lib-1.2-1.2.0.orig/configure
+++ xine-lib-1.2-1.2.0/configure
@@ -22627,6 +22627,10 @@ test x"$ac_cv_sys_large_files" != x"" &&
             default_with_pulseaudio=yes
             default_with_jack=yes
             ;;
+        gnu*)
+            default_with_pulseaudio=yes
+            default_with_jack=yes
+            ;;
         irix*)
             default_enable_irixal=yes
             default_enable_oss=no
@@ -23491,6 +23495,10 @@ fi
             default_enable_vdpau=yes
             ;;
 
+        gnu*)
+            default_enable_vdpau=yes
+            ;;
+
         linux*)
             default_enable_dxr3=yes
             default_enable_fb=yes
@@ -28685,9 +28693,9 @@ fi
         if test x"$enable_modplug" = x"yes" && test x"$have_modplug" != x"yes"; then
             as_fn_error $? "MODPlug support requested, but MODPlug not found" "$LINENO" 5
         fi
-	if test "`"$PKG_CONFIG" --modversion libmodplug`" = 0.8.8; then
-	    as_fn_error $? "you have a broken version of libmodplug (0.8.8); cowardly refusing to use it" "$LINENO" 5
-	fi
+#	if test "`"$PKG_CONFIG" --modversion libmodplug`" = 0.8.8; then
+#	    AC_MSG_ERROR([you have a broken version of libmodplug (0.8.8); cowardly refusing to use it])
+#	fi
     fi
      if test x"$have_modplug" = x"yes"; then
   ENABLE_MODPLUG_TRUE=
--- xine-lib-1.2-1.2.0.orig/misc/xine-list.c
+++ xine-lib-1.2-1.2.0/misc/xine-list.c
@@ -107,6 +107,16 @@ to the extent permitted by law.\n",
     return 0;
 
   xine_t *xine = xine_new ();
+
+  /* Avoid writing catalog.cache if possible */
+  int major, minor, sub;
+  xine_get_version (&major, &minor, &sub);
+  if ((major == 1 && minor == 1 && sub > 20) ||
+      (major == 1 && minor == 2 && sub > 0) ||
+      (major == 1 && minor > 2) ||
+      (major > 1))
+    xine_set_flags (xine, XINE_FLAG_NO_WRITE_CACHE);
+
   xine_init (xine);
 
   char *text = NULL;
--- xine-lib-1.2-1.2.0.orig/m4/video_out.m4
+++ xine-lib-1.2-1.2.0/m4/video_out.m4
@@ -47,6 +47,10 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [
             default_enable_vdpau=yes
             ;;
 
+        gnu*)
+            default_enable_vdpau=yes
+            ;;
+
         linux*)
             default_enable_dxr3=yes
             default_enable_fb=yes
--- xine-lib-1.2-1.2.0.orig/m4/audio_out.m4
+++ xine-lib-1.2-1.2.0/m4/audio_out.m4
@@ -41,6 +41,10 @@ AC_DEFUN([XINE_AUDIO_OUT_PLUGINS], [
             default_with_pulseaudio=yes
             default_with_jack=yes
             ;;
+        gnu*)
+            default_with_pulseaudio=yes
+            default_with_jack=yes
+            ;;
         irix*)
             default_enable_irixal=yes
             default_enable_oss=no
--- xine-lib-1.2-1.2.0.orig/m4/decoders.m4
+++ xine-lib-1.2-1.2.0/m4/decoders.m4
@@ -300,9 +300,9 @@ AC_DEFUN([XINE_DECODER_PLUGINS], [
         if test x"$enable_modplug" = x"yes" && test x"$have_modplug" != x"yes"; then
             AC_MSG_ERROR([MODPlug support requested, but MODPlug not found])
         fi
-	if test "`"$PKG_CONFIG" --modversion libmodplug`" = 0.8.8; then
-	    AC_MSG_ERROR([you have a broken version of libmodplug (0.8.8); cowardly refusing to use it])
-	fi
+#	if test "`"$PKG_CONFIG" --modversion libmodplug`" = 0.8.8; then
+#	    AC_MSG_ERROR([you have a broken version of libmodplug (0.8.8); cowardly refusing to use it])
+#	fi
     fi
     AM_CONDITIONAL([ENABLE_MODPLUG], [test x"$have_modplug" = x"yes"])
 
--- xine-lib-1.2-1.2.0.orig/include/xine.h
+++ xine-lib-1.2-1.2.0/include/xine.h
@@ -117,6 +117,12 @@ int  xine_check_version (int major, int
  */
 xine_t *xine_new (void) XINE_PROTECTED;
 
+/* allow the setting of some flags before xine_init
+ * FIXME-ABI: this is currently GLOBAL
+ */
+void xine_set_flags (xine_t *, int) XINE_PROTECTED __attribute__((weak));
+#define XINE_FLAG_NO_WRITE_CACHE		1
+
 /*
  * post_init the xine engine
  */
--- xine-lib-1.2-1.2.0.orig/include/xine/xine_internal.h
+++ xine-lib-1.2-1.2.0/include/xine/xine_internal.h
@@ -109,6 +109,12 @@ struct xine_s {
 #endif
 };
 
+/* FIXME-ABI Some global flag bits */
+/* See xine_set_flags() */
+#ifdef XINE_ENGINE_INTERNAL
+extern int _x_flags XINE_PROTECTED;
+#endif
+
 /*
  * xine thread tickets
  */
--- xine-lib-1.2-1.2.0.orig/src/xine-engine/xine.c
+++ xine-lib-1.2-1.2.0/src/xine-engine/xine.c
@@ -83,6 +83,10 @@
 
 #include "xine_private.h"
 
+/* FIXME-ABI Global variable. Done this way for ABI & API reasons... */
+int _x_flags = 0;
+
+
 static void mutex_cleanup (void *mutex) {
   pthread_mutex_unlock ((pthread_mutex_t *) mutex);
 }
@@ -1742,6 +1746,12 @@ static void config_save_cb (void *this_g
   this->save_path = entry->str_value;
 }
 
+void xine_set_flags (xine_t *this, int flags)
+{
+  this = this; /* FIXME-ABI: one day, these will be in xine_t...? */
+  _x_flags = flags;
+}
+
 void xine_init (xine_t *this) {
   static const char *const demux_strategies[] = {"default", "reverse", "content",
 						 "extension", NULL};
--- xine-lib-1.2-1.2.0.orig/src/xine-engine/load_plugins.c
+++ xine-lib-1.2-1.2.0/src/xine-engine/load_plugins.c
@@ -1326,7 +1326,8 @@ void _x_scan_plugins (xine_t *this) {
 
   load_required_plugins (this);
 
-  XINE_PROFILE(save_catalog (this));
+  if ((_x_flags & XINE_FLAG_NO_WRITE_CACHE) == 0)
+    XINE_PROFILE(save_catalog (this));
 
   map_decoders (this);
 }
