Date: Saturday, October 8, 2022 @ 08:26:48
  Author: andyrtr
Revision: 457357

archrelease: copy trunk to staging-x86_64

Added:
  inkscape/repos/staging-x86_64/
  inkscape/repos/staging-x86_64/PKGBUILD
    (from rev 457355, inkscape/trunk/PKGBUILD)
  inkscape/repos/staging-x86_64/inkscape-1.2.1-poppler-22.09.0.patch
    (from rev 457356, inkscape/trunk/inkscape-1.2.1-poppler-22.09.0.patch)

--------------------------------------+
 PKGBUILD                             |   84 +++++++++++++++++++++++++++++++++
 inkscape-1.2.1-poppler-22.09.0.patch |   83 ++++++++++++++++++++++++++++++++
 2 files changed, 167 insertions(+)

Copied: inkscape/repos/staging-x86_64/PKGBUILD (from rev 457355, 
inkscape/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD                             (rev 0)
+++ staging-x86_64/PKGBUILD     2022-10-08 08:26:48 UTC (rev 457357)
@@ -0,0 +1,84 @@
+# Maintainer: Gaetan Bisson <[email protected]>
+# Contributor: Tobias Kieslich <[email protected]>
+# Contributor: tobias <[email protected]>
+
+pkgname=inkscape
+pkgver=1.2.1
+_tag='9c6d41e4102d2e2e21a6d53ddba38ce202271001' # git rev-parse 
INKSCAPE_${pkgver/./_}
+pkgrel=8
+pkgdesc='Professional vector graphics editor'
+url='https://inkscape.org/'
+license=('GPL' 'LGPL')
+arch=('x86_64')
+options=('debug')
+makedepends=('cmake' 'boost' 'git')
+
+depends=(
+       'dbus-glib'
+       'double-conversion'
+       'gc'
+       'graphicsmagick'
+       'gsl'
+       'gspell'
+       'gtkmm3'
+       'lcms2'
+       'lib2geom'
+       'libcdr'
+       'libjpeg-turbo'
+       'libsoup'
+       'libvisio'
+       'libxslt'
+       'poppler-glib'
+       'potrace'
+       'python'
+       'python-cssselect'
+       'python-lxml'
+       'python-numpy'
+       'ttf-font'
+)
+
+optdepends=(
+       'fig2dev: xfig input'
+       'gvfs: import clip art'
+       'pstoedit: latex formulas'
+       'scour: optimized SVG output, some extensions'
+       'texlive-core: latex formulas'
+)
+
+#source=("https://media.inkscape.org/dl/resources/file/${pkgname}-${pkgver}.tar.bz2";)
+source=("git+https://gitlab.com/inkscape/inkscape.git#tag=${_tag}";
+        inkscape-1.2.1-poppler-22.09.0.patch)
+sha256sums=('SKIP'
+            '5e847d11c1c42db717ad39bc03708e3b855f0e0a99ee4ac8d97f5bfe4af8985c')
+
+_backports=(
+)
+
+prepare() {
+       cd "${pkgname}"
+       git submodule update --init --recursive 
+
+       local _c
+       for _c in "${_backports[@]}"; do
+               git log --oneline -1 "${_c}"
+               git cherry-pick -n "${_c}"
+       done
+
+       # https://gitlab.com/inkscape/inkscape/-/merge_requests/4719
+       patch -Np1 -i ../inkscape-1.2.1-poppler-22.09.0.patch
+}
+
+build() {
+       mkdir -p build
+       export PKG_CONFIG_PATH='/usr/lib/imagemagick6/pkgconfig'
+       cmake -H${pkgname} -Bbuild \
+               -DCMAKE_BUILD_TYPE=Release \
+               -DCMAKE_INSTALL_PREFIX:PATH=/usr \
+               -DWITH_DBUS=ON \
+
+       cmake --build build
+}
+
+package() {
+       DESTDIR="${pkgdir}" cmake --build build --target install
+}

Copied: inkscape/repos/staging-x86_64/inkscape-1.2.1-poppler-22.09.0.patch 
(from rev 457356, inkscape/trunk/inkscape-1.2.1-poppler-22.09.0.patch)
===================================================================
--- staging-x86_64/inkscape-1.2.1-poppler-22.09.0.patch                         
(rev 0)
+++ staging-x86_64/inkscape-1.2.1-poppler-22.09.0.patch 2022-10-08 08:26:48 UTC 
(rev 457357)
@@ -0,0 +1,83 @@
+From fb00794923d19cfbb2ca4adca3ae8971553a06be Mon Sep 17 00:00:00 2001
+From: Sam James <[email protected]>
+Date: Fri, 2 Sep 2022 06:21:28 +0100
+Subject: [PATCH] Fix build with Poppler 22.09.0
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+With Poppler 22.09.0, inkscape fails to build with:
+```
+/var/tmp/portage/media-gfx/inkscape-1.2.1/work/inkscape-1.2.1/src/extension/internal/pdfinput/svg-builder.cpp:394:23:
 error: no matching function for call to ‘GfxState::getLineDash(double**, 
int*, double*)’
+  394 |     state->getLineDash(&dash_pattern, &dash_length, &dash_start);
+      |     ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+In file included from 
/var/tmp/portage/media-gfx/inkscape-1.2.1/work/inkscape-1.2.1/src/extension/internal/pdfinput/svg-builder.cpp:44:
+/usr/include/poppler/GfxState.h:1506:32: note: candidate: ‘const 
std::vector<double>& GfxState::getLineDash(double*)’
+ 1506 |     const std::vector<double> &getLineDash(double *start)
+      |                                ^~~~~~~~~~~
+[...]
+/var/tmp/portage/media-gfx/inkscape-1.2.1/work/inkscape-1.2.1/src/extension/internal/pdfinput/pdf-parser.cpp:700:21:
 error: no matching function for call to ‘GfxState::setLineDash(double*&, 
int&, double)’
+  700 |   state->setLineDash(dash, length, args[1].getNum());
+      |   ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+```
+
+Poppler changed the getLineDash interface:
+```
+-    void getLineDash(double **dash, int *length, double *start)
++    const std::vector<double> &getLineDash(double *start)
+```
+
+... and the setLineDash interface:
+````
+-    void setLineDash(double *dash, int length, double start);
++    void setLineDash(std::vector<double> &&dash, double start);
+```
+
+Signed-off-by: Sam James <[email protected]>
+---
+ src/extension/internal/pdfinput/pdf-parser.cpp  | 4 ++++
+ src/extension/internal/pdfinput/svg-builder.cpp | 9 ++++++++-
+ 2 files changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp 
b/src/extension/internal/pdfinput/pdf-parser.cpp
+index cca1e84096..80d64c9b86 100644
+--- a/src/extension/internal/pdfinput/pdf-parser.cpp
++++ b/src/extension/internal/pdfinput/pdf-parser.cpp
+@@ -697,7 +697,11 @@ void PdfParser::opSetDash(Object args[], int /*numArgs*/)
+       _POPPLER_FREE(obj);
+     }
+   }
++#if POPPLER_CHECK_VERSION(22, 9, 0)
++  state->setLineDash(std::vector<double> (dash, dash + length), 
args[1].getNum());
++#else
+   state->setLineDash(dash, length, args[1].getNum());
++#endif
+   builder->updateStyle(state);
+ }
+ 
+diff --git a/src/extension/internal/pdfinput/svg-builder.cpp 
b/src/extension/internal/pdfinput/svg-builder.cpp
+index 12f71dd921..9fc56fe63c 100644
+--- a/src/extension/internal/pdfinput/svg-builder.cpp
++++ b/src/extension/internal/pdfinput/svg-builder.cpp
+@@ -389,10 +389,17 @@ void SvgBuilder::_setStrokeStyle(SPCSSAttr *css, 
GfxState *state) {
+     sp_repr_css_set_property(css, "stroke-miterlimit", os_ml.str().c_str());
+ 
+     // Line dash
+-    double *dash_pattern;
+     int dash_length;
+     double dash_start;
++#if POPPLER_CHECK_VERSION(22, 9, 0)
++    const double *dash_pattern;
++    const std::vector<double> &dash = state->getLineDash(&dash_start);
++    dash_pattern = dash.data();
++    dash_length = dash.size();
++#else
++    double *dash_pattern;
+     state->getLineDash(&dash_pattern, &dash_length, &dash_start);
++#endif
+     if ( dash_length > 0 ) {
+         Inkscape::CSSOStringStream os_array;
+         for ( int i = 0 ; i < dash_length ; i++ ) {
+-- 
+GitLab
+

Reply via email to