summary refs log tree commit diff
path: root/pkgs/applications/office/libreoffice
diff options
context:
space:
mode:
authorMartin Milata <martin@martinmilata.cz>2019-12-04 01:39:08 +0100
committerMartin Milata <martin@martinmilata.cz>2019-12-04 03:19:29 +0100
commit7f1bf286dc7813f9412c3f345f46f4b86dfaef0b (patch)
tree6a6e6bf6448ac0261702d4122b2286715822ad53 /pkgs/applications/office/libreoffice
parentb7c19e1b91e50713e98ffee2bc3c971624466095 (diff)
downloadnixpkgs-7f1bf286dc7813f9412c3f345f46f4b86dfaef0b.tar
nixpkgs-7f1bf286dc7813f9412c3f345f46f4b86dfaef0b.tar.gz
nixpkgs-7f1bf286dc7813f9412c3f345f46f4b86dfaef0b.tar.bz2
nixpkgs-7f1bf286dc7813f9412c3f345f46f4b86dfaef0b.tar.lz
nixpkgs-7f1bf286dc7813f9412c3f345f46f4b86dfaef0b.tar.xz
nixpkgs-7f1bf286dc7813f9412c3f345f46f4b86dfaef0b.tar.zst
nixpkgs-7f1bf286dc7813f9412c3f345f46f4b86dfaef0b.zip
libreoffice: fix build with poppler-0.83
Diffstat (limited to 'pkgs/applications/office/libreoffice')
-rw-r--r--pkgs/applications/office/libreoffice/default.nix8
-rw-r--r--pkgs/applications/office/libreoffice/poppler-0.83.patch48
-rw-r--r--pkgs/applications/office/libreoffice/still.nix7
3 files changed, 61 insertions, 2 deletions
diff --git a/pkgs/applications/office/libreoffice/default.nix b/pkgs/applications/office/libreoffice/default.nix
index 912ab42ce28..2c5cff1721b 100644
--- a/pkgs/applications/office/libreoffice/default.nix
+++ b/pkgs/applications/office/libreoffice/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pam, python3, libxslt, perl, ArchiveZip, gettext
+{ stdenv, fetchurl, fetchpatch, pam, python3, libxslt, perl, ArchiveZip, gettext
 , IOCompress, zlib, libjpeg, expat, freetype, libwpd
 , libxml2, db, curl, fontconfig, libsndfile, neon
 , bison, flex, zip, unzip, gtk3, gtk2, libmspack, getopt, file, cairo, which
@@ -73,6 +73,12 @@ in stdenv.mkDerivation rec {
 
   patches = [
     ./xdg-open-brief.patch
+    # poppler-0.82 compatibility:
+    (fetchpatch {
+      url = "https://github.com/LibreOffice/core/commit/2eadd46a.patch";
+      sha256 = "1mpipdfxvixjziizbhfbpybpzlg1ijw7s0yqjpmq5d7pf3pvkm4n";
+    })
+    ./poppler-0.83.patch
   ];
 
   tarballPath = "external/tarballs";
diff --git a/pkgs/applications/office/libreoffice/poppler-0.83.patch b/pkgs/applications/office/libreoffice/poppler-0.83.patch
new file mode 100644
index 00000000000..c751ec97c70
--- /dev/null
+++ b/pkgs/applications/office/libreoffice/poppler-0.83.patch
@@ -0,0 +1,48 @@
+diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+index 26048177e87d..da7736f607f9 100644
+--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+@@ -491,12 +491,12 @@ void PDFOutDev::writeFontFile( GfxFont* gfxFont ) const
+     gfree(pBuf);
+ }
+ 
+-void PDFOutDev::printPath( GfxPath* pPath )
++void PDFOutDev::printPath( const GfxPath* pPath )
+ {
+     int nSubPaths = pPath ? pPath->getNumSubpaths() : 0;
+     for( int i=0; i<nSubPaths; i++ )
+     {
+-        GfxSubpath* pSub  = pPath->getSubpath( i );
++        const GfxSubpath* pSub  = pPath->getSubpath( i );
+         const int nPoints = pSub->getNumPoints();
+ 
+         printf( " subpath %d", pSub->isClosed() );
+diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
+index 02f6b59f6f15..1c7451a78601 100644
+--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
+@@ -149,7 +149,7 @@ namespace pdfi
+ 
+         int  parseFont( long long nNewId, GfxFont* pFont, GfxState* state ) const;
+         void writeFontFile( GfxFont* gfxFont ) const;
+-        static void printPath( GfxPath* pPath );
++        static void printPath( const GfxPath* pPath );
+ 
+     public:
+         explicit PDFOutDev( PDFDoc* pDoc );
+diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
+index 42178b650cdd..b1a54bd09c5f 100644
+--- a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
++++ b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
+@@ -68,7 +68,11 @@ int main(int argc, char **argv)
+     }
+ 
+     // read config file
++#if POPPLER_CHECK_VERSION(0, 83, 0)
++    globalParams = std::make_unique<GlobalParams>();
++#else
+     globalParams = new GlobalParams();
++#endif
+     globalParams->setErrQuiet(true);
+ #if defined(_MSC_VER)
+     globalParams->setupBaseFonts(nullptr);
diff --git a/pkgs/applications/office/libreoffice/still.nix b/pkgs/applications/office/libreoffice/still.nix
index ee1497bfb7e..dbd8eb27b0f 100644
--- a/pkgs/applications/office/libreoffice/still.nix
+++ b/pkgs/applications/office/libreoffice/still.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, pam, python3, libxslt, perl, ArchiveZip, gettext
+{ stdenv, fetchurl, fetchpatch, pam, python3, libxslt, perl, ArchiveZip, gettext
 , IOCompress, zlib, libjpeg, expat, freetype, libwpd
 , libxml2, db, curl, fontconfig, libsndfile, neon
 , bison, flex, zip, unzip, gtk3, gtk2, libmspack, getopt, file, cairo, which
@@ -73,6 +73,11 @@ in stdenv.mkDerivation rec {
 
   patches = [
     ./xdg-open-brief.patch
+    (fetchpatch {
+      url = "https://github.com/LibreOffice/core/commit/2eadd46a.patch";
+      sha256 = "1mpipdfxvixjziizbhfbpybpzlg1ijw7s0yqjpmq5d7pf3pvkm4n";
+    })
+    ./poppler-0.83.patch
   ];
 
   tarballPath = "external/tarballs";