[packages/inkscape] - up to 1.4
mrozowik
mrozowik at pld-linux.org
Thu Feb 13 14:25:44 CET 2025
commit 231368fe3fc93ef4cade468fd4d3294a360bf37c
Author: Krzysztof Mrozowicz <mrozowik at pld-linux.org>
Date: Thu Feb 13 12:38:47 2025 +0000
- up to 1.4
inkscape-1.3.1-missing-headers.patch | 10 -----
inkscape-c++20-2.patch | 20 ----------
inkscape-c++20.patch | 73 -----------------------------------
inkscape-poppler-gettype-enum.patch | 69 ---------------------------------
inkscape-poppler-unicode-marker.patch | 57 ---------------------------
inkscape.spec | 26 ++++++-------
6 files changed, 11 insertions(+), 244 deletions(-)
---
diff --git a/inkscape.spec b/inkscape.spec
index f6802c7..b7f3978 100644
--- a/inkscape.spec
+++ b/inkscape.spec
@@ -7,18 +7,13 @@
Summary: Scalable vector graphics editor
Summary(pl.UTF-8): Edytor skalowalnej grafiki wektorowej
Name: inkscape
-Version: 1.3.2
-Release: 6
+Version: 1.4
+Release: 1
License: GPL v2+, LGPL v2.1+
Group: X11/Applications/Graphics
# download: follow https://inkscape.org/release/
Source0: https://media.inkscape.org/dl/resources/file/%{name}-%{version}.tar.xz
-# Source0-md5: 76ed1f4b13065e80de8b2d77b6427b83
-Patch0: %{name}-1.3.1-missing-headers.patch
-Patch1: %{name}-c++20.patch
-Patch2: %{name}-poppler-gettype-enum.patch
-Patch3: %{name}-poppler-unicode-marker.patch
-Patch4: %{name}-c++20-2.patch
+# Source0-md5: a93f3a8eab82ef3d610f426bfe58e3df
URL: https://inkscape.org/
%{!?with_imagick:BuildRequires: GraphicsMagick-c++-devel}
%{?with_imagick:BuildRequires: ImageMagick6-c++-devel < 7}
@@ -118,12 +113,7 @@ Bash completion for inkscape arguments.
Bashowe dopełnianie argumentów programu inkscape.
%prep
-%setup -q -n %{name}-%{version}_2023-11-25_091e20ef0f
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
+%setup -q -n %{name}-%{version}_2024-10-09_e7c3feb100
# python3-only
%{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' \
@@ -174,9 +164,15 @@ rm -rf $RPM_BUILD_ROOT
# unsupported variants
%{__rm} -r $RPM_BUILD_ROOT%{_localedir}/{kok at latin,mni at beng,sat at deva}
-%{__rm} $RPM_BUILD_ROOT%{_datadir}/inkscape/extensions/{.darglint,.pre-commit-config.yaml,.pylintrc,CONTRIBUTING.md,LICENSE.txt,MANIFEST.in,README.md,TESTING.md,doxygen-main.dox,package-readme.md,poetry.lock,pyproject.toml,tox.ini}
+%{__rm} $RPM_BUILD_ROOT%{_datadir}/inkscape/extensions/LICENSE.txt
%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/inkscape/extensions/docs
+# removing libgeom devel
+%{__rm} -r $RPM_BUILD_ROOT%{_includedir}/2geom-1.4.0
+%{__rm} -r $RPM_BUILD_ROOT%{_libdir}/cmake/2Geom
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/lib2geom.a
+%{__rm} $RPM_BUILD_ROOT%{_pkgconfigdir}/2geom.pc
+
%find_lang %{name}
%clean
diff --git a/inkscape-1.3.1-missing-headers.patch b/inkscape-1.3.1-missing-headers.patch
deleted file mode 100644
index 55248c9..0000000
--- a/inkscape-1.3.1-missing-headers.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- inkscape-1.3.1_2023-11-16_91b66b0783/src/object/uri.h~ 2022-01-07 10:17:06.000000000 +0000
-+++ inkscape-1.3.1_2023-11-16_91b66b0783/src/object/uri.h 2023-11-20 16:01:18.819049512 +0000
-@@ -13,6 +13,7 @@
- #define INKSCAPE_URI_H
-
- #include <libxml/uri.h>
-+#include <libxml/xmlmemory.h>
- #include <memory>
- #include <string>
-
diff --git a/inkscape-c++20-2.patch b/inkscape-c++20-2.patch
deleted file mode 100644
index b64ccd7..0000000
--- a/inkscape-c++20-2.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-From 5aa7b6faf4fa13a1b77b18198ffa62f3fbd8a51f Mon Sep 17 00:00:00 2001
-From: Sven Hesse <drmccoy at drmccoy.de>
-Date: Fri, 31 May 2024 18:07:59 +0200
-Subject: media-gfx/inkscape: add patch for C++20 syntax break
-
-Closes: https://bugs.gentoo.org/933216
-Signed-off-by: David Seifert <soap at gentoo.org>
-
-
---- a/src/ui/dialog/filter-effects-dialog.cpp
-+++ b/src/ui/dialog/filter-effects-dialog.cpp
-@@ -202,7 +202,7 @@
- template< typename T> class ComboWithTooltip : public Gtk::EventBox
- {
- public:
-- ComboWithTooltip<T>(T default_value, const Util::EnumDataConverter<T>& c, const SPAttr a = SPAttr::INVALID, char* tip_text = nullptr)
-+ ComboWithTooltip(T default_value, const Util::EnumDataConverter<T>& c, const SPAttr a = SPAttr::INVALID, char* tip_text = nullptr)
- {
- if (tip_text) {
- set_tooltip_text(tip_text);
diff --git a/inkscape-c++20.patch b/inkscape-c++20.patch
deleted file mode 100644
index cf4d013..0000000
--- a/inkscape-c++20.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 1798e9c13b786f3d077ba0132592c4d5c1d1fb9b Mon Sep 17 00:00:00 2001
-From: Tavmjong Bah <tavmjong at free.fr>
-Date: Tue, 26 Sep 2023 19:23:27 +0000
-Subject: Up C++ version to C++20.
-
-
---- inkscape-1.3.2_2023-11-25_091e20ef0f/CMakeLists.txt
-+++ inkscape-1.3.2_2023-11-25_091e20ef0f/CMakeLists.txt
-@@ -18,9 +18,9 @@ message("Binary Dir: ${CMAKE_CURRENT_BIN
- # -----------------------------------------------------------------------------
- # CMake Configuration
- # -----------------------------------------------------------------------------
--set(CMAKE_CXX_STANDARD 17)
-+set(CMAKE_CXX_STANDARD 20)
- set(CMAKE_CXX_STANDARD_REQUIRED ON)
--# set(CMAKE_CXX_EXTENSIONS OFF) # enforces -std=c++17 instead of -std=gnu++17
-+# set(CMAKE_CXX_EXTENSIONS OFF) # enforces -std=c++20 instead of -std=gnu++20
- # TODO: build currently fails with it as we actually depend on GNU compiler extensions...
-
- list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeScripts/Modules")
---- inkscape-1.3.2_2023-11-25_091e20ef0f/_clang-format
-+++ inkscape-1.3.2_2023-11-25_091e20ef0f/_clang-format
-@@ -103,7 +103,7 @@ SpacesInContainerLiterals: false
- SpacesInCStyleCastParentheses: false
- SpacesInParentheses: false
- SpacesInSquareBrackets: false
--Standard: c++17
-+Standard: c++20
- StatementMacros: []
- TypenameMacros: []
- TabWidth: 4
---- inkscape-1.3.2_2023-11-25_091e20ef0f/src/ui/knot/knot-holder-entity.cpp
-+++ inkscape-1.3.2_2023-11-25_091e20ef0f/src/ui/knot/knot-holder-entity.cpp
-@@ -329,7 +329,7 @@ PatternKnotHolderEntityScale::knot_set(G
- double scale_x = std::clamp(new_extent[X] / _cached_diagonal[X], _cached_min_scale, 1e9);
- double scale_y = std::clamp(new_extent[Y] / _cached_diagonal[Y], _cached_min_scale, 1e9);
-
-- Affine new_transform = (state & GDK_CONTROL_MASK) ? Scale(lerp(0.5, scale_x, scale_y))
-+ Affine new_transform = (state & GDK_CONTROL_MASK) ? Scale((scale_x + scale_y) * 0.5)
- : Scale(scale_x, scale_y);
-
- // 2. Calculate offset to keep pattern origin aligned
---- inkscape-1.3.2_2023-11-25_091e20ef0f/src/ui/tools/pencil-tool.cpp
-+++ inkscape-1.3.2_2023-11-25_091e20ef0f/src/ui/tools/pencil-tool.cpp
-@@ -17,7 +17,10 @@
- * Released under GNU GPL v2+, read the file 'COPYING' for more information.
- */
-
--#include <numeric> // For std::accumulate
-+#include "pencil-tool.h"
-+
-+#include <cmath> // std::lerp
-+#include <numeric> // std::accumulate
- #include <gdk/gdkkeysyms.h>
- #include <glibmm/i18n.h>
-
-@@ -26,7 +29,6 @@
- #include <2geom/sbasis-to-bezier.h>
- #include <2geom/svg-path-parser.h>
-
--#include "pencil-tool.h"
-
- #include "context-fns.h"
- #include "desktop.h"
-@@ -814,7 +816,7 @@ void PencilTool::_addFreehandPoint(Geom:
- min = max;
- }
- double dezoomify_factor = 0.05 * 1000 / _desktop->current_zoom();
-- double const pressure_shrunk = pressure * (max - min) + min; // C++20 -> use std::lerp()
-+ double const pressure_shrunk = std::lerp(min, max, pressure);
- double pressure_computed = std::abs(pressure_shrunk * dezoomify_factor);
- double pressure_computed_scaled = std::abs(pressure_computed * _desktop->getDocument()->getDocumentScale().inverse()[Geom::X]);
- if (p != this->p[this->_npoints - 1]) {
diff --git a/inkscape-poppler-gettype-enum.patch b/inkscape-poppler-gettype-enum.patch
deleted file mode 100644
index f72fd74..0000000
--- a/inkscape-poppler-gettype-enum.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From f7e944575ea5247952d23f85dfa905cfa13f7b28 Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner <asturm at gentoo.org>
-Date: Mon, 4 Mar 2024 22:59:40 +0100
-Subject: Fix build with >=poppler-24.03.0
-
-Fixes build errors caused by:
-
-"Use an enum for Function getType"
-Upstream commit 6e3824d45d42cb806a28a2df84e4ab6bb3587083
-
-Signed-off-by: Andreas Sturmlechner <asturm at gentoo.org>
-
-Fixes https://gitlab.com/inkscape/inkscape/-/issues/4787
-
-diff --git a/src/extension/internal/pdfinput/poppler-transition-api.h b/src/extension/internal/pdfinput/poppler-transition-api.h
-index 66b15d705a..58aa1ec921 100644
---- a/src/extension/internal/pdfinput/poppler-transition-api.h
-+++ b/src/extension/internal/pdfinput/poppler-transition-api.h
-@@ -14,6 +14,16 @@
-
- #include <glib/poppler-features.h>
-
-+#if POPPLER_CHECK_VERSION(24, 3, 0)
-+#define _POPPLER_FUNCTION_TYPE_SAMPLED Function::Type::Sampled
-+#define _POPPLER_FUNCTION_TYPE_EXPONENTIAL Function::Type::Exponential
-+#define _POPPLER_FUNCTION_TYPE_STITCHING Function::Type::Stitching
-+#else
-+#define _POPPLER_FUNCTION_TYPE_SAMPLED 0
-+#define _POPPLER_FUNCTION_TYPE_EXPONENTIAL 2
-+#define _POPPLER_FUNCTION_TYPE_STITCHING 3
-+#endif
-+
- #if POPPLER_CHECK_VERSION(22, 4, 0)
- #define _POPPLER_FONTPTR_TO_GFX8(font_ptr) ((Gfx8BitFont *)font_ptr.get())
- #else
-diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp
-index 525fbfec0a..f0a9c1ac69 100644
---- a/src/extension/internal/pdfinput/svg-builder.cpp
-+++ b/src/extension/internal/pdfinput/svg-builder.cpp
-@@ -1175,9 +1175,9 @@ static bool svgGetShadingColor(GfxShading *shading, double offset, GfxColor *res
- #define INT_EPSILON 8
- bool SvgBuilder::_addGradientStops(Inkscape::XML::Node *gradient, GfxShading *shading,
- _POPPLER_CONST Function *func) {
-- int type = func->getType();
-+ auto type = func->getType();
- auto space = shading->getColorSpace();
-- if ( type == 0 || type == 2 ) { // Sampled or exponential function
-+ if (type == _POPPLER_FUNCTION_TYPE_SAMPLED || type == _POPPLER_FUNCTION_TYPE_EXPONENTIAL) {
- GfxColor stop1, stop2;
- if (!svgGetShadingColor(shading, 0.0, &stop1) || !svgGetShadingColor(shading, 1.0, &stop2)) {
- return false;
-@@ -1185,7 +1185,7 @@ bool SvgBuilder::_addGradientStops(Inkscape::XML::Node *gradient, GfxShading *sh
- _addStopToGradient(gradient, 0.0, &stop1, space, 1.0);
- _addStopToGradient(gradient, 1.0, &stop2, space, 1.0);
- }
-- } else if ( type == 3 ) { // Stitching
-+ } else if (type == _POPPLER_FUNCTION_TYPE_STITCHING) {
- auto stitchingFunc = static_cast<_POPPLER_CONST StitchingFunction*>(func);
- const double *bounds = stitchingFunc->getBounds();
- const double *encode = stitchingFunc->getEncode();
-@@ -1200,7 +1200,7 @@ bool SvgBuilder::_addGradientStops(Inkscape::XML::Node *gradient, GfxShading *sh
- for ( int i = 0 ; i < num_funcs ; i++ ) {
- svgGetShadingColor(shading, bounds[i + 1], &color);
- // Add stops
-- if (stitchingFunc->getFunc(i)->getType() == 2) { // process exponential fxn
-+ if (stitchingFunc->getFunc(i)->getType() == _POPPLER_FUNCTION_TYPE_EXPONENTIAL) {
- double expE = (static_cast<_POPPLER_CONST ExponentialFunction*>(stitchingFunc->getFunc(i)))->getE();
- if (expE > 1.0) {
- expE = (bounds[i + 1] - bounds[i])/expE; // approximate exponential as a single straight line at x=1
diff --git a/inkscape-poppler-unicode-marker.patch b/inkscape-poppler-unicode-marker.patch
deleted file mode 100644
index 721fade..0000000
--- a/inkscape-poppler-unicode-marker.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 96ca7a6c215aa14336b52753f56244dc8796ec43 Mon Sep 17 00:00:00 2001
-From: Heiko Becker <mail at heiko-becker.de>
-Date: Fri, 3 May 2024 14:52:00 +0200
-Subject: Fix build with poppler >= 24.05.0
-
-GooString::hasUnicodeMarkerLE and GooString::hasUnicodeMarker were
-rename and moved to UTF.h [1][2]
-
-[1] https://gitlab.freedesktop.org/poppler/poppler/-/commit/98fabb298b0e8eaef9193bbce68c99c85473a314
-[2] https://gitlab.freedesktop.org/poppler/poppler/-/commit/1f06dca08c32ed18c3030530d98a0e30d41dd7a2
-
-diff --git a/src/extension/internal/pdfinput/poppler-transition-api.h b/src/extension/internal/pdfinput/poppler-transition-api.h
-index 58aa1ec921..481aefadf4 100644
---- a/src/extension/internal/pdfinput/poppler-transition-api.h
-+++ b/src/extension/internal/pdfinput/poppler-transition-api.h
-@@ -13,6 +13,15 @@
- #define SEEN_POPPLER_TRANSITION_API_H
-
- #include <glib/poppler-features.h>
-+#include <poppler/UTF.h>
-+
-+#if POPPLER_CHECK_VERSION(24, 5, 0)
-+#define _POPPLER_HAS_UNICODE_BOM(value) (hasUnicodeByteOrderMark(value->toStr()))
-+#define _POPPLER_HAS_UNICODE_BOMLE(value) (hasUnicodeByteOrderMarkLE(value->toStr()))
-+#else
-+#define _POPPLER_HAS_UNICODE_BOM(value) (value->hasUnicodeMarker())
-+#define _POPPLER_HAS_UNICODE_BOMLE(value) (value->hasUnicodeMarkerLE())
-+#endif
-
- #if POPPLER_CHECK_VERSION(24, 3, 0)
- #define _POPPLER_FUNCTION_TYPE_SAMPLED Function::Type::Sampled
-diff --git a/src/extension/internal/pdfinput/poppler-utils.cpp b/src/extension/internal/pdfinput/poppler-utils.cpp
-index 78d90c66c9..c02815f64b 100644
---- a/src/extension/internal/pdfinput/poppler-utils.cpp
-+++ b/src/extension/internal/pdfinput/poppler-utils.cpp
-@@ -12,6 +12,8 @@
-
- #include "poppler-utils.h"
-
-+#include <poppler/UTF.h>
-+
- #include "2geom/affine.h"
- #include "GfxFont.h"
- #include "GfxState.h"
-@@ -563,10 +565,10 @@ std::string getDictString(Dict *dict, const char *key)
- */
- std::string getString(const GooString *value)
- {
-- if (value->hasUnicodeMarker()) {
-+ if (_POPPLER_HAS_UNICODE_BOM(value)) {
- return g_convert(value->getCString () + 2, value->getLength () - 2,
- "UTF-8", "UTF-16BE", NULL, NULL, NULL);
-- } else if (value->hasUnicodeMarkerLE()) {
-+ } else if (_POPPLER_HAS_UNICODE_BOMLE(value)) {
- return g_convert(value->getCString () + 2, value->getLength () - 2,
- "UTF-8", "UTF-16LE", NULL, NULL, NULL);
- }
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/inkscape.git/commitdiff/231368fe3fc93ef4cade468fd4d3294a360bf37c
More information about the pld-cvs-commit
mailing list