* update inkscape to 1.3.2-5

This commit is contained in:
Alexander Baldeck 2024-06-19 17:00:45 +02:00
parent 391d338215
commit a3013d32eb
2 changed files with 14 additions and 71 deletions

View File

@ -5,12 +5,12 @@
pkgname=inkscape
pkgver=1.3.2
pkgrel=4
pkgrel=5
pkgdesc='Professional vector graphics editor'
url='https://inkscape.org/'
license=('GPL' 'LGPL')
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
makedepends=('cmake' 'boost' 'git')
makedepends=('cmake' 'boost' 'git' 'glib2-devel')
depends=(
'atkmm'
@ -99,8 +99,7 @@ source=("git+https://gitlab.com/inkscape/inkscape.git#tag=INKSCAPE_${pkgver//./_
'inkscape-extras-extensions-gcodetools::git+https://gitlab.com/inkscape/extras/extensions-gcodetools.git'
'inkscape-extras-extension-manager::git+https://gitlab.com/inkscape/extras/extension-manager.git'
'inkscape-extras-inkscape-import-clipart::git+https://gitlab.com/inkscape/extras/inkscape-import-clipart.git'
'inkscape-extras-extension-xaml::git+https://gitlab.com/inkscape/extras/extension-xaml.git'
inkscape-1.3.2-poppler-24.03.patch)
'inkscape-extras-extension-xaml::git+https://gitlab.com/inkscape/extras/extension-xaml.git')
sha256sums=('31d286dff9a3e295b7f89f806300ecc91c306e08a273f29501082fe33f1ebafe'
'SKIP'
'SKIP'
@ -108,12 +107,19 @@ sha256sums=('31d286dff9a3e295b7f89f806300ecc91c306e08a273f29501082fe33f1ebafe'
'SKIP'
'SKIP'
'SKIP'
'SKIP'
'499bc0bd0d8600b597220f463034d5e132e69c7833108d6b766445e70e9c82ed')
'SKIP')
_backports=(
# include missing header file
'694d8ae43d06efff21adebf377ce614d660b24cd'
# Fix build with poppler >= 24.05.0
'96ca7a6c215aa14336b52753f56244dc8796ec43'
# Fix build with >=poppler-24.03.0
'f7e944575ea5247952d23f85dfa905cfa13f7b28'
# Up C++ version to C++20.
'1798e9c13b786f3d077ba0132592c4d5c1d1fb9b'
)
prepare() {
@ -132,11 +138,9 @@ prepare() {
local _c
for _c in "${_backports[@]}"; do
git log --oneline -1 "${_c}"
git cherry-pick -n "${_c}"
git log --oneline -1 "${_c}"
git cherry-pick -n "${_c}"
done
patch -Np1 -i ../inkscape-1.3.2-poppler-24.03.patch
}
build() {

View File

@ -1,61 +0,0 @@
From 3dd9846ab99260134e11938f0e575be822507037 Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <asturm@gentoo.org>
Date: Mon, 4 Mar 2024 22:59:40 +0100
Subject: [PATCH] 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@gentoo.org>
---
src/extension/internal/pdfinput/svg-builder.cpp | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp
index 525fbfec0..bcd7b1f61 100644
--- a/src/extension/internal/pdfinput/svg-builder.cpp
+++ b/src/extension/internal/pdfinput/svg-builder.cpp
@@ -1175,9 +1175,13 @@ 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 POPPLER_CHECK_VERSION(24, 3, 0)
+ if ( type == Function::Type::Sampled || type == Function::Type::Exponential ) { // Sampled or exponential function
+#else
if ( type == 0 || type == 2 ) { // Sampled or exponential function
+#endif
GfxColor stop1, stop2;
if (!svgGetShadingColor(shading, 0.0, &stop1) || !svgGetShadingColor(shading, 1.0, &stop2)) {
return false;
@@ -1185,7 +1189,11 @@ 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);
}
+#if POPPLER_CHECK_VERSION(24, 3, 0)
+ } else if ( type == Function::Type::Stitching ) { // Stitching
+#else
} else if ( type == 3 ) { // Stitching
+#endif
auto stitchingFunc = static_cast<_POPPLER_CONST StitchingFunction*>(func);
const double *bounds = stitchingFunc->getBounds();
const double *encode = stitchingFunc->getEncode();
@@ -1200,7 +1208,11 @@ 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 POPPLER_CHECK_VERSION(24, 3, 0)
+ if (stitchingFunc->getFunc(i)->getType() == Function::Type::Exponential) { // process exponential fxn
+#else
if (stitchingFunc->getFunc(i)->getType() == 2) { // process exponential fxn
+#endif
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
--
2.44.0