mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-02-16 23:57:11 +00:00
extra/libreoffice-fresh to 7.3.3-2
This commit is contained in:
parent
38ba500868
commit
9dfff64a52
2 changed files with 75 additions and 1 deletions
|
@ -20,7 +20,7 @@ pkgbase=libreoffice-fresh
|
|||
pkgname=('libreoffice-fresh-sdk' 'libreoffice-fresh')
|
||||
_LOver=7.3.3.2
|
||||
pkgver=7.3.3
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
arch=('x86_64')
|
||||
license=('LGPL3')
|
||||
url="https://www.libreoffice.org/"
|
||||
|
@ -68,6 +68,7 @@ source=(${_mirror}/libreoffice{,-help,-translations}-${_LOver}.tar.xz{,.asc}
|
|||
${_additional_source_url2}/f543e6e2d7275557a839a164941c0a86e5f2c3f2a0042bfc434c88c6dde9e140-opens___.ttf
|
||||
${_additional_source_url2}/185d60944ea767075d27247c3162b3bc-unowinreg.dll
|
||||
poppler-22.03.0.patch
|
||||
poppler-22.04.0.patch
|
||||
make-pyuno-work-with-system-wide-module-install.diff
|
||||
soffice-template.desktop.in
|
||||
libreoffice-fresh.sh libreoffice-fresh.csh)
|
||||
|
@ -116,6 +117,7 @@ sha256sums=('ee12bdbe1621c20e2744bc5b6c5967810f25a5760b98ac5812d550ab00968685'
|
|||
'f543e6e2d7275557a839a164941c0a86e5f2c3f2a0042bfc434c88c6dde9e140'
|
||||
'eafde646a7dbe46d20c291685b0beac2382174d78d66ee990e229a1bf6e6cec6'
|
||||
'e61e2a266c7a4374377475254a2f095c1ce2376980b301955a4e5a0d32d3c25b'
|
||||
'caaef7919c6296ab93c7d02607503f91ec965387d038779c0aba9fce78b8e456'
|
||||
'c463654a73ecfbc242ff109726fb4faecdbfb3d91affafe919b24bea65afb563'
|
||||
'd0be8099cbee3c9dfda694a828149b881c345b204ab68826f317580aafb50879'
|
||||
'cd1b25ff390e436c6bffa65c6e12382236e3ccbf8d3aae51b1b59bcaed79fd8a'
|
||||
|
@ -138,6 +140,7 @@ prepare() {
|
|||
cp -f "${srcdir}"/185d60944ea767075d27247c3162b3bc-unowinreg.dll "${srcdir}"/ext_sources
|
||||
|
||||
patch -Np1 -i "${srcdir}"/poppler-22.03.0.patch
|
||||
patch -Np0 -i "${srcdir}"/poppler-22.04.0.patch
|
||||
|
||||
# fix not upstreamable pyuno paths - FS#54250
|
||||
patch -Np1 -i "${srcdir}"/make-pyuno-work-with-system-wide-module-install.diff
|
||||
|
|
71
extra/libreoffice-fresh/poppler-22.04.0.patch
Normal file
71
extra/libreoffice-fresh/poppler-22.04.0.patch
Normal file
|
@ -0,0 +1,71 @@
|
|||
# Patch from FreeBSD (https://cgit.freebsd.org/ports/commit/?id=d9b5ef800dbd)
|
||||
|
||||
--- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx.orig 2022-04-26 16:11:01 UTC
|
||||
+++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
|
||||
@@ -474,11 +474,17 @@ int PDFOutDev::parseFont( long long nNewId, GfxFont* g
|
||||
{
|
||||
// TODO(P3): Unfortunately, need to read stream twice, since
|
||||
// we must write byte count to stdout before
|
||||
+#if !POPPLER_CHECK_VERSION(22, 3, 0)
|
||||
char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize );
|
||||
+#else
|
||||
+ std::optional<std::vector<unsigned char>> pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef() );
|
||||
+#endif
|
||||
if( pBuf )
|
||||
{
|
||||
aNewFont.isEmbedded = true;
|
||||
+#if !POPPLER_CHECK_VERSION(22, 3, 0)
|
||||
gfree(pBuf);
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -492,21 +498,32 @@ void PDFOutDev::writeFontFile( GfxFont* gfxFont ) cons
|
||||
return;
|
||||
|
||||
int nSize = 0;
|
||||
- char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize );
|
||||
+#if !POPPLER_CHECK_VERSION(22, 3, 0)
|
||||
+ char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize );
|
||||
+#else
|
||||
+ std::optional<std::vector<unsigned char>> pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef() );
|
||||
+#endif
|
||||
if( !pBuf )
|
||||
return;
|
||||
|
||||
// ---sync point--- see SYNC STREAMS above
|
||||
fflush(stdout);
|
||||
-
|
||||
+#if !POPPLER_CHECK_VERSION(22, 3, 0)
|
||||
if( fwrite(pBuf, sizeof(char), nSize, g_binary_out) != static_cast<size_t>(nSize) )
|
||||
+#else
|
||||
+ if( fwrite(reinterpret_cast<char*>(pBuf.value().data()), sizeof(char), nSize, g_binary_out) != static_cast<size_t>(nSize) )
|
||||
+#endif
|
||||
{
|
||||
- gfree(pBuf);
|
||||
+#if !POPPLER_CHECK_VERSION(22, 3, 0)
|
||||
+ gfree(pBuf);
|
||||
+#endif
|
||||
exit(1); // error
|
||||
}
|
||||
// ---sync point--- see SYNC STREAMS above
|
||||
fflush(g_binary_out);
|
||||
- gfree(pBuf);
|
||||
+#if !POPPLER_CHECK_VERSION(22, 3, 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, 3, 0)
|
||||
GfxFont *gfxFont = state->getFont();
|
||||
+#else
|
||||
+ GfxFont *gfxFont = state->getFont().get();
|
||||
+#endif
|
||||
if( !gfxFont )
|
||||
return;
|
||||
|
Loading…
Reference in a new issue