1 |
commit: 3fe3e0dc873e97eb1bb5ccb2846fffee35182caa |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 2 04:20:17 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Sep 2 04:37:26 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3fe3e0dc |
7 |
|
8 |
app-office/libreoffice: fix build with Poppler 22.09.0 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
.../libreoffice-7.3.5.2-poppler-22.09.0.patch | 46 ++++++++++++++++++++++ |
13 |
app-office/libreoffice/libreoffice-7.3.5.2.ebuild | 1 + |
14 |
2 files changed, 47 insertions(+) |
15 |
|
16 |
diff --git a/app-office/libreoffice/files/libreoffice-7.3.5.2-poppler-22.09.0.patch b/app-office/libreoffice/files/libreoffice-7.3.5.2-poppler-22.09.0.patch |
17 |
new file mode 100644 |
18 |
index 000000000000..f269d53196da |
19 |
--- /dev/null |
20 |
+++ b/app-office/libreoffice/files/libreoffice-7.3.5.2-poppler-22.09.0.patch |
21 |
@@ -0,0 +1,46 @@ |
22 |
+https://gerrit.libreoffice.org/c/core/+/139249 |
23 |
+ |
24 |
+From 8bad83bf044661357b02b695e6f53e2e19dea396 Mon Sep 17 00:00:00 2001 |
25 |
+From: Sam James <sam@g.o> |
26 |
+Date: Fri, 2 Sep 2022 04:31:18 +0100 |
27 |
+Subject: [PATCH] Fix build with Poppler 22.09.0 |
28 |
+ |
29 |
+With Poppler 22.09.0, LO fails to build with: |
30 |
+``` |
31 |
+/var/tmp/portage/app-office/libreoffice-7.3.5.2/work/libreoffice-7.3.5.2/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx:682:36: error: too many arguments to function call, expected single argument 'start', have 3 arguments |
32 |
+ state->getLineDash(&dashArray, &arrayLen, &startOffset); |
33 |
+ ~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~ |
34 |
+/usr/include/poppler/GfxState.h:1506:32: note: 'getLineDash' declared here |
35 |
+ const std::vector<double> &getLineDash(double *start) |
36 |
+ ^ |
37 |
+1 error generated. |
38 |
+``` |
39 |
+ |
40 |
+Poppler changed the getLineDash interface: |
41 |
+``` |
42 |
+- void getLineDash(double **dash, int *length, double *start) |
43 |
++ const std::vector<double> &getLineDash(double *start) |
44 |
+``` |
45 |
+ |
46 |
+Signed-off-by: Sam James <sam@g.o> |
47 |
+Change-Id: I29e18f20d7650a7fcac1bc8ab4aaa04aaa2ab8fb |
48 |
+--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |
49 |
++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |
50 |
+@@ -678,8 +678,16 @@ void PDFOutDev::updateLineDash(GfxState *state) |
51 |
+ return; |
52 |
+ assert(state); |
53 |
+ |
54 |
+- double* dashArray; int arrayLen; double startOffset; |
55 |
++ int arrayLen; double startOffset; |
56 |
++#if POPPLER_CHECK_VERSION(22, 9, 0) |
57 |
++ const double* dashArray; |
58 |
++ const std::vector<double> &dash = state->getLineDash(&startOffset); |
59 |
++ dashArray = dash.data(); |
60 |
++ arrayLen = dash.size(); |
61 |
++#else |
62 |
++ double* dashArray; |
63 |
+ state->getLineDash(&dashArray, &arrayLen, &startOffset); |
64 |
++#endif |
65 |
+ |
66 |
+ printf( "updateLineDash" ); |
67 |
+ if( arrayLen && dashArray ) |
68 |
|
69 |
diff --git a/app-office/libreoffice/libreoffice-7.3.5.2.ebuild b/app-office/libreoffice/libreoffice-7.3.5.2.ebuild |
70 |
index 07c41dd1473e..92051c1009c6 100644 |
71 |
--- a/app-office/libreoffice/libreoffice-7.3.5.2.ebuild |
72 |
+++ b/app-office/libreoffice/libreoffice-7.3.5.2.ebuild |
73 |
@@ -296,6 +296,7 @@ PATCHES=( |
74 |
|
75 |
# Upstream |
76 |
"${FILESDIR}/${PN}-7.3.5.2-gpgme-1.18.0.patch" |
77 |
+ "${FILESDIR}/${PN}-7.3.5.2-poppler-22.09.0.patch" |
78 |
) |
79 |
|
80 |
S="${WORKDIR}/${PN}-${MY_PV}" |