r42400 - in /desktop/unstable/librsvg/debian: changelog patches/30_rsvg-convert-Handle-gzip-compressed-input.patch patches/series

biebl at users.alioth.debian.org biebl at users.alioth.debian.org
Mon Sep 1 22:27:20 UTC 2014


Author: biebl
Date: Mon Sep  1 22:27:20 2014
New Revision: 42400

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=42400
Log:
Cherry-pick upstream fix to handle compressed input in rsvg-convert.
Closes: #760178

Added:
    desktop/unstable/librsvg/debian/patches/30_rsvg-convert-Handle-gzip-compressed-input.patch
Modified:
    desktop/unstable/librsvg/debian/changelog
    desktop/unstable/librsvg/debian/patches/series

Modified: desktop/unstable/librsvg/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/librsvg/debian/changelog?rev=42400&op=diff
==============================================================================
--- desktop/unstable/librsvg/debian/changelog	[utf-8] (original)
+++ desktop/unstable/librsvg/debian/changelog	[utf-8] Mon Sep  1 22:27:20 2014
@@ -1,3 +1,10 @@
+librsvg (2.40.3-2) UNRELEASED; urgency=medium
+
+  * Cherry-pick upstream fix to handle compressed input in rsvg-convert.
+    Closes: #760178
+
+ -- Michael Biebl <biebl at debian.org>  Tue, 02 Sep 2014 00:26:22 +0200
+
 librsvg (2.40.3-1) unstable; urgency=medium
 
   * New upstream release.

Added: desktop/unstable/librsvg/debian/patches/30_rsvg-convert-Handle-gzip-compressed-input.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/librsvg/debian/patches/30_rsvg-convert-Handle-gzip-compressed-input.patch?rev=42400&op=file
==============================================================================
--- desktop/unstable/librsvg/debian/patches/30_rsvg-convert-Handle-gzip-compressed-input.patch	(added)
+++ desktop/unstable/librsvg/debian/patches/30_rsvg-convert-Handle-gzip-compressed-input.patch	[utf-8] Mon Sep  1 22:27:20 2014
@@ -0,0 +1,58 @@
+From 07e79f07ef789a9bc0b9fb94c41f2af211570889 Mon Sep 17 00:00:00 2001
+From: Christian Persch <chpe at gnome.org>
+Date: Mon, 1 Sep 2014 20:29:34 +0200
+Subject: [PATCH] rsvg-convert: Handle gzip compressed input
+
+Code copied from rsvg-view.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=735836
+---
+ rsvg-convert.c | 31 ++++++++++++++++++++++++++++++-
+ 1 file changed, 30 insertions(+), 1 deletion(-)
+
+diff --git a/rsvg-convert.c b/rsvg-convert.c
+index b3d3575..4c3c9a5 100644
+--- a/rsvg-convert.c
++++ b/rsvg-convert.c
+@@ -215,8 +215,37 @@ main (int argc, char **argv)
+             file = NULL;
+             stream = g_unix_input_stream_new (STDIN_FILENO, FALSE);
+         } else {
+-            file = g_file_new_for_commandline_arg (args[i]);
++            GFileInfo *file_info;
++            gboolean compressed = FALSE;
++
++            file = g_file_new_for_commandline_arg (args[0]);
+             stream = (GInputStream *) g_file_read (file, NULL, &error);
++
++            if ((file_info = g_file_query_info (file,
++                                                G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
++                                                G_FILE_QUERY_INFO_NONE,
++                                                NULL,
++                                                NULL))) {
++                const char *content_type;
++                char *gz_content_type;
++
++                content_type = g_file_info_get_content_type (file_info);
++                gz_content_type = g_content_type_from_mime_type ("application/x-gzip");
++                compressed = (content_type != NULL && g_content_type_is_a (content_type, gz_content_type));
++                g_free (gz_content_type);
++                g_object_unref (file_info);
++            }
++
++            if (compressed) {
++                GZlibDecompressor *decompressor;
++                GInputStream *converter_stream;
++
++                decompressor = g_zlib_decompressor_new (G_ZLIB_COMPRESSOR_FORMAT_GZIP);
++                converter_stream = g_converter_input_stream_new (stream, G_CONVERTER (decompressor));
++                g_object_unref (stream);
++                stream = converter_stream;
++            }
++
+             if (stream == NULL)
+                 goto done;
+         }
+-- 
+2.1.0
+

Modified: desktop/unstable/librsvg/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/librsvg/debian/patches/series?rev=42400&op=diff
==============================================================================
--- desktop/unstable/librsvg/debian/patches/series	[utf-8] (original)
+++ desktop/unstable/librsvg/debian/patches/series	[utf-8] Mon Sep  1 22:27:20 2014
@@ -1,2 +1,3 @@
 10_rsvg-gz.patch
 20_rsvg_compat.patch
+30_rsvg-convert-Handle-gzip-compressed-input.patch




More information about the pkg-gnome-commits mailing list