From 9426e167117ae2b6b89bcc79448c10910fab913198516b78229de46583cf112d Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 16 Oct 2012 07:22:42 +0000 Subject: [PATCH] Accepting request 137933 from GNOME:Apps - build also with libpng15 * libpng15.patch (forwarded request 136986 from dimstar) OBS-URL: https://build.opensuse.org/request/show/137933 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/inkscape?expand=0&rev=65 --- inkscape-libpng15.patch | 42 +++++++++++++++++++++++++++++++++++++++++ inkscape.changes | 6 ++++++ inkscape.spec | 5 ++++- 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 inkscape-libpng15.patch diff --git a/inkscape-libpng15.patch b/inkscape-libpng15.patch new file mode 100644 index 0000000..23f37e9 --- /dev/null +++ b/inkscape-libpng15.patch @@ -0,0 +1,42 @@ +http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-gfx/inkscape/files/?diff_format=s +--- inkscape-0.48.1/src/extension/internal/pdfinput/svg-builder.cpp ++++ inkscape-0.48.1-mod//src/extension/internal/pdfinput/svg-builder.cpp +@@ -1443,7 +1443,7 @@ + return NULL; + } + // Set error handler +- if (setjmp(png_ptr->jmpbuf)) { ++ if (setjmp(png_jmpbuf(png_ptr))) { + png_destroy_write_struct(&png_ptr, &info_ptr); + return NULL; + } +--- inkscape-0.48.1/src/helper/png-write.cpp ++++ inkscape-0.48.1-mod//src/helper/png-write.cpp +@@ -165,7 +165,7 @@ + /* Set error handling. REQUIRED if you aren't supplying your own + * error hadnling functions in the png_create_write_struct() call. + */ +- if (setjmp(png_ptr->jmpbuf)) { ++ if (setjmp(png_jmpbuf(png_ptr))) { + /* If we get here, we had a problem reading the file */ + fclose(fp); + png_destroy_write_struct(&png_ptr, &info_ptr); +--- inkscape-0.48.1/src/sp-image.cpp ++++ inkscape-0.48.1-mod//src/sp-image.cpp +@@ -386,9 +386,13 @@ + + #if defined(PNG_iCCP_SUPPORTED) + { +- char* name = 0; ++ png_charp name = 0; + int compression_type = 0; +- char* profile = 0; ++#if (PNG_LIBPNG_VER < 10500) ++ png_charp profile = 0; ++#else ++ png_bytep profile = 0; ++#endif + png_uint_32 proflen = 0; + if ( png_get_iCCP(pngPtr, infoPtr, &name, &compression_type, &profile, &proflen) ) { + // g_message("Found an iCCP chunk named [%s] with %d bytes and comp %d", name, proflen, compression_type); + diff --git a/inkscape.changes b/inkscape.changes index 4a271c6..2d8d22e 100644 --- a/inkscape.changes +++ b/inkscape.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Oct 3 19:59:49 UTC 2012 - pgajdos@suse.com + +- build also with libpng15 + * libpng15.patch + ------------------------------------------------------------------- Fri Sep 14 15:49:03 UTC 2012 - dmueller@suse.com diff --git a/inkscape.spec b/inkscape.spec index 8f6857b..01720b6 100644 --- a/inkscape.spec +++ b/inkscape.spec @@ -20,7 +20,7 @@ Name: inkscape Version: 0.48.3.1 Release: 0 Summary: Vector Illustration Program -License: GPL-2.0 ; LGPL-2.1 +License: GPL-2.0 and LGPL-2.1 Group: Productivity/Graphics/Vector Editors Url: http://www.inkscape.org/ Source: http://downloads.sourceforge.net/project/inkscape/inkscape/0.48.3.1/%{name}-%{version}.tar.bz2 @@ -37,6 +37,8 @@ Patch2: inkscape-return-on-exit.patch Patch3: inkscape-poppler20.patch # PATCH-FIX-UPSTREAM inkscape-apply-invert-transform.patch bnc#779560 lp#840625 malcolmlewis@opensuse.org -- Apply invert transform to all image tags. Patch4: inkscape-apply-invert-transform.patch +# PATCH-FIX-UPSTREAM inkscape-libpng15.patch pgajdos@suse.cz -- build with libpng15 +Patch5: inkscape-libpng15.patch BuildRequires: boost-devel BuildRequires: docbook-toys BuildRequires: fdupes @@ -163,6 +165,7 @@ Inkscape is a vector illustration program for the GNOME desktop. %patch3 -p1 %endif %patch4 -p1 +%patch5 -p1 %build RPM_OPT_FLAGS="%{optflags}"