gnu: libreoffice: Update to 6.0.5.1.

* gnu/packages/patches/libreoffice-icu.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/libreoffice.scm (libreoffice): Update to 6.0.5.1.
[source]: Add patch.
[inputs]: Add libepubgen and libqxp.
[arguments]: Adjust "prepare-src" phase.
This commit is contained in:
Ricardo Wurmus 2018-06-07 10:45:38 +02:00
parent e47e1f3311
commit 54179e2463
No known key found for this signature in database
GPG Key ID: 197A5888235FACAC
3 changed files with 144 additions and 25 deletions

View File

@ -869,6 +869,7 @@ dist_patch_DATA = \
%D%/packages/patches/libmad-mips-newgcc.patch \ %D%/packages/patches/libmad-mips-newgcc.patch \
%D%/packages/patches/libmygpo-qt-fix-qt-5.11.patch \ %D%/packages/patches/libmygpo-qt-fix-qt-5.11.patch \
%D%/packages/patches/libmygpo-qt-missing-qt5-modules.patch \ %D%/packages/patches/libmygpo-qt-missing-qt5-modules.patch \
%D%/packages/patches/libreoffice-icu.patch \
%D%/packages/patches/libsndfile-armhf-type-checks.patch \ %D%/packages/patches/libsndfile-armhf-type-checks.patch \
%D%/packages/patches/libsndfile-CVE-2017-8361-8363-8365.patch \ %D%/packages/patches/libsndfile-CVE-2017-8361-8363-8365.patch \
%D%/packages/patches/libsndfile-CVE-2017-8362.patch \ %D%/packages/patches/libsndfile-CVE-2017-8362.patch \

View File

@ -896,7 +896,7 @@ converting QuarkXPress file format. It supports versions 3.1 to 4.1.")
(define-public libreoffice (define-public libreoffice
(package (package
(name "libreoffice") (name "libreoffice")
(version "5.4.7.2") (version "6.0.5.1")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
@ -906,7 +906,8 @@ converting QuarkXPress file format. It supports versions 3.1 to 4.1.")
(version-prefix version 3) "/libreoffice-" version ".tar.xz")) (version-prefix version 3) "/libreoffice-" version ".tar.xz"))
(sha256 (sha256
(base32 (base32
"0s9s4nhp2whwxis54jbxrf1dwpnpl95b9781d1pdj4xk5z9v90fv")))) "0vnmb231hyhxm7klaqd8vp3rmvix145bq8iqzv19jgl1yaqkxl21"))
(patches (search-patches "libreoffice-icu.patch"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(native-inputs (native-inputs
`(("bison" ,bison) `(("bison" ,bison)
@ -938,6 +939,7 @@ converting QuarkXPress file format. It supports versions 3.1 to 4.1.")
("libcmis" ,libcmis) ("libcmis" ,libcmis)
("libjpeg-turbo" ,libjpeg-turbo) ("libjpeg-turbo" ,libjpeg-turbo)
("libe-book" ,libe-book) ("libe-book" ,libe-book)
("libepubgen" ,libepubgen)
("libetonyek" ,libetonyek) ("libetonyek" ,libetonyek)
("libexttextcat" ,libexttextcat) ("libexttextcat" ,libexttextcat)
("libfreehand" ,libfreehand) ("libfreehand" ,libfreehand)
@ -948,6 +950,7 @@ converting QuarkXPress file format. It supports versions 3.1 to 4.1.")
("libmwaw" ,libmwaw) ("libmwaw" ,libmwaw)
("libodfgen" ,libodfgen) ("libodfgen" ,libodfgen)
("libpagemaker" ,libpagemaker) ("libpagemaker" ,libpagemaker)
("libqxp" ,libqxp)
("libstaroffice" ,libstaroffice) ("libstaroffice" ,libstaroffice)
("libvisio" ,libvisio) ("libvisio" ,libvisio)
("libwpg" ,libwpg) ("libwpg" ,libwpg)
@ -985,34 +988,23 @@ converting QuarkXPress file format. It supports versions 3.1 to 4.1.")
(modify-phases %standard-phases (modify-phases %standard-phases
(add-before 'configure 'prepare-src (add-before 'configure 'prepare-src
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let ((gpgme (assoc-ref inputs "gpgme")))
(substitute*
"sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx"
;; This header was renamed in Poppler 0.62.0.
(("UTF8.h") "UnicodeMapFuncs.h")
;; And mapUCS2() was renamed to mapUTF16().
(("UCS2") "UTF16"))
(substitute* (substitute*
(list "sysui/CustomTarget_share.mk" (list "sysui/CustomTarget_share.mk"
"solenv/gbuild/gbuild.mk" "solenv/gbuild/gbuild.mk"
"solenv/gbuild/platform/unxgcc.mk") "solenv/gbuild/platform/unxgcc.mk")
(("/bin/sh") (which "sh"))) (("/bin/sh") (which "sh")))
;; GPGME++ headers are installed in a gpgme++ subdirectory, ;; GPGME++ headers are installed in a gpgme++ subdirectory, but
;; but files in "xmlsecurity/source/gpg/" expect to find them ;; files in "xmlsecurity/source/gpg/" and elsewhere expect to
;; on the include path without a prefix. ;; find them on the include path without a prefix.
(substitute* "xmlsecurity/Library_xsec_xmlsec.mk" (substitute* '("xmlsecurity/Library_xsec_xmlsec.mk"
"comphelper/Library_comphelper.mk")
(("\\$\\$\\(INCLUDE\\)") (("\\$\\$\\(INCLUDE\\)")
(string-append "$$(INCLUDE) -I" gpgme "/include/gpgme++"))) (string-append "$$(INCLUDE) -I"
(assoc-ref inputs "gpgme")
"/include/gpgme++")))
;; XXX: When GTK2 is disabled, one header file is not included. #t))
;; This is likely fixed in later versions. See also
;; <https://bugs.gentoo.org/641812>.
(substitute* "vcl/unx/gtk3/gtk3gtkframe.cxx"
(("#include <unx/gtk/gtkgdi.hxx>")
"#include <unx/gtk/gtkgdi.hxx>\n#include <unx/gtk/gtksalmenu.hxx>"))
#t)))
(add-after 'install 'bin-and-desktop-install (add-after 'install 'bin-and-desktop-install
;; Create 'soffice' and 'libreoffice' symlinks to the executable ;; Create 'soffice' and 'libreoffice' symlinks to the executable
;; script. ;; script.

View File

@ -0,0 +1,126 @@
This patch fixes the build of Libreoffice 6.0.5 with icu 61.1.
It was downloaded from https://bugs.gentoo.org/651702.
--- a/forms/source/xforms/datatypes.hxx
+++ a/forms/source/xforms/datatypes.hxx
@@ -36,6 +36,8 @@
#include <memory>
+using icu::RegexMatcher;
+
namespace xforms
{
--- a/i18npool/inc/collator_unicode.hxx
+++ a/i18npool/inc/collator_unicode.hxx
@@ -26,6 +26,8 @@
#include <unicode/tblcoll.h>
+using icu::RuleBasedCollator;
+
// ----------------------------------------------------
// class Collator_Unicode
// ----------------------------------------------------
--- a/i18npool/source/breakiterator/breakiterator_unicode.cxx
+++ a/i18npool/source/breakiterator/breakiterator_unicode.cxx
@@ -30,6 +30,9 @@
#include <rtl/ustring.hxx>
#include <string.h>
+using icu::BreakIterator;
+using icu::RuleBasedBreakIterator;
+
U_CDECL_BEGIN
extern const char OpenOffice_dat[];
U_CDECL_END
--- a/i18npool/source/collator/collator_unicode.cxx
+++ a/i18npool/source/collator/collator_unicode.cxx
@@ -29,6 +29,8 @@
#include <com/sun/star/i18n/CollatorOptions.hpp>
#include <cppuhelper/supportsservice.hxx>
+using icu::Collator;
+
using namespace ::com::sun::star;
using namespace ::com::sun::star::i18n;
using namespace ::com::sun::star::lang;
--- a/i18npool/source/collator/gencoll_rule.cxx
+++ a/i18npool/source/collator/gencoll_rule.cxx
@@ -31,6 +31,8 @@
#include <unicode/tblcoll.h>
+using icu::RuleBasedCollator;
+
/* Main Procedure */
void data_write(char* file, char* name, sal_uInt8 *data, sal_Int32 len)
--- a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
+++ a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx
@@ -29,6 +29,8 @@
#include <unicode/normlzr.h>
#include <memory>
+using icu::NumberFormat;
+
using namespace ::com::sun::star::i18n;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star;
--- a/i18npool/source/transliteration/ignoreDiacritics_CTL.cxx
+++ a/i18npool/source/transliteration/ignoreDiacritics_CTL.cxx
@@ -12,6 +12,8 @@
#include <unicode/translit.h>
#include <unicode/uchar.h>
+using icu::UnicodeString;
+
namespace i18npool {
ignoreDiacritics_CTL::ignoreDiacritics_CTL()
--- a/i18nutil/source/utility/unicode.cxx
+++ a/i18nutil/source/utility/unicode.cxx
@@ -34,6 +34,9 @@
// which (obviously) breaks UnicodeType::CURRENCY_SYMBOL
#undef CURRENCY_SYMBOL
+using icu::NumberFormat;
+using icu::UnicodeString;
+
using namespace ::com::sun::star::i18n;
template<class L, typename T>
--- a/lotuswordpro/source/filter/localtime.cxx
+++ a/lotuswordpro/source/filter/localtime.cxx
@@ -57,6 +57,8 @@
#include <limits.h>
#include <unicode/timezone.h>
+using icu::TimeZone;
+
const long DAY_SEC =24 * 60 * 60;
const long YEAR_SEC = 365 * DAY_SEC;
const long FOURYEAR_SEC = 4 * YEAR_SEC + DAY_SEC;
--- a/opencl/source/openclconfig.cxx
+++ a/opencl/source/openclconfig.cxx
@@ -17,6 +17,8 @@
#include <sal/log.hxx>
#include <sal/types.h>
+using icu::RegexMatcher;
+
OpenCLConfig::OpenCLConfig() :
mbUseOpenCL(true)
{
--- a/vcl/inc/scrptrun.h
+++ a/vcl/inc/scrptrun.h
@@ -45,6 +45,8 @@
#include <unicode/uscript.h>
#include <vector>
+using icu::UObject;
+
namespace vcl {
struct ParenStackEntry