diff options
author | Sam James <sam@gentoo.org> | 2022-09-02 05:25:00 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-09-02 05:37:27 +0100 |
commit | 9f2169be9339bfaad54aa9bf60373ff01a79f8c3 (patch) | |
tree | 1bd16f33007d9b00fe47920f20d008327fda3a12 /media-gfx | |
parent | app-office/libreoffice: fix build with Poppler 22.09.0 (diff) | |
download | gentoo-9f2169be9339bfaad54aa9bf60373ff01a79f8c3.tar.gz gentoo-9f2169be9339bfaad54aa9bf60373ff01a79f8c3.tar.bz2 gentoo-9f2169be9339bfaad54aa9bf60373ff01a79f8c3.zip |
media-gfx/inkscape: fix build with Poppler 22.09.0
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-gfx')
-rw-r--r-- | media-gfx/inkscape/files/inkscape-1.2.1-poppler-22.09.0.patch | 35 | ||||
-rw-r--r-- | media-gfx/inkscape/inkscape-1.2.1.ebuild | 4 |
2 files changed, 39 insertions, 0 deletions
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 new file mode 100644 index 000000000000..2e5d3b4782f3 --- /dev/null +++ b/media-gfx/inkscape/files/inkscape-1.2.1-poppler-22.09.0.patch @@ -0,0 +1,35 @@ +--- 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, length), args[1].getNum()); ++#else + state->setLineDash(dash, length, args[1].getNum()); ++#endif + builder->updateStyle(state); + } + +--- a/src/extension/internal/pdfinput/svg-builder.cpp ++++ b/src/extension/internal/pdfinput/svg-builder.cpp +@@ -388,10 +388,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++ ) { diff --git a/media-gfx/inkscape/inkscape-1.2.1.ebuild b/media-gfx/inkscape/inkscape-1.2.1.ebuild index e2183428d93b..a0df591ee0d9 100644 --- a/media-gfx/inkscape/inkscape-1.2.1.ebuild +++ b/media-gfx/inkscape/inkscape-1.2.1.ebuild @@ -108,6 +108,10 @@ RESTRICT="!test? ( test )" S="${WORKDIR}/${MY_P}" +PATCHES=( + "${FILESDIR}"/${PN}-1.2.1-poppler-22.09.0.patch +) + pkg_pretend() { [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp } |