From 7367871288589287130bf0fe4e76d378af07163e Mon Sep 17 00:00:00 2001 From: Josef Řídký Date: Jul 31 2019 07:51:59 +0000 Subject: Fix reading svg files --- diff --git a/gimp-2.10.0-fix-svg-reading.patch b/gimp-2.10.0-fix-svg-reading.patch new file mode 100644 index 0000000..18cbcbe --- /dev/null +++ b/gimp-2.10.0-fix-svg-reading.patch @@ -0,0 +1,39 @@ +diff --git a/plug-ins/common/file-svg.c b/plug-ins/common/file-svg.c +index 570b3632b18e7a663b6ef2b0110941f64123720e..9f3de881d187406fabbc913ee8543a8fee83dcc7 100644 +--- a/plug-ins/common/file-svg.c ++++ b/plug-ins/common/file-svg.c +@@ -521,19 +521,24 @@ load_rsvg_size (const gchar *filename, + break; + case G_IO_STATUS_EOF: + success = rsvg_handle_close (handle, error); +- break; +- case G_IO_STATUS_NORMAL: +- success = rsvg_handle_write (handle, +- (const guchar *) buf, len, error); +- rsvg_handle_get_dimensions (handle, &dim); + +- if (dim.width > 0 && dim.height > 0) ++ if (success) + { +- vals->width = dim.width; +- vals->height = dim.height; ++ rsvg_handle_get_dimensions (handle, &dim); ++ ++ if (dim.width > 0 && dim.height > 0) ++ { ++ vals->width = dim.width; ++ vals->height = dim.height; + +- done = TRUE; ++ done = TRUE; ++ } + } ++ ++ break; ++ case G_IO_STATUS_NORMAL: ++ success = rsvg_handle_write (handle, ++ (const guchar *) buf, len, error); + break; + case G_IO_STATUS_AGAIN: + break; + diff --git a/gimp.spec b/gimp.spec index 6e82f62..bd6afca 100644 --- a/gimp.spec +++ b/gimp.spec @@ -88,8 +88,8 @@ Summary: GNU Image Manipulation Program Name: gimp Epoch: 2 Version: 2.10.12 -%global rel 1 -Release: %{?prerelprefix}%{rel}%{dotprerel}%{dotgitrev}%{?dist}.1 +%global rel 2 +Release: %{?prerelprefix}%{rel}%{dotprerel}%{dotgitrev}%{?dist} # Compute some version related macros. # Ugly, need to get quoting percent signs straight. @@ -225,6 +225,9 @@ Patch0: gimp-%{version}%{dashprerel}-git%{gitrev}.patch.bz2 # Fedora specific. Patch1: gimp-2.10.0-cm-system-monitor-profile-by-default.patch +# bz#1715882 +Patch2: gimp-2.10.0-fix-svg-reading.patch + # use external help browser directly if help browser plug-in is not built Patch100: gimp-2.10.0-external-help-browser.patch @@ -315,6 +318,7 @@ EOF %endif %patch1 -p1 -b .cm-system-monitor-profile-by-default +%patch2 -p1 -b .fix-svg %if ! %{with helpbrowser} %patch100 -p1 -b .external-help-browser @@ -692,6 +696,9 @@ make check %{?_smp_mflags} %endif %changelog +* Wed Jul 31 2019 Josef Ridky - 2:2.10.12-2 +- Fix issue with reading SVG files (#1715882) + * Thu Jul 25 2019 Fedora Release Engineering - 2:2.10.12-1.1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild