r33886 - in /desktop/unstable/librsvg/debian: changelog patches/20_rsvg_compat.patch patches/series

biebl at users.alioth.debian.org biebl at users.alioth.debian.org
Sat Mar 31 22:30:34 UTC 2012


Author: biebl
Date: Sat Mar 31 22:30:34 2012
New Revision: 33886

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=33886
Log:
rsvg didn't expect an -o parameter for the output file so apply some
compat magic when rsvg-convert is being called as rsvg.

Added:
    desktop/unstable/librsvg/debian/patches/20_rsvg_compat.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=33886&op=diff
==============================================================================
--- desktop/unstable/librsvg/debian/changelog [utf-8] (original)
+++ desktop/unstable/librsvg/debian/changelog [utf-8] Sat Mar 31 22:30:34 2012
@@ -1,3 +1,10 @@
+librsvg (2.36.0-4) UNRELEASED; urgency=low
+
+  * rsvg didn't expect an -o parameter for the output file so apply some
+    compat magic when rsvg-convert is being called as rsvg.
+
+ -- Michael Biebl <biebl at debian.org>  Sun, 01 Apr 2012 00:17:04 +0200
+
 librsvg (2.36.0-3) unstable; urgency=low
 
   * Instead of bringing the old rsvg script back, just install a symlink

Added: desktop/unstable/librsvg/debian/patches/20_rsvg_compat.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/librsvg/debian/patches/20_rsvg_compat.patch?rev=33886&op=file
==============================================================================
--- desktop/unstable/librsvg/debian/patches/20_rsvg_compat.patch (added)
+++ desktop/unstable/librsvg/debian/patches/20_rsvg_compat.patch [utf-8] Sat Mar 31 22:30:34 2012
@@ -1,0 +1,52 @@
+diff --git a/rsvg-convert.c b/rsvg-convert.c
+index f26fd87..d31115c 100644
+--- a/rsvg-convert.c
++++ b/rsvg-convert.c
+@@ -149,6 +149,8 @@ main (int argc, char **argv)
+     cairo_t *cr = NULL;
+     RsvgDimensionData dimensions;
+     FILE *output_file = stdout;
++    char *basename;
++    gboolean rsvg_compat = FALSE;
+ 
+     GOptionEntry options_table[] = {
+         {"dpi-x", 'd', 0, G_OPTION_ARG_DOUBLE, &dpi_x,
+@@ -200,6 +202,27 @@ main (int argc, char **argv)
+         return 0;
+     }
+ 
++    if (args)
++        while (args[n_args] != NULL)
++            n_args++;
++
++    basename = g_path_get_basename (argv[0]);
++    if (g_ascii_strcasecmp (basename, "rsvg") == 0) {
++        rsvg_compat = TRUE;
++    }
++    g_free (basename);
++
++    if (rsvg_compat) {
++        /* We are being called as rsvg. Apply some compat magic */
++        if (n_args == 2) {
++            output = args[1];
++            n_args = 1;
++        } else {
++            fprintf (stderr, _("Please supply an input and output file.\n"));
++            exit (1);
++        }
++    }
++
+     if (output != NULL) {
+         output_file = fopen (output, "wb");
+         if (!output_file) {
+@@ -211,10 +234,6 @@ main (int argc, char **argv)
+         g_free (output);
+     }
+ 
+-    if (args)
+-        while (args[n_args] != NULL)
+-            n_args++;
+-
+     if (n_args == 0) {
+         n_args = 1;
+         using_stdin = TRUE;

Modified: desktop/unstable/librsvg/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/librsvg/debian/patches/series?rev=33886&op=diff
==============================================================================
--- desktop/unstable/librsvg/debian/patches/series [utf-8] (original)
+++ desktop/unstable/librsvg/debian/patches/series [utf-8] Sat Mar 31 22:30:34 2012
@@ -1,2 +1,3 @@
 10_rsvg-gz.patch
+20_rsvg_compat.patch
 99_ltmain_as-needed.patch




More information about the pkg-gnome-commits mailing list