rpms/totem-pl-parser/OLPC-4 totem-pl-parser-removecameldep.patch, NONE, 1.1 totem-pl-parser-removecameldep2.patch, NONE, 1.1 totem-pl-parser.spec, 1.26, 1.27

Peter Robinson pbrobinson at fedoraproject.org
Sun Nov 23 15:25:50 UTC 2008


Author: pbrobinson

Update of /cvs/pkgs/rpms/totem-pl-parser/OLPC-4
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9436

Modified Files:
	totem-pl-parser.spec 
Added Files:
	totem-pl-parser-removecameldep.patch 
	totem-pl-parser-removecameldep2.patch 
Log Message:
- Add patch to allow disable of e-d-s


totem-pl-parser-removecameldep.patch:

--- NEW FILE totem-pl-parser-removecameldep.patch ---
Index: totem-plparser.pc.in
===================================================================
--- totem-plparser.pc.in	(revision 250)
+++ totem-plparser.pc.in	(revision 251)
@@ -9,6 +9,7 @@
 Description: Totem Playlist Parser library
 Version: @VERSION@
 Requires: gtk+-2.0
-Requires.private: libxml-2.0 camel-1.2
+Requires.private: libxml-2.0 @LIBCAMEL@
 Libs: -L${libdir} -ltotem-plparser
 Cflags: -I${includedir}/totem-pl-parser/1/plparser
+uselibcamel=@USELIBCAMEL@
Index: plparse/totem-pl-parser-podcast.c
===================================================================
--- plparse/totem-pl-parser-podcast.c	(revision 250)
+++ plparse/totem-pl-parser-podcast.c	(revision 251)
@@ -235,6 +235,9 @@
 			 GFile *base_file,
 			 gpointer data)
 {
+#ifndef HAVE_CAMEL
+	WARN_NO_CAMEL;
+#else
 	xml_node_t* doc, *channel;
 	char *contents;
 	gsize size;
@@ -274,6 +277,7 @@
 	xml_parser_free_tree (doc);
 
 	return TOTEM_PL_PARSER_RESULT_SUCCESS;
+#endif /* !HAVE_CAMEL */
 }
 
 /* http://www.apple.com/itunes/store/podcaststechspecs.html */
@@ -283,6 +287,9 @@
 			  GFile *base_file,
 			  gpointer data)
 {
+#ifndef HAVE_CAMEL
+	WARN_NO_CAMEL;
+#else
 	TotemPlParserResult ret;
 	char *url, *new_url, *uri_scheme;
 	GFile *new_file;
@@ -301,6 +308,7 @@
 	g_object_unref (new_file);
 
 	return ret;
+#endif /* !HAVE_CAMEL */
 }
 
 TotemPlParserResult
@@ -309,6 +317,9 @@
 			  GFile *base_file,
 			  gpointer data)
 {
+#ifndef HAVE_CAMEL
+	WARN_NO_CAMEL;
+#else
 	TotemPlParserResult ret;
 	char *url, *new_url;
 	GFile *new_file;
@@ -335,6 +346,7 @@
 	g_object_unref (new_file);
 
 	return ret;
+#endif /* !HAVE_CAMEL */
 }
 
 /* Atom docs:
@@ -473,6 +485,9 @@
 			  GFile *base_file,
 			  gpointer data)
 {
+#ifdef HAVE_CAMEL
+	WARN_NO_CAMEL;
+#else
 	xml_node_t* doc;
 	char *contents, *url;
 	gsize size;
@@ -501,6 +516,7 @@
 	xml_parser_free_tree (doc);
 
 	return TOTEM_PL_PARSER_RESULT_SUCCESS;
+#endif /* !HAVE_CAMEL */
 }
 
 TotemPlParserResult
@@ -509,6 +525,9 @@
 			      GFile *base_file,
 			      gpointer data)
 {
+#ifndef HAVE_CAMEL
+	WARN_NO_CAMEL;
+#else
 	guint len;
 
 	if (data == NULL)
@@ -524,6 +543,7 @@
 		return totem_pl_parser_add_opml (parser, file, base_file, data);
 
 	return TOTEM_PL_PARSER_RESULT_UNHANDLED;
+#endif /* !HAVE_CAMEL */
 }
 
 /* From libgsf's gsf-utils.h */
@@ -694,6 +714,9 @@
 			  GFile *base_file,
 			  gpointer data)
 {
+#ifndef HAVE_CAMEL
+	WARN_NO_CAMEL;
+#else
 	char *contents, *uncompressed, *itms_url;
 	GFile *itms_file, *feed_url;
 	TotemPlParserResult ret;
@@ -741,6 +764,7 @@
 	g_object_unref (feed_url);
 
 	return ret;
+#endif /* !HAVE_CAMEL */
 }
 
 gboolean
@@ -836,6 +860,9 @@
 			  GFile *base_file,
 			  gpointer data)
 {
+#ifndef HAVE_CAMEL
+	WARN_NO_CAMEL;
+#else
 	xml_node_t* doc;
 	char *contents, *url;
 	gsize size;
@@ -864,6 +891,7 @@
 	xml_parser_free_tree (doc);
 
 	return TOTEM_PL_PARSER_RESULT_SUCCESS;
+#endif /* !HAVE_CAMEL */
 }
 
 #endif /* !TOTEM_PL_PARSER_MINI */
Index: plparse/totem-pl-parser-podcast.h
===================================================================
--- plparse/totem-pl-parser-podcast.h	(revision 250)
+++ plparse/totem-pl-parser-podcast.h	(revision 251)
@@ -37,6 +37,14 @@
 const char * totem_pl_parser_is_xml_feed (const char *data, gsize len);
 
 #ifndef TOTEM_PL_PARSER_MINI
+
+#ifndef HAVE_CAMEL
+#define WARN_NO_CAMEL { \
+	g_warning("Trying to parse a podcast, but totem-pl-parser built without libcamel support. Please contact your distribution provider."); \
+	return TOTEM_PL_PARSER_RESULT_ERROR; \
+}
+#endif /* !HAVE_CAMEL */
+
 gboolean totem_pl_parser_is_itms_feed (GFile *file);
 
 TotemPlParserResult totem_pl_parser_add_xml_feed (TotemPlParser *parser,
Index: plparse/totem-pl-parser.c
===================================================================
--- plparse/totem-pl-parser.c	(revision 250)
+++ plparse/totem-pl-parser.c	(revision 251)
@@ -104,7 +104,10 @@
 #ifndef TOTEM_PL_PARSER_MINI
 #include <gobject/gvaluecollector.h>
 #include <gtk/gtk.h>
+
+#ifdef HAVE_CAMEL
 #include <camel/camel-mime-utils.h>
+#endif
 
 #include "totem-pl-parser.h"
 #include "totemplparser-marshal.h"
@@ -1756,6 +1759,7 @@
 	return -1;
 }
 
+
 /**
  * totem_pl_parser_parse_date:
  * @date_str: the date string to parse
@@ -1769,6 +1773,7 @@
 guint64
 totem_pl_parser_parse_date (const char *date_str, gboolean debug)
 {
+#ifdef HAVE_CAMEL
 	GTimeVal val;
 
 	g_return_val_if_fail (date_str != NULL, -1);
@@ -1780,11 +1785,12 @@
 		return val.tv_sec;
 	}
 	D(g_message ("Failed to parse duration '%s' using the ISO8601 parser", date_str));
-
 	/* Fall back to RFC 2822 date parsing */
 	return camel_header_decode_date (date_str, NULL);
+#else
+	WARN_NO_CAMEL;
+#endif /* HAVE_CAMEL */
 }
-
 #endif /* !TOTEM_PL_PARSER_MINI */
 
 static char *

totem-pl-parser-removecameldep2.patch:

--- NEW FILE totem-pl-parser-removecameldep2.patch ---
--- configure.in.orig	2008-10-30 10:58:34.000000000 +0000
+++ configure.in	2008-11-23 14:45:46.000000000 +0000
@@ -36,6 +36,7 @@
 
 # Requirements
 GLIB_REQS=2.16.3
+GIO_REQS=2.17.3
 DBUS_REQS=0.61
 
 # Before making a release, the PLPARSER_LT_VERSION string should be modified.
@@ -55,6 +56,40 @@
 AC_SUBST(TOTEM_PL_PARSER_VERSION_MINOR)
 AC_SUBST(TOTEM_PL_PARSER_VERSION_MICRO)
 
+##################################
+# Checking libcamel dependency
+##################################
+camel_message=""
+
+AC_ARG_ENABLE(camel-i-know-what-im-doing,
+	      AS_HELP_STRING([--disable-camel-i-know-what-im-doing],
+			     [Disable libcamel (Unsupported, breaks Podcast support).]),
+			     [enable_camel=no],
+			     [enable_camel=yes])
+
+if test "x$enable_camel" = "xyes" ; then
+   PKG_CHECK_MODULES(LIBCAMEL,  
+		     camel-1.2,
+                     [have_camel=yes], 
+                     [have_camel=no])
+
+   if test "x$have_camel" = "xyes" ; then
+      AC_SUBST(LIBCAMEL, camel-1.2)
+      AC_SUBST(USELIBCAMEL, yes)
+      AC_DEFINE(HAVE_CAMEL, 1, [Camel available in the system])
+      pkg_modules="$pkg_modules camel-1.2"
+   else
+      AC_MSG_ERROR([libcamel is required to compile totem-pl-parser.])
+   fi
+else
+   AC_SUBST(USELIBCAMEL, no)
+   camel_message="
+ **************************************************************
+ Compiling totem-pl-parser without libcamel.
+ This will break podcast support and is completely unsupported.
+ **************************************************************"
+fi
+
 dnl ***
 dnl HAL
 dnl ***
@@ -76,7 +111,7 @@
 AM_CONDITIONAL(HAVE_HAL, test x"$with_hal" = xyes)
 
 dnl Check for packages for building libtotem-plparser.la
-PKG_CHECK_MODULES(TOTEM_PLPARSER, [glib-2.0 >= $GLIB_REQS gtk+-2.0 libxml-2.0 camel-1.2 gio-2.0])
+PKG_CHECK_MODULES(TOTEM_PLPARSER, [glib-2.0 >= $GLIB_REQS gtk+-2.0 libxml-2.0 gio-2.0])
 
 PKG_CHECK_MODULES([TOTEM_PLPARSER_MINI], [gio-2.0])
 
@@ -103,7 +138,7 @@
 
 GTK_DOC_CHECK(1.0)
 
-AC_OUTPUT([
+AC_CONFIG_FILES([
 Makefile
 totem-plparser.pc
 totem-plparser-uninstalled.pc
@@ -126,3 +161,9 @@
 	AC_MSG_NOTICE([   HAL support disabled])
 fi
 
+
+AC_OUTPUT
+
+echo "
+$camel_message
+"


Index: totem-pl-parser.spec
===================================================================
RCS file: /cvs/pkgs/rpms/totem-pl-parser/OLPC-4/totem-pl-parser.spec,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- totem-pl-parser.spec	23 Nov 2008 13:43:11 -0000	1.26
+++ totem-pl-parser.spec	23 Nov 2008 15:25:19 -0000	1.27
@@ -7,6 +7,8 @@
 License:	LGPLv2+
 Url:		http://www.gnome.org/projects/totem/
 Source0:	http://download.gnome.org/sources/%{name}/2.22/%{name}-%{version}.tar.bz2
+Patch0:		totem-pl-parser-removecameldep.patch
+Patch1:		totem-pl-parser-removecameldep2.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Obsoletes:	totem-plparser
 
@@ -32,9 +34,11 @@
 
 %prep
 %setup -q
-
+%patch0 -p0 -b .removecameldep
+%patch1 -p0 -b .removecameldep2
 
 %build
+./autogen.sh --disable-camel-i-know-what-im-doing
 %configure --enable-static=no --disable-camel-i-know-what-im-doing
 make %{?_smp_mflags}
 




More information about the fedora-extras-commits mailing list