Subject: [PATCH v3 2/4] gnu: libreoffice: Update to 24.2.0.3.

From: Nicolas Graves <[email-masked]>
Date: Thu, 26 Sep 2024 09:50:53 +0200

* gnu/packages/libreoffice.scm (libreoffice): Update to 24.2.0.3.

Change-Id: I72e0ebb4d075c47ea168b181f969a97f9249150a
---
 gnu/packages/libreoffice.scm | 29 +++++++++++++++++++++++------
 1 file changed, 23 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index ed8dfd432b..70167d11ea 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -63,6 +63,7 @@ (define-module (gnu packages libreoffice)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages game-development)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages ghostscript)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
@@ -80,6 +81,7 @@ (define-module (gnu packages libreoffice)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages nss)
   #:use-module (gnu packages openldap)
+  #:use-module (gnu packages password-utils)
   #:use-module (gnu packages pdf)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages perl-compression)
@@ -891,16 +893,20 @@ (define dtoa
 (define-public libreoffice
   (package
     (name "libreoffice")
-    (version "7.6.7.2")               ;keep in sync with hunspell dictionaries
+    (version "24.2.0.3")               ;keep in sync with hunspell dictionaries
     (source
      (origin
        (method url-fetch)
        (uri
-        (string-append
-         "https://download.documentfoundation.org/libreoffice/src/"
-         (version-prefix version 3) "/libreoffice-" version ".tar.xz"))
+        (list
+         (string-append
+          "https://download.documentfoundation.org/libreoffice/src/"
+          (version-prefix version 3) "/libreoffice-" version ".tar.xz")
+         (string-append
+          "https://downloadarchive.documentfoundation.org/libreoffice/old/"
+          version "/src/libreoffice-" version ".tar.xz")))
        (sha256
-        (base32 "159vbv4zhibfd4xjdamcqs4h0p3h5y79kcjwrmshvjhs23p55l3m"))))
+        (base32 "0s1m92rmizicd8jgxcjz0xsd79v148wkq0ac9yzz61x2ga8mdx0q"))))
     (build-system glib-or-gtk-build-system)
     (arguments
      (list
@@ -961,6 +967,13 @@ (define-public libreoffice
                              "shell/source/unix/misc/senddoc.sh")
                 (("/usr/bin/xdg-open")
                  (search-input-file inputs "/bin/xdg-open")))
+
+              ;; Probably necessary because we use a custom GCC(>=12)/GLIBC.
+              (substitute* '("sal/rtl/math.cxx"
+                             "sc/source/core/tool/math.cxx")
+                (("std::(fe[gs]etround|feclearexcept|fetestexcept)" all suffix)
+                 suffix))
+
               (setenv "CPPFLAGS" "-std=c++17")))
           (add-after 'install 'reset-zip-timestamps
             (lambda _
@@ -1083,12 +1096,14 @@ (define (install-python-script name)
            cppunit
            flex
            frozen                       ;header-only library
+           gcc-12
            pkg-config
            python-wrapper
            which
            ziptime))
     (inputs
-     (list bluez
+     (list argon2
+           bluez
            boost
            box2d
            clucene
@@ -1100,6 +1115,7 @@ (define (install-python-script name)
            fontforge
            gconf
            glew
+           glibc
            glm
            gnupg
            gobject-introspection
@@ -1168,6 +1184,7 @@ (define (install-python-script name)
            xdg-utils
            xmlsec-nss
            zip
+           zxcvbn-c
            zxing-cpp))
     (home-page "https://www.libreoffice.org/")
     (synopsis "Office suite")
-- 
2.46.0