From 752d6256e5204b958b0ef7905675a940b5e9172f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 12 May 2022 16:42:50 +0300 Subject: gentoo resync : 12.05.2022 --- .../files/libreoffice-7.2.5.2-kf591.patch | 56 ---------------- ...Add-missing-nSize-set-for-Poppler-22.04.0.patch | 31 +++++++++ ...t-FreeBSD-patch-for-Poppler-22.04.0-build.patch | 78 ++++++++++++++++++++++ 3 files changed, 109 insertions(+), 56 deletions(-) delete mode 100644 app-office/libreoffice/files/libreoffice-7.2.5.2-kf591.patch create mode 100644 app-office/libreoffice/files/libreoffice-7.3.3.2-Add-missing-nSize-set-for-Poppler-22.04.0.patch create mode 100644 app-office/libreoffice/files/libreoffice-7.3.3.2-Import-FreeBSD-patch-for-Poppler-22.04.0-build.patch (limited to 'app-office/libreoffice/files') diff --git a/app-office/libreoffice/files/libreoffice-7.2.5.2-kf591.patch b/app-office/libreoffice/files/libreoffice-7.2.5.2-kf591.patch deleted file mode 100644 index ac920867e4d5..000000000000 --- a/app-office/libreoffice/files/libreoffice-7.2.5.2-kf591.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 5fd5e42bf28a7910321c6b6d76257e7386839fbc Mon Sep 17 00:00:00 2001 -From: Michael Weghorn -Date: Wed, 16 Feb 2022 13:38:47 +0100 -Subject: configure.ac: Update kf5 include/lib check to work with KF5 >= 5.91 - -The 'kcoreaddons_version.h' header was moved to the 'KCoreAddons' -subdirectory in kcoreaddons commit - - commit d971ba9bb27a3e8f18a116692fdf98c1729ac244 - Author: Ahmad Samir - Date: Sat Jan 15 14:14:13 2022 +0200 - - Install kcoreaddons_version.h in /usr/include/KF5/KCoreAddons/ - - Instead of /usr/include/KF5/kcoreaddons_version.h. - - For more details see: - https://invent.kde.org/frameworks/kservice/-/merge_requests/79 - - GIT_SILENT - -Adapt the KF5 check to check for the 'KFileWidget' header and -the 'libKF5KIOFileWidgets.so' library instead. -This is more exact anyway, since we require KIOFileWidgets, -and the previous check didn't ensure that. -(So in case only KF5CoreAddons but not KIOFileWidgets was installed, -configure would previously pass, but the build fail.) - -[1] https://invent.kde.org/frameworks/kcoreaddons/-/commit/d971ba9bb27a3e8f18a116692fdf98c1729ac244 - -Change-Id: I7ecf7f29dce85e1a6e6b0d4f2519fa37ab04ca84 -Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129996 -Tested-by: Jenkins -Reviewed-by: Michael Weghorn ---- - configure.ac | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 6acb3107cea3..4e84f9a33980 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -13017,8 +13017,8 @@ then - kf5_libdirs="$kf5_libdirs /usr/lib64 /usr/lib64/kf5 /usr/lib64/kf5/devel" - fi - -- kf5_test_include="KF5/kcoreaddons_version.h" -- kf5_test_library="libKF5CoreAddons.so" -+ kf5_test_include="KF5/KIOFileWidgets/KFileWidget" -+ kf5_test_library="libKF5KIOFileWidgets.so" - kf5_libdirs="$qt5_libdir $kf5_libdirs" - - dnl kf5 KDE4 support compatibility installed --- -cgit v1.2.1 - diff --git a/app-office/libreoffice/files/libreoffice-7.3.3.2-Add-missing-nSize-set-for-Poppler-22.04.0.patch b/app-office/libreoffice/files/libreoffice-7.3.3.2-Add-missing-nSize-set-for-Poppler-22.04.0.patch new file mode 100644 index 000000000000..22de747e01e4 --- /dev/null +++ b/app-office/libreoffice/files/libreoffice-7.3.3.2-Add-missing-nSize-set-for-Poppler-22.04.0.patch @@ -0,0 +1,31 @@ +https://bugs.gentoo.org/843311 + +From: Sam James +Date: Sun, 8 May 2022 21:22:49 +0000 +Subject: [PATCH] Add missing nSize set for Poppler 22.04.0 + +Thanks-to: Stephan Hartmann +--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx ++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +@@ -478,6 +478,10 @@ int PDFOutDev::parseFont( long long nNewId, GfxFont* gfxFont, const GfxState* st + char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize ); + #else + std::optional> pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef() ); ++ if( pBuf ) ++ { ++ nSize = pBuf->size(); ++ } + #endif + if( pBuf ) + { +@@ -502,6 +506,10 @@ void PDFOutDev::writeFontFile( GfxFont* gfxFont ) const + char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize ); + #else + std::optional> pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef() ); ++ if( pBuf ) ++ { ++ nSize = pBuf->size(); ++ } + #endif + if( !pBuf ) + return; diff --git a/app-office/libreoffice/files/libreoffice-7.3.3.2-Import-FreeBSD-patch-for-Poppler-22.04.0-build.patch b/app-office/libreoffice/files/libreoffice-7.3.3.2-Import-FreeBSD-patch-for-Poppler-22.04.0-build.patch new file mode 100644 index 000000000000..39cb13bbc7d6 --- /dev/null +++ b/app-office/libreoffice/files/libreoffice-7.3.3.2-Import-FreeBSD-patch-for-Poppler-22.04.0-build.patch @@ -0,0 +1,78 @@ +https://bugs.gentoo.org/843311 +https://cgit.freebsd.org/ports/commit/?id=d9b5ef800dbd0366eae81b03bfa89689ec73c6f7 + +(sam: adapt version check to 22.4.0) + +From: Sam James +Date: Sun, 8 May 2022 21:20:25 +0000 +Subject: [PATCH 1/2] Import FreeBSD patch for Poppler 22.04.0 build + +--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx ++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +@@ -474,11 +474,17 @@ int PDFOutDev::parseFont( long long nNewId, GfxFont* gfxFont, const GfxState* st + { + // TODO(P3): Unfortunately, need to read stream twice, since + // we must write byte count to stdout before ++#if !POPPLER_CHECK_VERSION(22, 4, 0) + char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize ); ++#else ++ std::optional> pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef() ); ++#endif + if( pBuf ) + { + aNewFont.isEmbedded = true; ++#if !POPPLER_CHECK_VERSION(22, 4, 0) + gfree(pBuf); ++#endif + } + } + +@@ -492,21 +498,32 @@ void PDFOutDev::writeFontFile( GfxFont* gfxFont ) const + return; + + int nSize = 0; +- char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize ); ++#if !POPPLER_CHECK_VERSION(22, 4, 0) ++ char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize ); ++#else ++ std::optional> pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef() ); ++#endif + if( !pBuf ) + return; + + // ---sync point--- see SYNC STREAMS above + fflush(stdout); +- ++#if !POPPLER_CHECK_VERSION(22, 4, 0) + if( fwrite(pBuf, sizeof(char), nSize, g_binary_out) != static_cast(nSize) ) ++#else ++ if( fwrite(reinterpret_cast(pBuf.value().data()), sizeof(char), nSize, g_binary_out) != static_cast(nSize) ) ++#endif + { +- gfree(pBuf); ++#if !POPPLER_CHECK_VERSION(22, 4, 0) ++ gfree(pBuf); ++#endif + exit(1); // error + } + // ---sync point--- see SYNC STREAMS above + fflush(g_binary_out); +- gfree(pBuf); ++#if !POPPLER_CHECK_VERSION(22, 4, 0) ++ gfree(pBuf); ++#endif + } + + #if POPPLER_CHECK_VERSION(0, 83, 0) +@@ -759,7 +776,11 @@ void PDFOutDev::updateFont(GfxState *state) + { + assert(state); + ++#if !POPPLER_CHECK_VERSION(22, 4, 0) + GfxFont *gfxFont = state->getFont(); ++#else ++ GfxFont *gfxFont = state->getFont().get(); ++#endif + if( !gfxFont ) + return; + -- cgit v1.2.3