From 0218b2262ea30d35922cd881dcfc58ff88edd158 Mon Sep 17 00:00:00 2001 From: 4fury-c3440d8 Date: Sun, 1 May 2022 20:55:46 +0300 Subject: [PATCH] inkscape. --- multimedia/graphics/inkscape/actions.py | 34 +++--- multimedia/graphics/inkscape/files/im7.patch | 106 ------------------ .../inkscape/files/ime-placement.patch | 62 ---------- .../files/inkscape-poppler-0.72.patch | 65 ----------- multimedia/graphics/inkscape/pspec.xml | 15 ++- multimedia/graphics/inkscape/translations.xml | 9 +- 6 files changed, 28 insertions(+), 263 deletions(-) delete mode 100644 multimedia/graphics/inkscape/files/im7.patch delete mode 100644 multimedia/graphics/inkscape/files/ime-placement.patch delete mode 100644 multimedia/graphics/inkscape/files/inkscape-poppler-0.72.patch diff --git a/multimedia/graphics/inkscape/actions.py b/multimedia/graphics/inkscape/actions.py index 0a008373ef..046af57479 100644 --- a/multimedia/graphics/inkscape/actions.py +++ b/multimedia/graphics/inkscape/actions.py @@ -4,24 +4,23 @@ # Licensed under the GNU General Public License, version 3. # See the file https://www.gnu.org/licenses/gpl-3.0.txt -from pisi.actionsapi import get -from pisi.actionsapi import pisitools -from pisi.actionsapi import cmaketools -from pisi.actionsapi import shelltools +from pisi.actionsapi import shelltools, cmaketools, pisitools, get j = ''.join([ - ' -DWITH_DBUS=ON', - ' -DBUILD_TESTING=OFF', - ' -DWITH_GSPELL=OFF', + ' -DCMAKE_INSTALL_PREFIX=/usr' + ' -DCMAKE_BUILD_TYPE=None', ' -DBUILD_SHARED_LIBS=ON', - ' -DWITH_IMAGE_MAGICK=OFF', - ' -DBUILD_STATIC_LIBS=OFF', ' -DCMAKE_INSTALL_LIBDIR=lib', ' -DCYTHON_EXECUTABLE=/usr/bin/cython3', - ' -D2GEOM_BOOST_PYTHON=ON', - ' -D2GEOM_CYTHON_BINDINGS=ON', - ' -DCMAKE_BUILD_TYPE=Release', - ' -DCMAKE_INSTALL_PREFIX=/usr -L ' + ' -DWITH_DBUS=OFF', + ' -DWITH_GSPELL=OFF', + ' -DWITH_IMAGE_MAGICK=OFF', + ' -DBUILD_STATIC_LIBS=OFF', + ' -D2GEOM_BOOST_PYTHON=OFF', + ' -D2GEOM_CYTHON_BUILD_SHARED=OFF', + ' -D2GEOM_CYTHON_BINDINGS=OFF', + ' -DBUILD_TESTING=OFF', + ' -D2GEOM_PERFOMANCE_TESTS=OFF -L ', ]) def setup(): @@ -29,16 +28,15 @@ def setup(): # shelltools.system("find share/extensions -iname '*.py' -exec sed -i 's|env\ python$|env python3|g' {} \;") #if with imagemagick build. # shelltools.export("PKG_CONFIG_PATH", "${PKG_CONFIG_PATH}:/usr/lib/imagemagick6/pkgconfig") - shelltools.makedirs("build") - shelltools.cd("build") - cmaketools.configure(j, sourceDir = '..') +# shelltools.export("JOBS", "-j5") + cmaketools.configure("-B_build %s" % j) def build(): - shelltools.cd("build") + shelltools.cd("_build") cmaketools.make() def install(): - shelltools.cd("build") + shelltools.cd("_build") cmaketools.rawInstall("DESTDIR=%s" % get.installDIR()) pisitools.dodoc("../AUTHORS", "../NEWS.md", "../README.md") diff --git a/multimedia/graphics/inkscape/files/im7.patch b/multimedia/graphics/inkscape/files/im7.patch deleted file mode 100644 index 0572cd5f59..0000000000 --- a/multimedia/graphics/inkscape/files/im7.patch +++ /dev/null @@ -1,106 +0,0 @@ -diff -Naur orig/src/extension/CMakeLists.txt patched/src/extension/CMakeLists.txt ---- orig/src/extension/CMakeLists.txt 2017-03-24 00:51:36.134741323 +0100 -+++ patched/src/extension/CMakeLists.txt 2017-03-24 04:14:34.510756391 +0100 -@@ -218,8 +218,8 @@ - internal/bitmap/normalize.h - internal/bitmap/oilPaint.cpp - internal/bitmap/oilPaint.h -- internal/bitmap/opacity.cpp -- internal/bitmap/opacity.h -+# internal/bitmap/opacity.cpp -+# internal/bitmap/opacity.h - internal/bitmap/raise.cpp - internal/bitmap/raise.h - internal/bitmap/reduceNoise.cpp -diff -Naur orig/src/extension/init.cpp patched/src/extension/init.cpp ---- orig/src/extension/init.cpp 2017-03-24 00:51:36.134741323 +0100 -+++ patched/src/extension/init.cpp 2017-03-24 13:12:39.709882011 +0100 -@@ -88,7 +88,7 @@ - #include "internal/bitmap/negate.h" - #include "internal/bitmap/normalize.h" - #include "internal/bitmap/oilPaint.h" --#include "internal/bitmap/opacity.h" -+//#include "internal/bitmap/opacity.h" - #include "internal/bitmap/raise.h" - #include "internal/bitmap/reduceNoise.h" - #include "internal/bitmap/sample.h" -@@ -224,7 +224,7 @@ - Internal::Bitmap::Negate::init(); - Internal::Bitmap::Normalize::init(); - Internal::Bitmap::OilPaint::init(); -- Internal::Bitmap::Opacity::init(); -+// Internal::Bitmap::Opacity::init(); - Internal::Bitmap::Raise::init(); - Internal::Bitmap::ReduceNoise::init(); - Internal::Bitmap::Sample::init(); -diff -Naur orig/src/extension/internal/bitmap/channel.cpp patched/src/extension/internal/bitmap/channel.cpp ---- orig/src/extension/internal/bitmap/channel.cpp 2017-03-24 00:51:36.134741323 +0100 -+++ patched/src/extension/internal/bitmap/channel.cpp 2017-03-24 03:06:36.164250664 +0100 -@@ -28,7 +28,7 @@ - else if (!strcmp(_layerName, "Yellow Channel")) layer = Magick::YellowChannel; - else if (!strcmp(_layerName, "Black Channel")) layer = Magick::BlackChannel; - else if (!strcmp(_layerName, "Opacity Channel")) layer = Magick::OpacityChannel; -- else if (!strcmp(_layerName, "Matte Channel")) layer = Magick::MatteChannel; -+ else if (!strcmp(_layerName, "Alpha Channel")) layer = Magick::AlphaChannel; - - image->channel(layer); - } -@@ -56,7 +56,7 @@ - "<_item value='Yellow Channel'>" N_("Yellow Channel") "\n" - "<_item value='Black Channel'>" N_("Black Channel") "\n" - "<_item value='Opacity Channel'>" N_("Opacity Channel") "\n" -- "<_item value='Matte Channel'>" N_("Matte Channel") "\n" -+ "<_item value='Alpha Channel'>" N_("Alpha Channel") "\n" - "\n" - "\n" - "all\n" -diff -Naur orig/src/extension/internal/bitmap/crop.cpp patched/src/extension/internal/bitmap/crop.cpp ---- orig/src/extension/internal/bitmap/crop.cpp 2017-03-24 00:51:36.134741323 +0100 -+++ patched/src/extension/internal/bitmap/crop.cpp 2017-03-24 02:31:09.915343848 +0100 -@@ -24,7 +24,7 @@ - int width = image->baseColumns() - (_left + _right); - int height = image->baseRows() - (_top + _bottom); - if (width > 0 and height > 0) { -- image->crop(Magick::Geometry(width, height, _left, _top, false, false)); -+ image->crop(Magick::Geometry(width, height, _left, _top)); - image->page("+0+0"); - } - } -diff -Naur orig/src/extension/internal/bitmap/levelChannel.cpp patched/src/extension/internal/bitmap/levelChannel.cpp ---- orig/src/extension/internal/bitmap/levelChannel.cpp 2017-03-24 00:51:36.134741323 +0100 -+++ patched/src/extension/internal/bitmap/levelChannel.cpp 2017-03-24 03:45:35.902823802 +0100 -@@ -28,9 +28,9 @@ - else if (!strcmp(_channelName, "Yellow Channel")) channel = Magick::YellowChannel; - else if (!strcmp(_channelName, "Black Channel")) channel = Magick::BlackChannel; - else if (!strcmp(_channelName, "Opacity Channel")) channel = Magick::OpacityChannel; -- else if (!strcmp(_channelName, "Matte Channel")) channel = Magick::MatteChannel; -- Magick::Quantum black_point = Magick::Color::scaleDoubleToQuantum(_black_point / 100.0); -- Magick::Quantum white_point = Magick::Color::scaleDoubleToQuantum(_white_point / 100.0); -+ else if (!strcmp(_channelName, "Alpha Channel")) channel = Magick::AlphaChannel; -+ Magick::Quantum black_point = static_cast(_black_point / 100.0); -+ Magick::Quantum white_point = static_cast(_white_point / 100.0); - image->levelChannel(channel, black_point, white_point, _mid_point); - } - -@@ -60,7 +60,7 @@ - "<_item value='Yellow Channel'>" N_("Yellow Channel") "\n" - "<_item value='Black Channel'>" N_("Black Channel") "\n" - "<_item value='Opacity Channel'>" N_("Opacity Channel") "\n" -- "<_item value='Matte Channel'>" N_("Matte Channel") "\n" -+ "<_item value='Alpha Channel'>" N_("Alpha Channel") "\n" - "\n" - "0.0\n" - "100.0\n" -diff -Naur orig/src/extension/internal/bitmap/level.cpp patched/src/extension/internal/bitmap/level.cpp ---- orig/src/extension/internal/bitmap/level.cpp 2017-03-24 00:51:36.134741323 +0100 -+++ patched/src/extension/internal/bitmap/level.cpp 2017-03-24 03:45:33.306793000 +0100 -@@ -19,8 +19,8 @@ - - void - Level::applyEffect(Magick::Image* image) { -- Magick::Quantum black_point = Magick::Color::scaleDoubleToQuantum(_black_point / 100.0); -- Magick::Quantum white_point = Magick::Color::scaleDoubleToQuantum(_white_point / 100.0); -+ Magick::Quantum black_point = static_cast(_black_point / 100.0); -+ Magick::Quantum white_point = static_cast(_white_point / 100.0); - image->level(black_point, white_point, _mid_point); - } diff --git a/multimedia/graphics/inkscape/files/ime-placement.patch b/multimedia/graphics/inkscape/files/ime-placement.patch deleted file mode 100644 index 7f2e13a5ef..0000000000 --- a/multimedia/graphics/inkscape/files/ime-placement.patch +++ /dev/null @@ -1,62 +0,0 @@ -diff -aur old/src/text-context.cpp new/src/text-context.cpp ---- old/src/text-context.cpp 2011-07-08 08:25:09.468790000 -1000 -+++ new/src/text-context.cpp 2014-04-21 14:48:22.668759004 -1000 -@@ -684,6 +684,17 @@ - // articifically here, for the text object does not exist yet: - double cursor_height = sp_desktop_get_font_size_tool(desktop); - sp_ctrlline_set_coords(SP_CTRLLINE(tc->cursor), dtp, dtp + Geom::Point(0, cursor_height)); -+ if (tc->imc) { -+ GdkRectangle im_cursor; -+ Geom::Point const top_left = SP_EVENT_CONTEXT(tc)->desktop->get_display_area().corner(3); -+ Geom::Point const cursor_size(0, cursor_height); -+ Geom::Point const im_position = SP_EVENT_CONTEXT(tc)->desktop->d2w(dtp + cursor_size - top_left); -+ im_cursor.x = (int) floor(im_position[Geom::X]); -+ im_cursor.y = (int) floor(im_position[Geom::Y]); -+ im_cursor.width = 0; -+ im_cursor.height = (int) -floor(SP_EVENT_CONTEXT(tc)->desktop->d2w(cursor_size)[Geom::Y]); -+ gtk_im_context_set_cursor_location(tc->imc, &im_cursor); -+ } - event_context->_message_context->set(Inkscape::NORMAL_MESSAGE, _("Type text; Enter to start new line.")); // FIXME:: this is a copy of a string from _update_cursor below, do not desync - - event_context->within_tolerance = false; -@@ -1560,8 +1571,6 @@ - static void - sp_text_context_update_cursor(SPTextContext *tc, bool scroll_to_see) - { -- GdkRectangle im_cursor = { 0, 0, 1, 1 }; -- - // due to interruptible display, tc may already be destroyed during a display update before - // the cursor update (can't do both atomically, alas) - if (!tc->desktop) return; -@@ -1586,10 +1595,17 @@ - sp_ctrlline_set_coords(SP_CTRLLINE(tc->cursor), d0, d1); - - /* fixme: ... need another transformation to get canvas widget coordinate space? */ -- im_cursor.x = (int) floor(d0[Geom::X]); -- im_cursor.y = (int) floor(d0[Geom::Y]); -- im_cursor.width = (int) floor(d1[Geom::X]) - im_cursor.x; -- im_cursor.height = (int) floor(d1[Geom::Y]) - im_cursor.y; -+ if (tc->imc) { -+ GdkRectangle im_cursor = { 0, 0, 1, 1 }; -+ Geom::Point const top_left = SP_EVENT_CONTEXT(tc)->desktop->get_display_area().corner(3); -+ Geom::Point const im_d0 = SP_EVENT_CONTEXT(tc)->desktop->d2w(d0 - top_left); -+ Geom::Point const im_d1 = SP_EVENT_CONTEXT(tc)->desktop->d2w(d1 - top_left); -+ im_cursor.x = (int) floor(im_d0[Geom::X]); -+ im_cursor.y = (int) floor(im_d1[Geom::Y]); -+ im_cursor.width = (int) floor(im_d1[Geom::X]) - im_cursor.x; -+ im_cursor.height = (int) floor(im_d0[Geom::Y]) - im_cursor.y; -+ gtk_im_context_set_cursor_location(tc->imc, &im_cursor); -+ } - - tc->show = TRUE; - tc->phase = 1; -@@ -1631,9 +1647,6 @@ - } - } - -- if (tc->imc) { -- gtk_im_context_set_cursor_location(tc->imc, &im_cursor); -- } - SP_EVENT_CONTEXT(tc)->desktop->emitToolSubselectionChanged((gpointer)tc); - } - diff --git a/multimedia/graphics/inkscape/files/inkscape-poppler-0.72.patch b/multimedia/graphics/inkscape/files/inkscape-poppler-0.72.patch deleted file mode 100644 index 8cdedbbfdc..0000000000 --- a/multimedia/graphics/inkscape/files/inkscape-poppler-0.72.patch +++ /dev/null @@ -1,65 +0,0 @@ -diff -up ./src/extension/internal/pdfinput/pdf-input.cpp.orig ./src/extension/internal/pdfinput/pdf-input.cpp ---- ./src/extension/internal/pdfinput/pdf-input.cpp.orig 2018-12-08 20:29:53.411394981 +0200 -+++ ./src/extension/internal/pdfinput/pdf-input.cpp 2018-12-08 20:32:35.675968747 +0200 -@@ -319,7 +319,7 @@ PdfImportDialog::PdfImportDialog(PDFDoc - _render_thumb = true; - - // Create PopplerDocument -- Glib::ustring filename = _pdf_doc->getFileName()->getCString(); -+ Glib::ustring filename = _pdf_doc->getFileName()->c_str(); - if (!Glib::path_is_absolute(filename)) { - filename = Glib::build_filename(Glib::get_current_dir(),filename); - } -diff -up ./src/extension/internal/pdfinput/pdf-parser.cpp.orig ./src/extension/internal/pdfinput/pdf-parser.cpp ---- ./src/extension/internal/pdfinput/pdf-parser.cpp.orig 2018-12-08 20:29:53.414394969 +0200 -+++ ./src/extension/internal/pdfinput/pdf-parser.cpp 2018-12-08 20:32:35.683968735 +0200 -@@ -2381,8 +2381,8 @@ void PdfParser::opSetFont(Object args[], - } - if (printCommands) { - printf(" font: tag=%s name='%s' %g\n", -- font->getTag()->getCString(), -- font->getName() ? font->getName()->getCString() : "???", -+ font->getTag()->c_str(), -+ font->getName() ? font->getName()->c_str() : "???", - args[1].getNum()); - fflush(stdout); - } -@@ -2639,7 +2639,7 @@ void PdfParser::doShowText(GooString *s) - double lineX = state->getLineX(); - double lineY = state->getLineY(); - oldParser = parser; -- p = s->getCString(); -+ p = s->c_str(); - len = s->getLength(); - while (len > 0) { - n = font->getNextChar(p, len, &code, -@@ -2694,7 +2694,7 @@ void PdfParser::doShowText(GooString *s) - - } else { - state->textTransformDelta(0, state->getRise(), &riseX, &riseY); -- p = s->getCString(); -+ p = s->c_str(); - len = s->getLength(); - while (len > 0) { - n = font->getNextChar(p, len, &code, -diff -up ./src/extension/internal/pdfinput/svg-builder.cpp.orig ./src/extension/internal/pdfinput/svg-builder.cpp ---- ./src/extension/internal/pdfinput/svg-builder.cpp.orig 2018-12-08 20:29:53.412394977 +0200 -+++ ./src/extension/internal/pdfinput/svg-builder.cpp 2018-12-08 20:32:35.678968742 +0200 -@@ -1020,7 +1020,7 @@ void SvgBuilder::updateFont(GfxState *st - GfxFont *font = state->getFont(); - // Store original name - if (font->getName()) { -- _font_specification = font->getName()->getCString(); -+ _font_specification = font->getName()->c_str(); - } else { - _font_specification = "Arial"; - } -@@ -1047,7 +1047,7 @@ void SvgBuilder::updateFont(GfxState *st - - // Font family - if (font->getFamily()) { // if font family is explicitly given use it. -- sp_repr_css_set_property(_font_style, "font-family", font->getFamily()->getCString()); -+ sp_repr_css_set_property(_font_style, "font-family", font->getFamily()->c_str()); - } else { - int attr_value = 1; - sp_repr_get_int(_preferences, "localFonts", &attr_value); diff --git a/multimedia/graphics/inkscape/pspec.xml b/multimedia/graphics/inkscape/pspec.xml index b9cdc58a72..09f5306045 100644 --- a/multimedia/graphics/inkscape/pspec.xml +++ b/multimedia/graphics/inkscape/pspec.xml @@ -9,13 +9,13 @@ admins@pisilinux.org multimedia.graphics - GPLv2 - LGPLv2.1 + GPL-2 + LGPL-2.1 app:gui SVG vector graphics application. Inkscape is an application to create, edit, and convert SVG vector graphics images that can also import from and export to bitmap image files. - - https://inkscape.org/gallery/item/29255/inkscape-1.1.1.tar.xz + + https://media.inkscape.org/dl/resources/file/inkscape-1.1.2.tar.xz cmake @@ -173,6 +173,13 @@ + + 2022-05-01 + 1.1.2 + Version bump. + fury + uglyside@yandex.ru + 2021-12-20 1.1.1 diff --git a/multimedia/graphics/inkscape/translations.xml b/multimedia/graphics/inkscape/translations.xml index c529b3d72b..09388007c2 100644 --- a/multimedia/graphics/inkscape/translations.xml +++ b/multimedia/graphics/inkscape/translations.xml @@ -5,11 +5,4 @@ Vektörel çizim programı SVG tabanlı, çok kapsamlı ve gelişmiş bir vektörel çizim programıdır. - - \ No newline at end of file +