From 724778e557d9678792f597f7fce6ae9e5dbd5989 Mon Sep 17 00:00:00 2001 From: Ismael Luceno Date: Sun, 15 Aug 2021 18:14:03 +0200 Subject: inkscape 1.1 --- graphics/inkscape/BUILD | 6 -- graphics/inkscape/CONFIGURE | 1 + graphics/inkscape/DEPENDS | 80 +++++++++++------- graphics/inkscape/DETAILS | 13 +-- graphics/inkscape/HISTORY | 9 ++ graphics/inkscape/INSTALL | 3 - graphics/inkscape/PRE_BUILD | 12 ++- .../patches/inkscape-0.92.4-upstream_fixes-1.patch | 96 ---------------------- 8 files changed, 71 insertions(+), 149 deletions(-) delete mode 100755 graphics/inkscape/BUILD create mode 100755 graphics/inkscape/CONFIGURE delete mode 100755 graphics/inkscape/INSTALL delete mode 100644 graphics/inkscape/patches/inkscape-0.92.4-upstream_fixes-1.patch (limited to 'graphics') diff --git a/graphics/inkscape/BUILD b/graphics/inkscape/BUILD deleted file mode 100755 index d2b3b048ed..0000000000 --- a/graphics/inkscape/BUILD +++ /dev/null @@ -1,6 +0,0 @@ -# Dependency hell demands C++11. -CXXFLAGS+=" -std=gnu++11" && -if is_version_less 0.57 "$(installed_version poppler)"; then - CPPFLAGS+=" -DPOPPLER_NEW_OBJECT_API=1" -fi && -default_build diff --git a/graphics/inkscape/CONFIGURE b/graphics/inkscape/CONFIGURE new file mode 100755 index 0000000000..b1e2770061 --- /dev/null +++ b/graphics/inkscape/CONFIGURE @@ -0,0 +1 @@ +. "$GRIMOIRE"/CMAKE_CONFIGURE diff --git a/graphics/inkscape/DEPENDS b/graphics/inkscape/DEPENDS index f2c1113eb7..754c1a831d 100755 --- a/graphics/inkscape/DEPENDS +++ b/graphics/inkscape/DEPENDS @@ -1,10 +1,8 @@ -# A kind of bug: inkscape's text font selection freaks out unless this font is present. -# Valid as of 0.48.1, also see https://bugs.launchpad.net/inkscape/+bug/273961 . -depends ttf-bitstream-vera && +. "$GRIMOIRE"/CMAKE_DEPENDS && depends -sub CXX gcc && depends gsl && depends -sub IOSTREAMS boost && -depends gtkmm2 && +depends gtkmm3 && depends libxml2 && depends libxslt && depends libart_lgpl && @@ -13,38 +11,58 @@ depends libgc && depends popt && depends xml-parser-expat && -optional_depends gtkspell "" "" "for GtkSpell support" && - -suggest_depends pyxml "" "" "to enable Export GIMP palette extension" && -suggest_depends numpy "" "" "to enable Perspective extension" && - -if is_depends_enabled poppler cairo; then +optional_depends readline \ + -DWITH_GNU_READLINE={ON,OFF} \ + "for shell mode auto-completion" && +optional_depends dbus \ + -DWITH_DBUS={ON,OFF} \ + 'for DBus interface support' && +optional_depends imagemagick \ + -DWITH_IMAGE_MAGICK={ON,OFF} \ + 'use ImageMagick for raster extensions and image import' && +if ! is_depends_enabled "$SPELL" imagemagick; then + optional_depends graphicsmagick \ + -DWITH_GRAPHICS_MAGICK={ON,OFF} \ + 'use GraphicsMagick for raster extensions and image import' +fi && +optional_depends libcdr \ + -DWITH_LIBCDR={ON,OFF} \ + 'for CorelDRAW file format support' && +optional_depends libvisio \ + -DWITH_LIBVISIO={ON,OFF} \ + 'for Microsoft Visio file format support' && +optional_depends libwpg \ + -DWITH_LIBWPG={ON,OFF} \ + 'for WordPerfect Graphics file format support' && +optional_depends gspell \ + -DWITH_GSPELL={ON,OFF} \ + 'for spell-checking support' && +optional_depends poppler \ + -DENABLE_POPPLER={ON,OFF} \ + 'for poppler support' && +if is_depends_enabled "$SPELL" poppler && + is_depends_enabled poppler cairo; then optional_depends -sub XPDF_HEADERS poppler \ - "--enable-poppler-cairo" \ - "--disable-poppler-cairo" \ + -DENABLE_POPPLER_CAIRO={ON,OFF} \ "for rendering PDF preview" fi && - -optional_depends gnome-vfs2 \ - "--with-gnome-vfs" \ - "--without-gnome-vfs" \ - "use gnome vfs for loading files?" && - +optional_depends gettext \ + -DWITH_NLS={ON,OFF} \ + 'for Native Language Support' && +optional_depends jemalloc \ + -DWITH_JEMALLOC={ON,OFF} \ + 'for jemalloc support' && +optional_depends lib2geom \ + -DWITH_INTERNAL_2GEOM={OFF,ON} \ + 'use external lib2geom (recommended)' && optional_depends lcms \ - "--enable-lcms" \ - "--disable-lcms" \ + -DENABLE_LCMS={ON,OFF} \ "for optimized color management engine" && - -optional_depends perl \ - "--with-perl" \ - "--without-perl" \ - "use Perl for embedded scripting?" && - -optional_depends python \ - "--with-python" \ - "--without-python" \ +optional_depends python3 \ + '' '' \ "use Python for embedded scripting?" && - -if is_depends_enabled $SPELL python; then +if is_depends_enabled $SPELL python3; then + suggest_depends pyxml "" "" "to enable Export GIMP palette extension" && + suggest_depends numpy "" "" "to enable Perspective extension" && runtime_depends lxml fi diff --git a/graphics/inkscape/DETAILS b/graphics/inkscape/DETAILS index 5514880675..17f5b8d465 100755 --- a/graphics/inkscape/DETAILS +++ b/graphics/inkscape/DETAILS @@ -1,10 +1,11 @@ +. "$GRIMOIRE"/CMAKE_FUNCTIONS SPELL=inkscape - VERSION=0.92.4 - SOURCE=$SPELL-$VERSION.tar.bz2 -SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION" - SOURCE_URL[0]=https://inkscape.global.ssl.fastly.net/media/resources/file/$SOURCE -# SOURCE_URL[0]=http://downloads.sourceforge.net/sourceforge/project/${SPELL}/${SPELL}/${VERSION}/${SOURCE} - SOURCE_HASH=sha512:b9034605a79cd8aea808edf42e284819951ae1ea67778f0922f4c10224e94aca6c844acbc2294625773f0a7047d4e32ccdada876238a792a2c17db172c88e120 + VERSION=1.1 + XVERSION=2021-05-24_c4e8f9ed74 + SOURCE=$SPELL-$VERSION.tar.xz +SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-${VERSION}_$XVERSION" + SOURCE_URL[0]="https://inkscape.org/gallery/item/26932/$SOURCE" + SOURCE_HASH=sha512:54b75f8794d748ef59d5b719ea04e3debadc1a5cf3f62f14254502567973bbd634850edd0a3bc082be878dacf041e9bd10982c4846bf154f89aa5319eda4ee80 WEB_SITE=http://www.inkscape.org/ ENTERED=20031207 SECURITY_PATCH=2 diff --git a/graphics/inkscape/HISTORY b/graphics/inkscape/HISTORY index 9dc18ff1e4..9831973176 100644 --- a/graphics/inkscape/HISTORY +++ b/graphics/inkscape/HISTORY @@ -1,3 +1,12 @@ +2021-08-14 Ismael Luceno + * DETAILS: updated spell to 1.1 + * BUILD, INSTALL, patches/inkscape-0.92.4-upstream_fixes-1.patch: + removed; no longer needed + * CONFIGURE, DETAILS: switched to CMake + * DEPENDS: updated dependencies + removed ttf-bitstream-vera; underyling bug fixed + * PRE_BUILD: patched broken usage of NULL in C++ + 2019-10-01 Thomas Orgis * DETAILS: version 0.92.4 * PRE_BUILD: new patchery, poppler fix (via Linux From Scratch) diff --git a/graphics/inkscape/INSTALL b/graphics/inkscape/INSTALL deleted file mode 100755 index 9d9a4c08fc..0000000000 --- a/graphics/inkscape/INSTALL +++ /dev/null @@ -1,3 +0,0 @@ -make_single && -default_install && -make_normal diff --git a/graphics/inkscape/PRE_BUILD b/graphics/inkscape/PRE_BUILD index 9c7ea467ca..8bd3147159 100755 --- a/graphics/inkscape/PRE_BUILD +++ b/graphics/inkscape/PRE_BUILD @@ -1,9 +1,7 @@ -# Since 0.92.2, cmake build is the new default, but autotools still available. -# We need to switch the spell to cmake some time. default_pre_build && cd "$SOURCE_DIRECTORY" && -# Fix for poppler since 0.76. -sed -e 's|new Lexer(xref, obj)|obj|g' -i \ - src/extension/internal/pdfinput/pdf-parser.cpp && -apply_patch_dir patches && -./autogen.sh +# XXX Inkscape wrongly uses NULL as a sentinel, which fails with musl +# the C++ definition is generally problematic, so replace it with nullptr. +# See for more information. +echo 'Replacing NULL with nullptr in C++ code:' && +find -name '*.[ch]pp' -print -exec sed -E -i 's/\/nullptr/g' {} + diff --git a/graphics/inkscape/patches/inkscape-0.92.4-upstream_fixes-1.patch b/graphics/inkscape/patches/inkscape-0.92.4-upstream_fixes-1.patch deleted file mode 100644 index 81aaa24207..0000000000 --- a/graphics/inkscape/patches/inkscape-0.92.4-upstream_fixes-1.patch +++ /dev/null @@ -1,96 +0,0 @@ -Submitted By: Ken Moffat -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 -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 -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(_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(); - } - } - -- cgit v1.2.3