diff options
author | Danny Rawlins <monster.romster@gmail.com> | 2019-11-09 22:05:10 +1100 |
---|---|---|
committer | Danny Rawlins <monster.romster@gmail.com> | 2019-11-09 22:05:10 +1100 |
commit | dc0a43457b5ca066c78ef82a6c94d410d3a9f9fd (patch) | |
tree | 297ea15c20e2a4203c40a4aef302a9001e8b7bb4 /inkscape | |
parent | 5bc828457c0ed1b013ad19708f85fdb375099e8c (diff) | |
download | contrib-dc0a43457b5ca066c78ef82a6c94d410d3a9f9fd.tar.gz contrib-dc0a43457b5ca066c78ef82a6c94d410d3a9f9fd.tar.xz |
inkscape: fix for poppler 0.82.x
Diffstat (limited to 'inkscape')
-rw-r--r-- | inkscape/.signature | 8 | ||||
-rw-r--r-- | inkscape/Pkgfile | 17 | ||||
-rw-r--r-- | inkscape/inkscape-0.92.4-poppler-0.76.0.patch | 44 | ||||
-rw-r--r-- | inkscape/inkscape-0.92.4-poppler_0_82_0_fixes-1.patch | 63 | ||||
-rw-r--r-- | inkscape/inkscape-0.92.4-upstream_fixes-1.patch | 96 | ||||
-rw-r--r-- | inkscape/inkscape-0.92.4-use_versioned_ImageMagick6-1.patch | 33 |
6 files changed, 209 insertions, 52 deletions
diff --git a/inkscape/.signature b/inkscape/.signature index fb00bba52..67190d971 100644 --- a/inkscape/.signature +++ b/inkscape/.signature @@ -1,6 +1,8 @@ untrusted comment: verify with /etc/ports/contrib.pub -RWSagIOpLGJF31eKlzOW5oKcRe5fL/Tn7UAD6eT6umizECSach72pIb5Nq3/DGkO71BakKY1vH5yk1fl2cTXlrbuKDcOSCVy3ww= -SHA256 (Pkgfile) = af496c0ea0e5534258f22b7acee0b008cf6163dc2d9bb35f95bc4d47944121b7 +RWSagIOpLGJF3xGbhwh7p1bdsxBeBh6A0U26SBVwP0XjBM7iu9yuXmc6mtXmVfY3hGydiqWwI2DV5JfBYd51h98IuThMrhuLKg4= +SHA256 (Pkgfile) = ed26e11e2b982632207e4a3e4235f62d9e35fd326e4bf9b89ba794769429c957 SHA256 (.footprint) = a231855b77d8603f16e2a8754074e97f6c430bf80ac8ccaa02b35814f2f4db2b SHA256 (inkscape-0.92.4.tar.bz2) = 57ec2da8177b36614a513e2822efd73af721e690f7ddc6bd0a5fbb1525b4515e -SHA256 (inkscape-0.92.4-poppler-0.76.0.patch) = 3c476cccaa12d962d13e446da4075e821980a883f2be8dac0ec9ae2061926d6a +SHA256 (inkscape-0.92.4-poppler_0_82_0_fixes-1.patch) = 0c35bc0be8d681531233b43123c11bd6d375e8d780b9b78b5ca018c6ae61484e +SHA256 (inkscape-0.92.4-use_versioned_ImageMagick6-1.patch) = 7f0e401e359285590f545c1b1225ec98682922d2f82e805c722c2f086be28c4c +SHA256 (inkscape-0.92.4-upstream_fixes-1.patch) = 6932d7f140ba0ee4992bdea165f94854a3114d9eac190b7003b18af7f6cf7341 diff --git a/inkscape/Pkgfile b/inkscape/Pkgfile index 3a5be3747..e86315a4f 100644 --- a/inkscape/Pkgfile +++ b/inkscape/Pkgfile @@ -6,14 +6,22 @@ name=inkscape version=0.92.4 -release=1 +release=2 source=(https://media.inkscape.org/dl/resources/file/$name-$version.tar.bz2 - inkscape-0.92.4-poppler-0.76.0.patch) + inkscape-0.92.4-poppler_0_82_0_fixes-1.patch + inkscape-0.92.4-use_versioned_ImageMagick6-1.patch + inkscape-0.92.4-upstream_fixes-1.patch) build() { cd $name-$version - patch -p1 -i $SRC/inkscape-0.92.4-poppler-0.76.0.patch + # fix a problem introduced by Poppler-0.76.1 + sed -e 's|new Lexer(xref, obj)|obj|g' -i src/extension/internal/pdfinput/pdf-parser.cpp + + patch -p1 -i $SRC/inkscape-0.92.4-poppler_0_82_0_fixes-1.patch + patch -p1 -i $SRC/inkscape-0.92.4-use_versioned_ImageMagick6-1.patch + patch -p1 -i $SRC/inkscape-0.92.4-upstream_fixes-1.patch + CXXFLAGS+=' -std=c++11' @@ -29,8 +37,7 @@ build() { --with-perl \ --enable-lcms \ --enable-poppler-cairo \ - --disable-strict-build \ - --disable-dependency-tracking + --disable-strict-build make make DESTDIR=$PKG install diff --git a/inkscape/inkscape-0.92.4-poppler-0.76.0.patch b/inkscape/inkscape-0.92.4-poppler-0.76.0.patch deleted file mode 100644 index 11383d9aa..000000000 --- a/inkscape/inkscape-0.92.4-poppler-0.76.0.patch +++ /dev/null @@ -1,44 +0,0 @@ -From dc25406853353320078eca22cf817fb052c97082 Mon Sep 17 00:00:00 2001 -From: Marc Jeanmougin <marc@jeanmougin.fr> -Date: Wed, 24 Apr 2019 14:11:26 +0200 -Subject: [PATCH] Tentative fix for poppler 0.76 - ---- - src/extension/internal/pdfinput/pdf-parser.cpp | 2 +- - src/extension/internal/pdfinput/poppler-transition-api.h | 7 +++++++ - 2 files changed, 8 insertions(+), 1 deletion(-) - -diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp -index 2981d6ee51..ddbff7671f 100644 ---- a/src/extension/internal/pdfinput/pdf-parser.cpp -+++ b/src/extension/internal/pdfinput/pdf-parser.cpp -@@ -426,7 +426,7 @@ void PdfParser::parse(Object *obj, GBool topLevel) { - error(errInternal, -1, "Weird page contents"); - return; - } -- parser = new Parser(xref, new Lexer(xref, obj), gFalse); -+ parser = new _POPPLER_NEW_PARSER(xref, obj); - go(topLevel); - delete parser; - parser = NULL; -diff --git a/src/extension/internal/pdfinput/poppler-transition-api.h b/src/extension/internal/pdfinput/poppler-transition-api.h -index 6e4dde7dee..21a60702fa 100644 ---- a/src/extension/internal/pdfinput/poppler-transition-api.h -+++ b/src/extension/internal/pdfinput/poppler-transition-api.h -@@ -3,6 +3,13 @@ - - #include <glib/poppler-features.h> - -+#if POPPLER_CHECK_VERSION(0, 76, 0) -+#define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, obj, gFalse) -+#else -+#define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, new Lexer(xref, obj), gFalse) -+#endif -+ -+ - #if POPPLER_CHECK_VERSION(0, 72, 0) - #define getCString c_str - #endif --- -2.18.1 - diff --git a/inkscape/inkscape-0.92.4-poppler_0_82_0_fixes-1.patch b/inkscape/inkscape-0.92.4-poppler_0_82_0_fixes-1.patch new file mode 100644 index 000000000..61c568eac --- /dev/null +++ b/inkscape/inkscape-0.92.4-poppler_0_82_0_fixes-1.patch @@ -0,0 +1,63 @@ +Submitted By: Douglas R. Reno <renodr at linuxfromscratch dot org> +Date: 2019-10-28 +Initial Package Version: 0.92.4 +Origin: Upstream (https://gitlab.com/inkscape/inkscape/merge_requests/986) +Upstream Status: Applied +Description: Adjusts the usage of the poppler-glib API to use a + const int instead of a standard int, since the + data types are incompatible and causes a build failure. + This required modification to the SVG Builder and + PDF Parser. + +diff -Naurp inkscape-0.92.4.orig/src/extension/internal/pdfinput/pdf-parser.cpp inkscape-0.92.4/src/extension/internal/pdfinput/pdf-parser.cpp +--- inkscape-0.92.4.orig/src/extension/internal/pdfinput/pdf-parser.cpp 2019-01-14 22:29:27.000000000 -0600 ++++ inkscape-0.92.4/src/extension/internal/pdfinput/pdf-parser.cpp 2019-10-28 09:54:48.488255747 -0500 +@@ -2414,7 +2414,7 @@ void PdfParser::doShowText(GooString *s) + int wMode; + double riseX, riseY; + CharCode code; +- Unicode *u = NULL; ++ Unicode _POPPLER_CONST_82 *u = NULL; + double x, y, dx, dy, tdx, tdy; + double originX, originY, tOriginX, tOriginY; + double oldCTM[6], newCTM[6]; +diff -Naurp inkscape-0.92.4.orig/src/extension/internal/pdfinput/poppler-transition-api.h inkscape-0.92.4/src/extension/internal/pdfinput/poppler-transition-api.h +--- inkscape-0.92.4.orig/src/extension/internal/pdfinput/poppler-transition-api.h 2019-01-14 22:29:27.000000000 -0600 ++++ inkscape-0.92.4/src/extension/internal/pdfinput/poppler-transition-api.h 2019-10-28 09:55:37.586507369 -0500 +@@ -3,6 +3,12 @@ + + #include <glib/poppler-features.h> + ++#if POPPLER_CHECK_VERSION(0, 82, 0) ++#define _POPPLER_CONST_82 const ++#else ++#define _POPPLER_CONST_82 ++#endif ++ + #if POPPLER_CHECK_VERSION(0, 72, 0) + #define getCString c_str + #endif +diff -Naurp inkscape-0.92.4.orig/src/extension/internal/pdfinput/svg-builder.cpp inkscape-0.92.4/src/extension/internal/pdfinput/svg-builder.cpp +--- inkscape-0.92.4.orig/src/extension/internal/pdfinput/svg-builder.cpp 2019-01-14 22:29:27.000000000 -0600 ++++ inkscape-0.92.4/src/extension/internal/pdfinput/svg-builder.cpp 2019-10-28 09:56:03.815112158 -0500 +@@ -1379,7 +1379,7 @@ void SvgBuilder::beginString(GfxState *s + void SvgBuilder::addChar(GfxState *state, double x, double y, + double dx, double dy, + double originX, double originY, +- CharCode /*code*/, int /*nBytes*/, Unicode *u, int uLen) { ++ CharCode /*code*/, int /*nBytes*/, Unicode const *u, int uLen) { + + + bool is_space = ( uLen == 1 && u[0] == 32 ); +diff -Naurp inkscape-0.92.4.orig/src/extension/internal/pdfinput/svg-builder.h inkscape-0.92.4/src/extension/internal/pdfinput/svg-builder.h +--- inkscape-0.92.4.orig/src/extension/internal/pdfinput/svg-builder.h 2019-01-14 22:29:27.000000000 -0600 ++++ inkscape-0.92.4/src/extension/internal/pdfinput/svg-builder.h 2019-10-28 09:56:25.743784036 -0500 +@@ -141,7 +141,7 @@ public: + void addChar(GfxState *state, double x, double y, + double dx, double dy, + double originX, double originY, +- CharCode code, int nBytes, Unicode *u, int uLen); ++ CharCode code, int nBytes, Unicode const *u, int uLen); + void beginTextObject(GfxState *state); + void endTextObject(GfxState *state); + diff --git a/inkscape/inkscape-0.92.4-upstream_fixes-1.patch b/inkscape/inkscape-0.92.4-upstream_fixes-1.patch new file mode 100644 index 000000000..81aaa2420 --- /dev/null +++ b/inkscape/inkscape-0.92.4-upstream_fixes-1.patch @@ -0,0 +1,96 @@ +Submitted By: Ken Moffat <ken at linuxfromscratch dot org> +Date: 2019-06-25 +Initial Package Version: 0.92.4 +Upstream Status: Applied +Origin: Upstream +Description: Fixes for out of bounds accesses in the fill bucket and text tools. +These issues are highlighted if -D_FORTIFY_SOURCE=2 is used (e.g. application +terminated when trying to use the fill tool). + +commit 19225039b8667679c175e62f1faa29495b4ed547 +Author: Nathan Lee <2431820-nathanal@users.noreply.gitlab.com> +Date: Fri Apr 26 00:30:04 2019 +1000 + + Add out of bound checks to fill bucket + + Fixes https://gitlab.com/inkscape/inbox/issues/398 + +commit 37a5a0e7f1e0303222e6349379a6943c60f3b5b8 +Author: Trevor Spiteri <trevor.spiteri@um.edu.mt> +Date: Tue Jan 15 18:57:17 2019 +0100 + + out-of-bounds access on Enter in new text field + + https://bugzilla.redhat.com/show_bug.cgi?id=1575842 + + Reproduce using: + 1. Select text tool (F8) + 2. Click on empty canvas + 3. Hit Enter + +commit 6b8b86ca248cc47128ee3646d7ce17d2c0720522 +Author: Trevor Spiteri <trevor.spiteri@um.edu.mt> +Date: Tue Jan 15 18:57:56 2019 +0100 + + out-of-bounds access on clicking at end of text field + + https://bugzilla.redhat.com/show_bug.cgi?id=1608371 + https://bugs.launchpad.net/inkscape/+bug/1803553 + + Reproduce using: + 1. Select text tool (F8) + 2. Click on empty canvas + 3. Type "abc" + 4. Click somewhere else + 5. Click in first text field after "c" in "abc" + +diff -Naur a/src/libnrtype/Layout-TNG-OutIter.cpp b/src/libnrtype/Layout-TNG-OutIter.cpp +--- a/src/libnrtype/Layout-TNG-OutIter.cpp 2019-01-15 04:29:27.000000000 +0000 ++++ b/src/libnrtype/Layout-TNG-OutIter.cpp 2019-06-25 18:55:33.680796467 +0100 +@@ -46,7 +46,10 @@ + best_x_difference = this_x_difference; + } + } +- if (best_char_index == -1) return iterator(this, char_index); ++ if (best_char_index == -1) ++ best_char_index = char_index; ++ if (best_char_index == _characters.size()) ++ return end(); + return iterator(this, best_char_index); + } + +@@ -182,6 +185,8 @@ + if (_input_stream[source_index]->Type() != TEXT_SOURCE) + return iterator(this, char_index); + ++ if (char_index >= _characters.size()) ++ return end(); + return iterator(this, char_index); + /* This code was never used, the text_iterator argument was "NULL" in all calling code + InputStreamTextSource const *text_source = static_cast<InputStreamTextSource const *>(_input_stream[source_index]); +diff -Naur a/src/ui/tools/flood-tool.cpp b/src/ui/tools/flood-tool.cpp +--- a/src/ui/tools/flood-tool.cpp 2019-01-15 04:29:27.000000000 +0000 ++++ b/src/ui/tools/flood-tool.cpp 2019-06-25 18:55:14.064888807 +0100 +@@ -630,7 +630,7 @@ + bool can_paint_top = (top_ty > 0); + bool can_paint_bottom = (bottom_ty < bci.height); + +- Geom::Point t = fill_queue->front(); ++ Geom::Point front_of_queue = fill_queue->empty() ? Geom::Point() : fill_queue->front(); + + do { + ok = false; +@@ -648,8 +648,11 @@ + paint_directions = paint_pixel(px, trace_px, orig_color, bci, current_trace_t); + if (bci.radius == 0) { + mark_pixel_checked(current_trace_t); +- if ((t[Geom::X] == bci.x) && (t[Geom::Y] == bci.y)) { +- fill_queue->pop_front(); t = fill_queue->front(); ++ if ((!fill_queue->empty()) && ++ (front_of_queue[Geom::X] == bci.x) && ++ (front_of_queue[Geom::Y] == bci.y)) { ++ fill_queue->pop_front(); ++ front_of_queue = fill_queue->empty() ? Geom::Point() : fill_queue->front(); + } + } + diff --git a/inkscape/inkscape-0.92.4-use_versioned_ImageMagick6-1.patch b/inkscape/inkscape-0.92.4-use_versioned_ImageMagick6-1.patch new file mode 100644 index 000000000..d2ed42539 --- /dev/null +++ b/inkscape/inkscape-0.92.4-use_versioned_ImageMagick6-1.patch @@ -0,0 +1,33 @@ +Submitted By: Ken Moffat <ken at linuxfromscratch dot org> +Date: 2017-01-09 +Initial Package Version: 0.92.0 +Upstream Status: N/A +Origin: Self +Description: Look for verisioned ImageMagick-6 pkgconfig files so that +ImageMagick-6 libraries and be installed alongside a full ImageMagick-7. +This requires a patched build of ImageMagick-6. + +diff -Naur inkscape-0.92.0.orig/CMakeScripts/DefineDependsandFlags.cmake inkscape-0.92.0/CMakeScripts/DefineDependsandFlags.cmake +--- inkscape-0.92.0.orig/CMakeScripts/DefineDependsandFlags.cmake 2017-01-02 09:44:59.000000000 +0000 ++++ inkscape-0.92.0/CMakeScripts/DefineDependsandFlags.cmake 2017-01-08 03:03:50.171286138 +0000 +@@ -373,14 +373,14 @@ + list(APPEND INKSCAPE_LIBS ${ZLIB_LIBRARIES}) + + if(WITH_IMAGE_MAGICK) +- pkg_check_modules(ImageMagick ImageMagick MagickCore Magick++ ) +- if(ImageMagick_FOUND) ++ pkg_check_modules(ImageMagick-6 ImageMagick-6 MagickCore-6 Magick++-6 ) ++ if(ImageMagick-6_FOUND) + +- list(APPEND INKSCAPE_LIBS ${ImageMagick_LDFLAGS}) +- add_definitions(${ImageMagick_CFLAGS_OTHER}) ++ list(APPEND INKSCAPE_LIBS ${ImageMagick-6_LDFLAGS}) ++ add_definitions(${ImageMagick-6_CFLAGS_OTHER}) + +- list(APPEND INKSCAPE_INCS_SYS ${ImageMagick_INCLUDE_DIRS}) +- list(APPEND INKSCAPE_LIBS ${ImageMagick_LIBRARIES}) ++ list(APPEND INKSCAPE_INCS_SYS ${ImageMagick-6_INCLUDE_DIRS}) ++ list(APPEND INKSCAPE_LIBS ${ImageMagick-6_LIBRARIES}) + else() + set(WITH_IMAGE_MAGICK OFF) # enable 'Extensions > Raster' + endif() |