From 1634715986f382be5df86102ae33a182ed3f0114 Mon Sep 17 00:00:00 2001
From: David Beauchamp <david@archlinuxarm.org>
Date: Thu, 13 Oct 2022 12:23:22 -0400
Subject: [PATCH] extra/libreoffice-fresh to 7.4.2-1

---
 extra/libreoffice-fresh/PKGBUILD              | 23 +++------
 .../libreoffice-gpgme-1.18.0.patch            | 48 -------------------
 .../libreoffice-poppler-22.09.0.patch         | 46 ------------------
 3 files changed, 6 insertions(+), 111 deletions(-)
 delete mode 100644 extra/libreoffice-fresh/libreoffice-gpgme-1.18.0.patch
 delete mode 100644 extra/libreoffice-fresh/libreoffice-poppler-22.09.0.patch

diff --git a/extra/libreoffice-fresh/PKGBUILD b/extra/libreoffice-fresh/PKGBUILD
index edb9e08f7..1bde64917 100644
--- a/extra/libreoffice-fresh/PKGBUILD
+++ b/extra/libreoffice-fresh/PKGBUILD
@@ -17,9 +17,9 @@ _google_default_client_secret=0ZChLK6AxeA3Isu96MkwqDR4
 
 pkgbase=libreoffice-fresh
 pkgname=('libreoffice-fresh-sdk' 'libreoffice-fresh')
-_LOver=7.4.1.2
-pkgver=7.4.1
-pkgrel=4
+_LOver=7.4.2.3
+pkgver=7.4.2
+pkgrel=1
 arch=('x86_64')
 license=('LGPL3')
 url="https://www.libreoffice.org/"
@@ -68,8 +68,6 @@ source=(${_mirror}/libreoffice{,-help,-translations}-${_LOver}.tar.xz{,.asc}
 	${_additional_source_url2}/f543e6e2d7275557a839a164941c0a86e5f2c3f2a0042bfc434c88c6dde9e140-opens___.ttf
 	${_additional_source_url2}/185d60944ea767075d27247c3162b3bc-unowinreg.dll
 	make-pyuno-work-with-system-wide-module-install.diff
-	libreoffice-poppler-22.09.0.patch
-	libreoffice-gpgme-1.18.0.patch
 	soffice-template.desktop.in 
 	libreoffice-fresh.sh libreoffice-fresh.csh)
 noextract=(35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
@@ -94,11 +92,11 @@ noextract=(35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
            185d60944ea767075d27247c3162b3bc-unowinreg.dll
 )
 validpgpkeys=('C2839ECAD9408FBE9531C3E9F434A1EFAFEEAEA3') # LibreOffice Build Team (CODE SIGNING KEY) <build@documentfoundation.org>
-sha256sums=('92f78421bb3ffa6723f8e14c0dab5ee7bc68939fad8ff9f146ccecac02d2de84'
+sha256sums=('82c1ffe02f2ed8ee1451a9f67c35335b27a638db591f9bc539eff86ab14dd95a'
             'SKIP'
-            '842b24e72345aeed8305342003a4bbc6346173ea9457b38950b3b6ab89e2d89f'
+            '4f9ed5dd9d8b394be442ddb86f57cb78746282d886e0dc35add36e8b34170f5c'
             'SKIP'
-            'f77a382d562b6bcebaec69321de4b6ab6daec0240216d314d0c8c6fee4c32fae'
+            'c8053f863c95c31a83a079bb2eefd9b666ffd59e40c4344098c04a924a54f6e1'
             'SKIP'
             '64585ac36a81291a58269ec5347e7e3e2e8596dbacb9221015c208191333c6e1'
             '1fb458d6aab06932693cc8a9b6e4e70944ee1ff052fa63606e3131df34e21753'
@@ -121,8 +119,6 @@ sha256sums=('92f78421bb3ffa6723f8e14c0dab5ee7bc68939fad8ff9f146ccecac02d2de84'
             'f543e6e2d7275557a839a164941c0a86e5f2c3f2a0042bfc434c88c6dde9e140'
             'eafde646a7dbe46d20c291685b0beac2382174d78d66ee990e229a1bf6e6cec6'
             'c463654a73ecfbc242ff109726fb4faecdbfb3d91affafe919b24bea65afb563'
-            '95716d255aae9d8795eb76c634541f82a094b87dfeaa6ffcdbd97c0f19c14ac4'
-            'ca4eb15daeb9eb6df10c3084708e78f3302fb78541bbdbad1232c0adfc502be0'
             'd0be8099cbee3c9dfda694a828149b881c345b204ab68826f317580aafb50879'
             'b20cc7c79e8e5d2c56eb17cf0f1e3bea7a2ceb243308a1bff3af24bf54f7d1f5'
             'b679a22ecad2892ac9854d80c5c77e404467236bae9fe094637b48ccad37da9d')
@@ -131,13 +127,6 @@ prepare() {
 
 	cd libreoffice-$_LOver
 
-	# Workaround to fix build with gpgme 1.18.0
-#	export ac_cv_lib_gpgmepp_progress_callback=yes
-	patch -Np1 -i ../libreoffice-gpgme-1.18.0.patch
-
-        # poppler 22.09.0
-	patch -Np1 -i ../libreoffice-poppler-22.09.0.patch
-
 	# move external sources into place
 	mkdir "${srcdir}"/ext_sources && pushd "${srcdir}"/ext_sources
 	for source in "${noextract[@]}"; do
diff --git a/extra/libreoffice-fresh/libreoffice-gpgme-1.18.0.patch b/extra/libreoffice-fresh/libreoffice-gpgme-1.18.0.patch
deleted file mode 100644
index d8dae52d9..000000000
--- a/extra/libreoffice-fresh/libreoffice-gpgme-1.18.0.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-https://bugs.gentoo.org/865321
-https://lists.freedesktop.org/archives/libreoffice/2022-August/089261.html
-https://github.com/LibreOffice/core/commit/aa0b2b756c17d43d2e8c828a909ee2815e332377
-
-From: Rene Engelhard <rene@debian.org>
-Date: Wed, 24 Aug 2022 09:55:33 +0200
-Subject: [PATCH] Make configure work with gpgme >= 1.18
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Sam James wrote:
-> gpgme-1.18.0 dropped a bunch of internal symbols,
-> including progress_callback (see e.g. callbacks.h
-> which has a comment at the top saying it's internal).
-
-Plausibly the workaround to not link against older KDE-specific distro
-packages is not needed anymore.
-
-Check for main as a workaround as we do for other C++ libraries, too.
-
-Change-Id: I57065a5b5b23b9eadb73b01e4f3a289552c3bde4
-Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138667
-Tested-by: Jenkins
-Reviewed-by: Sam James <sam@gentoo.org>
-Reviewed-by: René Engelhard <rene@debian.org>
-(cherry picked from commit b4a94d681a99a6a3eeb6aaa4d2f4dfab8f7c000b)
-Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138553
-Tested-by: René Engelhard <rene@debian.org>
---- a/configure.ac
-+++ b/configure.ac
-@@ -12537,12 +12537,11 @@ elif test \( \( "$_os" = "Linux" -o "$_os" = "Darwin" \) -a "$ENABLE_NSS" = TRUE
-         # C++ library doesn't come with fancy gpgmepp-config, check for headers the old-fashioned way
-         AC_CHECK_HEADER(gpgme++/gpgmepp_version.h, [ GPGMEPP_CFLAGS=-I/usr/include/gpgme++ ],
-             [AC_MSG_ERROR([gpgmepp headers not found, install gpgmepp >= 1.14 development package])], [])
--        # progress_callback is the only func with plain C linkage
--        # checking for it also filters out older, KDE-dependent libgpgmepp versions
--        AC_CHECK_LIB(gpgmepp, progress_callback, [ GPGMEPP_LIBS=-lgpgmepp ],
--            [AC_MSG_ERROR(gpgmepp not found or not functional)], [])
-         AC_CHECK_HEADER(gpgme.h, [],
-             [AC_MSG_ERROR([gpgme headers not found, install gpgme development package])], [])
-+        AC_CHECK_LIB(gpgmepp, main, [],
-+            [AC_MSG_ERROR(gpgmepp not found or not functional)], [])
-+	GPGMEPP_LIBS=-lgpgmepp
-     else
-         AC_MSG_RESULT([internal])
-         BUILD_TYPE="$BUILD_TYPE LIBGPGERROR LIBASSUAN GPGMEPP"
-
diff --git a/extra/libreoffice-fresh/libreoffice-poppler-22.09.0.patch b/extra/libreoffice-fresh/libreoffice-poppler-22.09.0.patch
deleted file mode 100644
index f269d5319..000000000
--- a/extra/libreoffice-fresh/libreoffice-poppler-22.09.0.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-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 )