r47171 - in /desktop/unstable/totem-pl-parser/debian: changelog patches/totem-pl-parser-use-old-quvi.patch

biebl at users.alioth.debian.org biebl at users.alioth.debian.org
Tue Dec 15 23:09:31 UTC 2015


Author: biebl
Date: Tue Dec 15 23:09:31 2015
New Revision: 47171

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=47171
Log:
Refresh debian/patches/totem-pl-parser-use-old-quvi.patch.

Modified:
    desktop/unstable/totem-pl-parser/debian/changelog
    desktop/unstable/totem-pl-parser/debian/patches/totem-pl-parser-use-old-quvi.patch

Modified: desktop/unstable/totem-pl-parser/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/totem-pl-parser/debian/changelog?rev=47171&op=diff
==============================================================================
--- desktop/unstable/totem-pl-parser/debian/changelog	[utf-8] (original)
+++ desktop/unstable/totem-pl-parser/debian/changelog	[utf-8] Tue Dec 15 23:09:31 2015
@@ -1,6 +1,7 @@
 totem-pl-parser (3.10.6-1) UNRELEASED; urgency=medium
 
   * New upstream release.
+  * Refresh debian/patches/totem-pl-parser-use-old-quvi.patch.
 
  -- Michael Biebl <biebl at debian.org>  Tue, 15 Dec 2015 21:45:16 +0100
 

Modified: desktop/unstable/totem-pl-parser/debian/patches/totem-pl-parser-use-old-quvi.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/totem-pl-parser/debian/patches/totem-pl-parser-use-old-quvi.patch?rev=47171&op=diff
==============================================================================
--- desktop/unstable/totem-pl-parser/debian/patches/totem-pl-parser-use-old-quvi.patch	[utf-8] (original)
+++ desktop/unstable/totem-pl-parser/debian/patches/totem-pl-parser-use-old-quvi.patch	[utf-8] Tue Dec 15 23:09:31 2015
@@ -1,28 +1,46 @@
-From 4f132115577e058da7f6cc98cdf748e8689656ac Mon Sep 17 00:00:00 2001
-From: Andreas Henriksson <andreas.henriksson at endian.se>
-Date: Tue, 20 May 2014 14:18:36 +0200
+From 659826f0f415664e49b79d9d98cdafa1240f49aa Mon Sep 17 00:00:00 2001
+From: Michael Biebl <biebl at debian.org>
+Date: Wed, 16 Dec 2015 00:01:11 +0100
 Subject: [PATCH] Revert "plparse: Port to libquvi 0.9"
 
-This reverts commit 24970018abfcedcaa4965e1f0f987aaf63323f31.
-
-Conflicts:
-	configure.ac
-	plparse/videosite-parser.c
+This reverts the following commits
+24970018abfcedcaa4965e1f0f987aaf63323f31
+5c2190133328ee39764813ddee88a038dbf1d363
+e0a27de154259c8e11dd8eff1b606c9e6d162502
+b524675634af60ae4b9f08b54ea47f308ae4c563
+1147853ac9012c085ebb1d6306451c6d197542cf
+1be3144e9a6bf183a61c9596165d52bbe405b5cc
 ---
- configure.ac                          |    8 -
- plparse/Makefile.am                   |    9 -
- plparse/totem-pl-parser-videosite.c   |  162 +++++++++++++++-------------
- plparse/videosite-parser.c            |  191 ----------------------------------
- totem-plparser-mini-uninstalled.pc.in |    2 
- totem-plparser-mini.pc.in             |    2 
- totem-plparser-uninstalled.pc.in      |    2 
- totem-plparser.pc.in                  |    2 
- 8 files changed, 93 insertions(+), 285 deletions(-)
+ Makefile.am                           |   2 +-
+ configure.ac                          |  22 +---
+ plparse/Makefile.am                   |  10 --
+ plparse/totem-pl-parser-videosite.c   | 224 +++++++++++++---------------------
+ plparse/videosite-parser.c            | 191 -----------------------------
+ totem-plparser-mini-uninstalled.pc.in |   2 +-
+ totem-plparser-mini.pc.in             |   2 +-
+ totem-plparser-uninstalled.pc.in      |   2 +-
+ totem-plparser.pc.in                  |   2 +-
+ 9 files changed, 97 insertions(+), 360 deletions(-)
  delete mode 100644 plparse/videosite-parser.c
 
+diff --git a/Makefile.am b/Makefile.am
+index a9cda79..18bd1f5 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -44,7 +44,7 @@ MAINTAINERCLEANFILES = \
+ pkgconfigdir = $(libdir)/pkgconfig
+ pkgconfig_DATA = totem-plparser.pc totem-plparser-mini.pc
+ 
+-DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper --enable-gtk-doc --enable-introspection --enable-uninstalled-tests
++DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper --enable-gtk-doc --enable-introspection
+ 
+ # Build ChangeLog from GIT history
+ ChangeLog:
+diff --git a/configure.ac b/configure.ac
+index 3efa66c..a652242 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -45,7 +45,7 @@ AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenum
+@@ -45,7 +45,7 @@ AC_PATH_PROG([GLIB_MKENUMS],[glib-mkenums])
  # Requirements
  GLIB_REQS=2.31.0
  GIO_REQS=2.24.0
@@ -53,6 +71,29 @@
  
  ##################################
  # Checking libarchive dependency
+@@ -174,20 +174,6 @@ if test "x$enable_libgcrypt" != "xno" ; then
+ 	fi
+ fi
+ 
+-############################
+-# Checking uninstalled tests
+-############################
+-
+-AC_ARG_ENABLE(uninstalled-tests,
+-	      AS_HELP_STRING([--enable-uninstalled-tests],
+-			     [Uninstalled tests (default is no).]),
+-			     [],
+-			     [enable_uninstalled_tests=no])
+-if test "x$enable_uninstalled_tests" != "xno" ; then
+-	AC_DEFINE(UNINSTALLED_TESTS, 1, [Uninstalled tests])
+-fi
+-
+-
+ dnl Check for packages for building libtotem-plparser.la
+ PKG_CHECK_MODULES(TOTEM_PLPARSER, [$pkg_modules])
+ AC_SUBST(TOTEM_PLPARSER_CFLAGS)
+diff --git a/plparse/Makefile.am b/plparse/Makefile.am
+index 688040e..aee6393 100644
 --- a/plparse/Makefile.am
 +++ b/plparse/Makefile.am
 @@ -72,7 +72,6 @@ libtotem_plparser_la_CPPFLAGS = \
@@ -71,23 +112,26 @@
  	$(DISABLE_DEPRECATED)		\
  	$(AM_CPPFLAGS)
  
-@@ -182,13 +180,6 @@ EXTRA_DIST =				\
+@@ -182,14 +180,6 @@ EXTRA_DIST =				\
  	plparser.symbols		\
  	plparser-mini.symbols
  
 -if HAVE_QUVI
--libexec_PROGRAMS = totem-pl-parser-videosite
--totem_pl_parser_videosite_SOURCES = videosite-parser.c
--totem_pl_parser_videosite_CFLAGS = $(QUVI_CFLAGS) -DLIBEXECDIR=\""$(libexecdir)"\"
--totem_pl_parser_videosite_LDADD = $(QUVI_LIBS)
+-libexecsubdir = $(libexecdir)/totem-pl-parser/
+-libexecsub_PROGRAMS = 99-totem-pl-parser-videosite
+-99_totem_pl_parser_videosite_SOURCES = videosite-parser.c
+-99_totem_pl_parser_videosite_CFLAGS = $(QUVI_CFLAGS) -DLIBEXECDIR=\""$(libexecdir)"\"
+-99_totem_pl_parser_videosite_LDADD = $(QUVI_LIBS)
 -endif
 -
  # Introspection
  -include $(INTROSPECTION_MAKEFILE)
  INTROSPECTION_GIRS =
+diff --git a/plparse/totem-pl-parser-videosite.c b/plparse/totem-pl-parser-videosite.c
+index f830a54..631f4ca 100644
 --- a/plparse/totem-pl-parser-videosite.c
 +++ b/plparse/totem-pl-parser-videosite.c
-@@ -24,6 +24,14 @@
+@@ -24,85 +24,36 @@
  #include <string.h>
  #include <glib.h>
  
@@ -102,23 +146,64 @@
  #include "totem-pl-parser-mini.h"
  #include "totem-pl-parser-videosite.h"
  #include "totem-pl-parser-private.h"
-@@ -32,35 +40,20 @@ gboolean
+ 
+-/* The helper script will be either the one shipped in totem-pl-parser,
+- * when running tests, or the first non-hidden file in the totem-pl-parser
+- * libexec directory, when sorted by lexicographic ordering (through strcmp) */
+-static char *
+-find_helper_script (void)
+-{
+-#ifdef UNINSTALLED_TESTS
+-	return g_strdup ("../99-totem-pl-parser-videosite");
+-#else
+-	GDir *dir;
+-	const char *name;
+-	char *script_name = NULL;
+-
+-	dir = g_dir_open (LIBEXECDIR "/totem-pl-parser", 0, NULL);
+-	if (!dir)
+-		goto bail;
+-
+-	while ((name = g_dir_read_name (dir)) != NULL) {
+-		/* Skip hidden files */
+-		if (name[0] == '.')
+-			continue;
+-		if (script_name == NULL || g_strcmp0 (name, script_name) < 0) {
+-			g_free (script_name);
+-			script_name = g_strdup (name);
+-		}
+-	}
+-	g_clear_pointer (&dir, g_dir_close);
+-
+-	if (script_name != NULL) {
+-		char *ret;
+-		ret = g_build_filename (LIBEXECDIR "/totem-pl-parser", script_name, NULL);
+-		g_free (script_name);
+-		return ret;
+-	}
+-
+-bail:
+-	return g_strdup (LIBEXECDIR "/totem-pl-parser/99-totem-pl-parser-videosite");
+-#endif
+-}
+-
+ gboolean
  totem_pl_parser_is_videosite (const char *uri, gboolean debug)
  {
  #ifdef HAVE_QUVI
 -	const char *args[] = {
--#ifdef UNINSTALLED_TESTS
--		"../totem-pl-parser-videosite",
--#else
--		LIBEXECDIR "/totem-pl-parser-videosite",
--#endif
+-		NULL,
 -		"--check",
 -		"--url",
 -		NULL,
 -		NULL
 -	};
 -	char *out;
--
+-	char *script;
+-
+-	script = find_helper_script ();
+-
+-	args[0] = script;
 -	args[3] = uri;
 -	g_spawn_sync (NULL,
 -		      (char **) args,
@@ -130,18 +215,20 @@
 -		      NULL,
 -		      NULL,
 -		      NULL);
+-	if (debug)
+-		g_print ("Checking videosite with script '%s' for URI '%s' returned '%s' (%s)\n",
+-			 script, uri, out, g_strcmp0 (out, "TRUE") == 0 ? "true" : "false");
 +	quvi_t handle;
 +	QUVIcode rc;
-+
+ 
+-	g_free (script);
 +	if (quvi_init (&handle) != QUVI_OK)
 +		return FALSE;
 +
 +	rc = quvi_supported(handle, (char *) uri);
 +	quvi_close (&handle);
 +
- 	if (debug)
--		g_print ("Checking videosite for URI '%s' returned '%s' (%s)\n",
--			 uri, out, g_strcmp0 (out, "TRUE") == 0 ? "true" : "false");
++	if (debug)
 +		g_print ("Checking videosite for URI '%s' returned %d (%s)\n",
 +			 uri, rc, (rc == QUVI_OK) ? "true" : "false");
  
@@ -150,7 +237,7 @@
  #else
  	return FALSE;
  #endif /* HAVE_QUVI */
-@@ -68,6 +61,10 @@ totem_pl_parser_is_videosite (const char
+@@ -110,6 +61,10 @@ totem_pl_parser_is_videosite (const char *uri, gboolean debug)
  
  #ifndef TOTEM_PL_PARSER_MINI
  
@@ -161,12 +248,12 @@
  TotemPlParserResult
  totem_pl_parser_add_videosite (TotemPlParser *parser,
  			       GFile *file,
-@@ -76,64 +73,75 @@ totem_pl_parser_add_videosite (TotemPlPa
+@@ -118,80 +73,77 @@ totem_pl_parser_add_videosite (TotemPlParser *parser,
  			       gpointer data)
  {
  #ifdef HAVE_QUVI
 -	const char *args[] = {
--		LIBEXECDIR "/totem-pl-parser-videosite",
+-		NULL,
 -		"--url",
 -		NULL,
 -		NULL
@@ -180,6 +267,8 @@
 -	guint i;
 -	GHashTable *ht;
 -	char *new_uri = NULL;
+-	char *script;
+-	TotemPlParserResult ret;
 +	/* properties */
 +	const char *video_uri;
 +	double length;
@@ -192,11 +281,17 @@
 +	const char *thumb_url;
 +	double duration;
 +	char *duration_str;
- 
--	uri = g_file_get_uri (file);
++
 +	if (quvi_init (&handle) != QUVI_OK)
 +		return TOTEM_PL_PARSER_RESULT_ERROR;
- 
++
++	quvi_setopt(handle, QUVIOPT_NOVERIFY, TRUE);
++	quvi_setopt(handle, QUVIOPT_FORMAT, "best");
+ 
+ 	uri = g_file_get_uri (file);
+-	script = find_helper_script ();
+-
+-	args[0] = script;
 -	args[2] = uri;
 -	g_spawn_sync (NULL,
 -		      (char **) args,
@@ -212,26 +307,20 @@
 -		g_print ("Parsing videosite for URI '%s' returned '%s'\n", uri, out);
 -
 -	if (out != NULL) {
--		if (g_str_equal (out, "TOTEM_PL_PARSER_RESULT_ERROR"))
--			return TOTEM_PL_PARSER_RESULT_ERROR;
--		if (g_str_equal (out, "TOTEM_PL_PARSER_RESULT_UNHANDLED"))
-+	quvi_setopt(handle, QUVIOPT_NOVERIFY, TRUE);
-+	quvi_setopt(handle, QUVIOPT_FORMAT, "best");
-+
-+	uri = g_file_get_uri (file);
-+	rc = quvi_parse(handle, uri, &v);
-+	if (rc != QUVI_OK) {
-+		if (totem_pl_parser_is_debugging_enabled (parser))
-+			g_print ("quvi_parse for '%s' returned %d\n", uri, rc);
-+		g_free (uri);
-+		quvi_close (&handle);
-+		if (rc == QUVI_NOSUPPORT)
- 			return TOTEM_PL_PARSER_RESULT_UNHANDLED;
+-		if (g_str_equal (out, "TOTEM_PL_PARSER_RESULT_ERROR")) {
+-			ret = TOTEM_PL_PARSER_RESULT_ERROR;
+-			goto out;
+-		}
+-		if (g_str_equal (out, "TOTEM_PL_PARSER_RESULT_UNHANDLED")) {
+-			ret = TOTEM_PL_PARSER_RESULT_UNHANDLED;
+-			goto out;
+-		}
 -	} else {
 -		/* totem-pl-parser-videosite failed to launch */
- 		return TOTEM_PL_PARSER_RESULT_ERROR;
- 	}
- 
+-		ret = TOTEM_PL_PARSER_RESULT_ERROR;
+-		goto out;
+-	}
+-
 -	ht = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
 -	lines = g_strsplit (out, "\n", -1);
 -	g_free (out);
@@ -246,8 +335,20 @@
 -			g_hash_table_insert (ht, g_strdup (line[0]), g_strdup (line[1]));
 -		}
 -		g_strfreev (line);
--	}
++	rc = quvi_parse(handle, uri, &v);
++	if (rc != QUVI_OK) {
++		if (totem_pl_parser_is_debugging_enabled (parser))
++			g_print ("quvi_parse for '%s' returned %d\n", uri, rc);
++		g_free (uri);
++		quvi_close (&handle);
++		if (rc == QUVI_NOSUPPORT)
++			return TOTEM_PL_PARSER_RESULT_UNHANDLED;
++		return TOTEM_PL_PARSER_RESULT_ERROR;
+ 	}
 -	g_strfreev (lines);
+ 
+-	totem_pl_parser_add_hash_table (parser, ht, new_uri, FALSE);
+-	g_free (new_uri);
 +	getprop (QUVIPROP_MEDIAURL, video_uri);
 +	if (quvi_getprop (v, QUVIPROP_MEDIACONTENTLENGTH, &length) == QUVI_OK && length)
 +		length_str = g_strdup_printf ("%f", length);
@@ -280,13 +381,21 @@
 +	g_free (length_str);
 +	g_free (duration_str);
  
--	totem_pl_parser_add_hash_table (parser, ht, new_uri, FALSE);
--	g_free (new_uri);
+-	ret = TOTEM_PL_PARSER_RESULT_SUCCESS;
 +	quvi_parse_close (&v);
 +	quvi_close (&handle);
  
- 	return TOTEM_PL_PARSER_RESULT_SUCCESS;
+-out:
+-	g_free (script);
+-	g_free (uri);
+-	return ret;
++	return TOTEM_PL_PARSER_RESULT_SUCCESS;
  #else
+ 	return TOTEM_PL_PARSER_RESULT_UNHANDLED;
+ #endif /* !HAVE_QUVI */
+diff --git a/plparse/videosite-parser.c b/plparse/videosite-parser.c
+deleted file mode 100644
+index be374aa..0000000
 --- a/plparse/videosite-parser.c
 +++ /dev/null
 @@ -1,191 +0,0 @@
@@ -481,6 +590,8 @@
 -
 -	return 0;
 -}
+diff --git a/totem-plparser-mini-uninstalled.pc.in b/totem-plparser-mini-uninstalled.pc.in
+index fb22f66..cb6c437 100644
 --- a/totem-plparser-mini-uninstalled.pc.in
 +++ b/totem-plparser-mini-uninstalled.pc.in
 @@ -7,6 +7,6 @@ Name: totem-plparser
@@ -491,6 +602,8 @@
 +Requires.private: gthread-2.0 @QUVI@
  Libs: ${pc_top_builddir}/${pcfiledir}/plparse/libtotem-plparser-mini.la
  Cflags: -I${pc_top_builddir}/${pcfiledir}/plparse
+diff --git a/totem-plparser-mini.pc.in b/totem-plparser-mini.pc.in
+index 29ae520..777b93b 100644
 --- a/totem-plparser-mini.pc.in
 +++ b/totem-plparser-mini.pc.in
 @@ -7,6 +7,6 @@ Name: totem-plparser-mini
@@ -501,6 +614,8 @@
 +Requires.private: gthread-2.0 @QUVI@
  Libs: -L${libdir} -ltotem-plparser-mini
  Cflags: -I${includedir}/totem-pl-parser/1/plparser
+diff --git a/totem-plparser-uninstalled.pc.in b/totem-plparser-uninstalled.pc.in
+index 7264037..6a3d0be 100644
 --- a/totem-plparser-uninstalled.pc.in
 +++ b/totem-plparser-uninstalled.pc.in
 @@ -7,7 +7,7 @@ Name: totem-plparser
@@ -512,6 +627,8 @@
  Libs: ${pc_top_builddir}/${pcfiledir}/plparse/libtotem-plparser.la
  Libs.private: @LIBGCRYPT_LIBS@
  Cflags: -I${pc_top_builddir}/${pcfiledir}/plparse @LIBGCRYPT_CFLAGS@
+diff --git a/totem-plparser.pc.in b/totem-plparser.pc.in
+index 16f9240..abf3cdd 100644
 --- a/totem-plparser.pc.in
 +++ b/totem-plparser.pc.in
 @@ -7,7 +7,7 @@ Name: totem-plparser
@@ -523,3 +640,6 @@
  Libs: -L${libdir} -ltotem-plparser
  Libs.private: @LIBGCRYPT_LIBS@
  Cflags: -I${includedir}/totem-pl-parser/1/plparser @LIBGCRYPT_CFLAGS@
+-- 
+2.6.4
+




More information about the pkg-gnome-commits mailing list