app-office/libreoffice: Fix build with media-libs/jpeg
authorAndreas Sturmlechner <asturm@gentoo.org>
Sun, 4 Feb 2018 18:57:42 +0000 (19:57 +0100)
committerAndreas Sturmlechner <asturm@gentoo.org>
Sun, 4 Feb 2018 18:57:42 +0000 (19:57 +0100)
Backport picked from upstream.

Bug: https://bugs.gentoo.org/638520
Package-Manager: Portage-2.3.24, Repoman-2.3.6

app-office/libreoffice/files/libreoffice-6.0.0.3-jpeg-9.patch [new file with mode: 0644]
app-office/libreoffice/libreoffice-6.0.0.3.ebuild
app-office/libreoffice/libreoffice-6.0.9999.ebuild
app-office/libreoffice/libreoffice-9999.ebuild

diff --git a/app-office/libreoffice/files/libreoffice-6.0.0.3-jpeg-9.patch b/app-office/libreoffice/files/libreoffice-6.0.0.3-jpeg-9.patch
new file mode 100644 (file)
index 0000000..40dfb08
--- /dev/null
@@ -0,0 +1,41 @@
+From 5184506ffddca982f22eede24cffad64ff3576e3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
+Date: Sat, 3 Feb 2018 16:39:12 +0000
+Subject: tdf#115416 allow build with classic libjpeg
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Change-Id: I96252e1a78dbc52d21095e11b7bdb0807e5d76b6
+Reviewed-on: https://gerrit.libreoffice.org/49187
+Tested-by: Jenkins <ci@libreoffice.org>
+Reviewed-by: Caolán McNamara <caolanm@redhat.com>
+Tested-by: Caolán McNamara <caolanm@redhat.com>
+---
+ vcl/source/filter/jpeg/jpegc.cxx | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx
+index 570c036..059ec20 100644
+--- a/vcl/source/filter/jpeg/jpegc.cxx
++++ b/vcl/source/filter/jpeg/jpegc.cxx
+@@ -244,6 +244,7 @@ void ReadJPEG(JpegStuff& rContext, JPEGReader* pJPEGReader, void* pInputStream,
+                 eScanlineFormat = ScanlineFormat::N8BitPal;
+                 nPixelSize = 1;
+             }
++#if defined(JCS_EXTENSIONS)
+             else if (eFinalFormat == ScanlineFormat::N32BitTcBgra)
+             {
+                 best_out_color_space = JCS_EXT_BGRA;
+@@ -262,7 +263,7 @@ void ReadJPEG(JpegStuff& rContext, JPEGReader* pJPEGReader, void* pInputStream,
+                 eScanlineFormat = eFinalFormat;
+                 nPixelSize = 4;
+             }
+-
++#endif
+             if (rContext.cinfo.jpeg_color_space == JCS_YCCK)
+                 rContext.cinfo.out_color_space = JCS_CMYK;
+ 
+-- 
+cgit v1.1
+
index fb3e9b376d04d5ff0791a2c20621f347aa3f1ee7..170a95f8825b52d74480c3ab28fae6cdf9aa9c54 100644 (file)
@@ -254,6 +254,9 @@ PATCHES=(
 
        # gtk3-kde5 vcl plugin backported from master
        "${WORKDIR}"/${PATCHSET/.tar.xz/}
+
+       # 6.1 branch
+       "${FILESDIR}/${P}-jpeg-9.patch"
 )
 
 pkg_pretend() {
@@ -261,8 +264,8 @@ pkg_pretend() {
                ewarn "If you plan to use Base application you should enable java or you will get various crashes."
 
        if has_version "<app-office/libreoffice-5.3.0[firebird]"; then
-               ewarn "Firebird has been upgraded to version 3.0.0. It is unable to read back Firebird 2.5 data,"
-               ewarn "so embedded firebird odb files created in LibreOffice pre-5.3 cannot be opened with LibreOffice 5.3."
+               ewarn "Firebird has been upgraded to version 3. It is unable to read back Firebird 2.5 data, so"
+               ewarn "embedded firebird odb files created in LibreOffice pre-5.3 can't be opened with this version."
                ewarn "See also: https://wiki.documentfoundation.org/ReleaseNotes/5.3#Base"
        fi
 
index 9890bb1bf8379ba12483db59a7fc0ec6e6f36a3d..95d104f0bb392146f788fcee525d5b5991e8877a 100644 (file)
@@ -260,8 +260,8 @@ pkg_pretend() {
                ewarn "If you plan to use Base application you should enable java or you will get various crashes."
 
        if has_version "<app-office/libreoffice-5.3.0[firebird]"; then
-               ewarn "Firebird has been upgraded to version 3.0.0. It is unable to read back Firebird 2.5 data,"
-               ewarn "so embedded firebird odb files created in LibreOffice pre-5.3 cannot be opened with LibreOffice 5.3."
+               ewarn "Firebird has been upgraded to version 3. It is unable to read back Firebird 2.5 data, so"
+               ewarn "embedded firebird odb files created in LibreOffice pre-5.3 can't be opened with this version."
                ewarn "See also: https://wiki.documentfoundation.org/ReleaseNotes/5.3#Base"
        fi
 
index 4869257cf96d2cf47876bafaab2d7faae4ce0424..59c64ab8a1c376809f4dfea694d14758736815f5 100644 (file)
@@ -258,8 +258,8 @@ pkg_pretend() {
                ewarn "If you plan to use Base application you should enable java or you will get various crashes."
 
        if has_version "<app-office/libreoffice-5.3.0[firebird]"; then
-               ewarn "Firebird has been upgraded to version 3.0.0. It is unable to read back Firebird 2.5 data,"
-               ewarn "so embedded firebird odb files created in LibreOffice pre-5.3 cannot be opened with LibreOffice 5.3."
+               ewarn "Firebird has been upgraded to version 3. It is unable to read back Firebird 2.5 data, so"
+               ewarn "embedded firebird odb files created in LibreOffice pre-5.3 can't be opened with this version."
                ewarn "See also: https://wiki.documentfoundation.org/ReleaseNotes/5.3#Base"
        fi