Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-gfx/inkscape/files/, media-gfx/inkscape/
Date: Fri, 02 Sep 2022 04:38:10
Message-Id: 1662093447.9f2169be9339bfaad54aa9bf60373ff01a79f8c3.sam@gentoo
1 commit: 9f2169be9339bfaad54aa9bf60373ff01a79f8c3
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 2 04:25:00 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 2 04:37:27 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f2169be
7
8 media-gfx/inkscape: fix build with Poppler 22.09.0
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 .../files/inkscape-1.2.1-poppler-22.09.0.patch | 35 ++++++++++++++++++++++
13 media-gfx/inkscape/inkscape-1.2.1.ebuild | 4 +++
14 2 files changed, 39 insertions(+)
15
16 diff --git a/media-gfx/inkscape/files/inkscape-1.2.1-poppler-22.09.0.patch b/media-gfx/inkscape/files/inkscape-1.2.1-poppler-22.09.0.patch
17 new file mode 100644
18 index 000000000000..2e5d3b4782f3
19 --- /dev/null
20 +++ b/media-gfx/inkscape/files/inkscape-1.2.1-poppler-22.09.0.patch
21 @@ -0,0 +1,35 @@
22 +--- a/src/extension/internal/pdfinput/pdf-parser.cpp
23 ++++ b/src/extension/internal/pdfinput/pdf-parser.cpp
24 +@@ -697,7 +697,11 @@ void PdfParser::opSetDash(Object args[], int /*numArgs*/)
25 + _POPPLER_FREE(obj);
26 + }
27 + }
28 ++#if POPPLER_CHECK_VERSION(22, 9, 0)
29 ++ state->setLineDash(std::vector<double> (*dash, length), args[1].getNum());
30 ++#else
31 + state->setLineDash(dash, length, args[1].getNum());
32 ++#endif
33 + builder->updateStyle(state);
34 + }
35 +
36 +--- a/src/extension/internal/pdfinput/svg-builder.cpp
37 ++++ b/src/extension/internal/pdfinput/svg-builder.cpp
38 +@@ -388,10 +388,17 @@ void SvgBuilder::_setStrokeStyle(SPCSSAttr *css, GfxState *state) {
39 + sp_repr_css_set_property(css, "stroke-miterlimit", os_ml.str().c_str());
40 +
41 + // Line dash
42 +- double *dash_pattern;
43 + int dash_length;
44 + double dash_start;
45 ++#if POPPLER_CHECK_VERSION(22, 9, 0)
46 ++ const double *dash_pattern;
47 ++ const std::vector<double> &dash = state->getLineDash(&dash_start);
48 ++ dash_pattern = dash.data();
49 ++ dash_length = dash.size();
50 ++#else
51 ++ double *dash_pattern;
52 + state->getLineDash(&dash_pattern, &dash_length, &dash_start);
53 ++#endif
54 + if ( dash_length > 0 ) {
55 + Inkscape::CSSOStringStream os_array;
56 + for ( int i = 0 ; i < dash_length ; i++ ) {
57
58 diff --git a/media-gfx/inkscape/inkscape-1.2.1.ebuild b/media-gfx/inkscape/inkscape-1.2.1.ebuild
59 index e2183428d93b..a0df591ee0d9 100644
60 --- a/media-gfx/inkscape/inkscape-1.2.1.ebuild
61 +++ b/media-gfx/inkscape/inkscape-1.2.1.ebuild
62 @@ -108,6 +108,10 @@ RESTRICT="!test? ( test )"
63
64 S="${WORKDIR}/${MY_P}"
65
66 +PATCHES=(
67 + "${FILESDIR}"/${PN}-1.2.1-poppler-22.09.0.patch
68 +)
69 +
70 pkg_pretend() {
71 [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
72 }