summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-09-02 05:20:17 +0100
committerSam James <sam@gentoo.org>2022-09-02 05:37:26 +0100
commit3fe3e0dc873e97eb1bb5ccb2846fffee35182caa (patch)
tree7e7334026b9259d5983d2a86c8ae5b8d63d62371 /app-office
parentmedia-sound/abcmidi: bump to 2022.09.01 (diff)
downloadgentoo-3fe3e0dc873e97eb1bb5ccb2846fffee35182caa.tar.gz
gentoo-3fe3e0dc873e97eb1bb5ccb2846fffee35182caa.tar.bz2
gentoo-3fe3e0dc873e97eb1bb5ccb2846fffee35182caa.zip
app-office/libreoffice: fix build with Poppler 22.09.0
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-office')
-rw-r--r--app-office/libreoffice/files/libreoffice-7.3.5.2-poppler-22.09.0.patch46
-rw-r--r--app-office/libreoffice/libreoffice-7.3.5.2.ebuild1
2 files changed, 47 insertions, 0 deletions
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
new file mode 100644
index 000000000000..f269d53196da
--- /dev/null
+++ b/app-office/libreoffice/files/libreoffice-7.3.5.2-poppler-22.09.0.patch
@@ -0,0 +1,46 @@
+https://gerrit.libreoffice.org/c/core/+/139249
+
+From 8bad83bf044661357b02b695e6f53e2e19dea396 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Fri, 2 Sep 2022 04:31:18 +0100
+Subject: [PATCH] Fix build with Poppler 22.09.0
+
+With Poppler 22.09.0, LO fails to build with:
+```
+/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
+ state->getLineDash(&dashArray, &arrayLen, &startOffset);
+ ~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~
+/usr/include/poppler/GfxState.h:1506:32: note: 'getLineDash' declared here
+ const std::vector<double> &getLineDash(double *start)
+ ^
+1 error generated.
+```
+
+Poppler changed the getLineDash interface:
+```
+- void getLineDash(double **dash, int *length, double *start)
++ const std::vector<double> &getLineDash(double *start)
+```
+
+Signed-off-by: Sam James <sam@gentoo.org>
+Change-Id: I29e18f20d7650a7fcac1bc8ab4aaa04aaa2ab8fb
+--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+@@ -678,8 +678,16 @@ void PDFOutDev::updateLineDash(GfxState *state)
+ return;
+ assert(state);
+
+- double* dashArray; int arrayLen; double startOffset;
++ int arrayLen; double startOffset;
++#if POPPLER_CHECK_VERSION(22, 9, 0)
++ const double* dashArray;
++ const std::vector<double> &dash = state->getLineDash(&startOffset);
++ dashArray = dash.data();
++ arrayLen = dash.size();
++#else
++ double* dashArray;
+ state->getLineDash(&dashArray, &arrayLen, &startOffset);
++#endif
+
+ printf( "updateLineDash" );
+ if( arrayLen && dashArray )
diff --git a/app-office/libreoffice/libreoffice-7.3.5.2.ebuild b/app-office/libreoffice/libreoffice-7.3.5.2.ebuild
index 07c41dd1473e..92051c1009c6 100644
--- a/app-office/libreoffice/libreoffice-7.3.5.2.ebuild
+++ b/app-office/libreoffice/libreoffice-7.3.5.2.ebuild
@@ -296,6 +296,7 @@ PATCHES=(
# Upstream
"${FILESDIR}/${PN}-7.3.5.2-gpgme-1.18.0.patch"
+ "${FILESDIR}/${PN}-7.3.5.2-poppler-22.09.0.patch"
)
S="${WORKDIR}/${PN}-${MY_PV}"