This is an automated email from the git hooks/post-receive script.

skitt pushed a commit to branch debian-sid
in repository gweled.

commit f285a69b7687ca6fcf4af28674d4ba01223c6cdc
Author: Stephen Kitt <sk...@debian.org>
Date:   Fri Feb 9 09:05:33 2018 +0100

    Cope with librsvg’s new behaviour wrt. paths v. URIs
---
 debian/changelog                  |  7 +++++++
 debian/patches/007-rsvg-uri.patch | 42 +++++++++++++++++++++++++++++++++++++++
 debian/patches/series             |  1 +
 3 files changed, 50 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index e55d032..37926b6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+gweled (0.9.1-5) UNRELEASED; urgency=medium
+
+  * Cope with librsvg’s new behaviour by always using URIs instead of
+    paths. (Closes: #889688.)
+
+ -- Stephen Kitt <sk...@debian.org>  Fri, 09 Feb 2018 09:02:48 +0100
+
 gweled (0.9.1-4) unstable; urgency=medium
 
   * Adopt the package for the Debian Games Team, thanks Ondřej Surý for
diff --git a/debian/patches/007-rsvg-uri.patch 
b/debian/patches/007-rsvg-uri.patch
new file mode 100644
index 0000000..7662e3c
--- /dev/null
+++ b/debian/patches/007-rsvg-uri.patch
@@ -0,0 +1,42 @@
+Description: Use a URI for RSVG calls
+Author: Stephen Kitt <sk...@debian.org>
+Bug-Debian: https://bugs.debian.org/886833
+
+Recent librsvg ends up expecting a URI rather than a filename for
+calls to rsvg_pixbuf_from_file_at_size(). Older versions of librsvg
+work fine with URIs too, so unconditionally prepend "file://".
+
+Initialise error to avoid GError warnings. Free the error properly.
+
+--- a/src/sge_utils.c
++++ b/src/sge_utils.c
+@@ -29,20 +29,18 @@
+ {
+       gchar *full_pathname;
+       GdkPixbuf *pixbuf = NULL;
+-      GError *error;
++      GError *error = NULL;
+ 
+-      full_pathname = g_strconcat(DATADIR "/pixmaps/",
++      full_pathname = g_strconcat("file://", DATADIR "/pixmaps/",
+                                   filename,
+                                   NULL );
+-      if (g_file_test(full_pathname, G_FILE_TEST_IS_REGULAR)) {
+-              pixbuf = rsvg_pixbuf_from_file_at_size (full_pathname, width,
+-                                                 height, &error);
+-              g_free (full_pathname);
+-              if (pixbuf == NULL)
+-                      g_free (error);
+-
+-      } else
+-              g_warning ("%s not found", filename);
++      pixbuf = rsvg_pixbuf_from_file_at_size (full_pathname, width,
++                                         height, &error);
++      if (pixbuf == NULL) {
++              g_warning("Unable to load %s: %s", full_pathname, 
error->message);
++              g_error_free(error);
++      }
++      g_free (full_pathname);
+ 
+       return pixbuf;
+ }
diff --git a/debian/patches/series b/debian/patches/series
index 80d8f6d..d8c19d8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
 004-use-pkg-config-for-mikmod.patch
 005-continue-endless-timed-modes.patch
 006-spelling-fixes.patch
+007-rsvg-uri.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-games/gweled.git

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to