diff -Nru t4kcommon-0.1.1/debian/changelog t4kcommon-0.1.1/debian/changelog --- t4kcommon-0.1.1/debian/changelog 2018-05-31 12:16:05.000000000 +0000 +++ t4kcommon-0.1.1/debian/changelog 2019-01-06 19:28:50.000000000 +0000 @@ -1,3 +1,19 @@ +t4kcommon (0.1.1-5) unstable; urgency=medium + + * Fix loading each frame from SVG sprites (Closes: #916060), + thanks to Chris Donoghue for the patch. + * d/control: + - bump debhelper compat to 11 and use the new debhelper-compat(=11) + notation and drop d/compat. + - add "Rules-Requires-Root: no" to support building as non-root. + - bump Standards-Version to 4.3.0, no changes needed. + * d/changelog: fix trailing whitespaces thanks to lintian. + * Drop d/source/options as xz is the default compression today, also stop + overriding dh_builddeb in d/rules for the same reasons. + * d/copyright: use https for Format: URL. + + -- Holger Levsen Sun, 06 Jan 2019 20:28:50 +0100 + t4kcommon (0.1.1-4) unstable; urgency=medium * d/control: @@ -24,7 +40,7 @@ [ Holger Levsen ] * Acknowledge NMU, thanks Tobias. - * Bump standards version to 3.9.8, no changes needed. + * Bump standards version to 3.9.8, no changes needed. * Use git instead of cgit in Vcs-Browser URL. -- Holger Levsen Thu, 29 Sep 2016 14:02:09 +0200 diff -Nru t4kcommon-0.1.1/debian/compat t4kcommon-0.1.1/debian/compat --- t4kcommon-0.1.1/debian/compat 2018-05-31 12:14:02.000000000 +0000 +++ t4kcommon-0.1.1/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -10 diff -Nru t4kcommon-0.1.1/debian/control t4kcommon-0.1.1/debian/control --- t4kcommon-0.1.1/debian/control 2018-05-31 12:15:39.000000000 +0000 +++ t4kcommon-0.1.1/debian/control 2019-01-06 18:59:59.000000000 +0000 @@ -3,7 +3,8 @@ Priority: optional Maintainer: Holger Levsen Uploaders: Dmitry Smirnov -Build-Depends: debhelper (>= 10.2.5~), autopoint +Build-Depends: debhelper-compat (= 11) + ,autopoint ,doxygen ,libpng-dev ,librsvg2-dev @@ -14,7 +15,8 @@ ,libxml2-dev # needed for de-duplication: ,rdfind ,symlinks -Standards-Version: 4.1.4 +Standards-Version: 4.3.0 +Rules-Requires-Root: no Homepage: http://tux4kids.alioth.debian.org/ Vcs-Git: https://salsa.debian.org/tux4kids-pkg-team/t4kcommon Vcs-Browser: https://salsa.debian.org/tux4kids-pkg-team/t4kcommon diff -Nru t4kcommon-0.1.1/debian/copyright t4kcommon-0.1.1/debian/copyright --- t4kcommon-0.1.1/debian/copyright 2018-05-31 12:10:03.000000000 +0000 +++ t4kcommon-0.1.1/debian/copyright 2019-01-06 19:27:51.000000000 +0000 @@ -1,4 +1,4 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: t4k_common Upstream-Contact: tuxmath-devel@lists.sourceforge.net Source: http://tux4kids.alioth.debian.org/tuxmath/download.php diff -Nru t4kcommon-0.1.1/debian/patches/916060_bugfix.patch t4kcommon-0.1.1/debian/patches/916060_bugfix.patch --- t4kcommon-0.1.1/debian/patches/916060_bugfix.patch 1970-01-01 00:00:00.000000000 +0000 +++ t4kcommon-0.1.1/debian/patches/916060_bugfix.patch 2019-01-06 18:45:40.000000000 +0000 @@ -0,0 +1,32 @@ +Description: fix loading each frame from SVG sprites + rsvg_handle_get_desc returns null so next sscanf segfaults. Use instead iterating + up from zero for id frame%d +Author: cdonoghu@gmail.com +Origin: other +Forwarded: no +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/src/t4k_loaders.c ++++ b/src/t4k_loaders.c +@@ -213,14 +213,13 @@ + new_sprite = malloc(sizeof(sprite)); + new_sprite->default_img = render_svg_from_handle(file_handle, width, height, "#default"); + +- /* get number of frames from description */ +- sscanf(rsvg_handle_get_desc(file_handle), "%d", &new_sprite->num_frames); +- DEBUGMSG(debug_loaders, "load_svg_sprite(): loading %d frames\n", new_sprite->num_frames); +- +- for(i = 0; i < new_sprite->num_frames; i++) +- { +- sprintf(lay_name, "#frame%d", i); +- new_sprite->frame[i] = render_svg_from_handle(file_handle, width, height, lay_name); ++ /* get number of frames directly. End when #frame doesn't exist */ ++ new_sprite->num_frames = 0; ++ while(1) { ++ sprintf(lay_name, "#frame%d", new_sprite->num_frames); ++ if ( ! (rsvg_handle_has_sub(file_handle, lay_name)) ) break; ++ new_sprite->frame[new_sprite->num_frames] = render_svg_from_handle(file_handle, width, height, lay_name); ++ new_sprite->num_frames++; + } + + g_object_unref(file_handle); diff -Nru t4kcommon-0.1.1/debian/patches/series t4kcommon-0.1.1/debian/patches/series --- t4kcommon-0.1.1/debian/patches/series 2018-05-31 12:14:02.000000000 +0000 +++ t4kcommon-0.1.1/debian/patches/series 2019-01-06 18:44:12.000000000 +0000 @@ -1 +1,2 @@ libpng16.patch +916060_bugfix.patch diff -Nru t4kcommon-0.1.1/debian/rules t4kcommon-0.1.1/debian/rules --- t4kcommon-0.1.1/debian/rules 2018-05-31 12:14:02.000000000 +0000 +++ t4kcommon-0.1.1/debian/rules 2019-01-06 19:16:02.000000000 +0000 @@ -32,6 +32,3 @@ [ -d "$(CURDIR)/debian/$(PKG)-dbg" ] \ && dh_strip --dbg-package=$(PKG)-dbg \ || dh_strip - -override_dh_builddeb: - dh_builddeb -- -Zxz diff -Nru t4kcommon-0.1.1/debian/source/options t4kcommon-0.1.1/debian/source/options --- t4kcommon-0.1.1/debian/source/options 2018-05-31 12:10:03.000000000 +0000 +++ t4kcommon-0.1.1/debian/source/options 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -compression = "xz"