summary refs log tree commit diff
path: root/gnu/packages/libreoffice.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-10-10 11:48:55 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-10-11 11:29:02 +0000
commitf81abf389813b7b82f06db1607274caa68246a6a (patch)
tree8f189d3be7346d2e3f8670a154d196f2c2134605 /gnu/packages/libreoffice.scm
parent59911ae29442aba18bcb53233e793d8f3d264504 (diff)
downloadguix-f81abf389813b7b82f06db1607274caa68246a6a.tar.gz
gnu: libreoffice: Move inputs below arguments and fix indentation.
* gnu/packages/libreoffice.scm (libreoffice) Fix indentation.
[native-inputs, inputs]: Move below...
[arguments]: ... this field.
Diffstat (limited to 'gnu/packages/libreoffice.scm')
-rw-r--r--gnu/packages/libreoffice.scm254
1 files changed, 127 insertions, 127 deletions
diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm
index 46eba12431..b4b51a9d50 100644
--- a/gnu/packages/libreoffice.scm
+++ b/gnu/packages/libreoffice.scm
@@ -1067,6 +1067,126 @@ converting QuarkXPress file format.  It supports versions 3.1 to 4.1.")
        (sha256
         (base32 "14g9873x8m5yakpq7v9f7lhc5fkxh6yhjhgh0pm30cqmxsqhsglv"))))
     (build-system glib-or-gtk-build-system)
+    (arguments
+     (list
+      #:tests? #f                       ; Building the tests already fails.
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'insert-external-tarballs
+            (lambda _
+              (mkdir-p "external/tarballs")
+              (copy-file #$dtoa "external/tarballs/dtoa-20180411.tgz")))
+          (add-before 'configure 'prepare-src
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute*
+                  (list "sysui/CustomTarget_share.mk"
+                        "solenv/gbuild/gbuild.mk"
+                        "solenv/gbuild/platform/unxgcc.mk")
+                (("/bin/sh") (which "sh")))
+
+              ;; Use store references for strictly necessary commands,
+              ;; but not for optional tools like ‘gdb’ and ‘valgrind’.
+              (for-each (lambda (command)
+                          (substitute* "desktop/scripts/soffice.sh"
+                            (((format #f "~a " command))
+                             (format #f "~a " (which command)))))
+                        (list "dirname" "grep" "uname"))
+
+              ;; GPGME++ headers are installed in a gpgme++ subdirectory, but
+              ;; configure is hardcoded to use FHS directories.
+              (substitute* "configure"
+                (("GPGMEPP_CFLAGS=-I/usr/include/gpgme\\+\\+")
+                 (string-append "GPGMEPP_CFLAGS=-I"
+                                (search-input-directory inputs
+                                                        "include/gpgme++"))))
+
+              ;; /usr/bin/xdg-open doesn't exist on Guix System.
+              (substitute* '("shell/source/unix/exec/shellexec.cxx"
+                             "shell/source/unix/misc/senddoc.sh")
+                (("/usr/bin/xdg-open")
+                 (search-input-file inputs "/bin/xdg-open")))))
+          (add-after 'install 'reset-zip-timestamps
+            (lambda _
+              (for-each (lambda (file)
+                          (invoke "ziptime" file))
+                        ;; So many different extensions for .zip files.
+                        (find-files #$output "\\.(bau|dat|otp|ott|zip)$"))))
+          (add-after 'install 'bin-and-desktop-install
+            ;; Create 'soffice' and 'libreoffice' symlinks to the executable
+            ;; script.
+            (lambda _
+              (let ((out #$output))
+                (define (symlink-output src dst)
+                  (mkdir-p (dirname (string-append out dst)))
+                  (symlink (string-append out src) (string-append out dst)))
+                (define (install src dst)
+                  (let ((dst (string-append out dst)))
+                    (mkdir-p (dirname dst))
+                    (copy-file src dst)))
+                (define (install-desktop-file app)
+                  (let ((src (string-append "/lib/libreoffice/share/xdg/"
+                                            app ".desktop"))
+                        (dst (string-append "/share/applications/libreoffice-"
+                                            app ".desktop")))
+                    (substitute* (string-append out src)
+                      (("Exec=libreoffice[0-9]+\\.[0-9]+ ")
+                       (string-append "Exec=" out "/bin/libreoffice "))
+                      (("Icon=libreoffice.*")
+                       (string-append "Icon=" app "\n"))
+                      (("LibreOffice [0-9]+\\.[0-9]+")
+                       "LibreOffice"))
+                    (symlink-output src dst)))
+                (define (install-appdata app)
+                  (install-file (string-append
+                                 "sysui/desktop/appstream-appdata/"
+                                 "libreoffice-" app ".appdata.xml")
+                                (string-append out "/share/appdata")))
+                (symlink-output "/lib/libreoffice/program/soffice"
+                                "/bin/soffice")
+                (symlink-output "/lib/libreoffice/program/soffice"
+                                "/bin/libreoffice")
+                (install
+                 "workdir/CustomTarget/sysui/share/libreoffice/openoffice.org.xml"
+                 "/share/mime/packages/libreoffice.xml")
+                (for-each install-desktop-file
+                          '("base" "calc" "draw" "impress" "writer"
+                            "math" "startcenter"))
+                (for-each install-appdata
+                          '("base" "calc" "draw" "impress" "writer"))
+                (mkdir-p (string-append out "/share/icons/hicolor"))
+                (copy-recursively "sysui/desktop/icons/hicolor"
+                                  (string-append out "/share/icons/hicolor"))))))
+      #:configure-flags
+      #~(list
+         "--enable-release-build"
+         "--with-vendor=GNU Guix"
+         ;; Avoid using all cpu cores by default
+         (format #f "--with-parallelism=~d" (parallel-job-count))
+         "--disable-fetch-external"     ; disable downloads
+         "--with-system-libs"           ; enable all --with-system-* flags
+         (string-append "--with-boost-libdir="
+                        (dirname
+                         (search-input-file %build-inputs
+                                            "lib/libboost_system.so")))
+         ;; Avoid a dependency on ucpp.
+         "--with-idlc-cpp=cpp"
+         ;; The fonts require an external tarball (crosextrafonts).
+         ;; They should not be needed when system fonts are available.
+         "--without-fonts"
+         ;; With java, the build fails since sac.jar is missing.
+         "--without-java"
+         ;; FIXME: Enable once the corresponding inputs are packaged.
+         "--disable-coinmp"
+         "--disable-skia"
+         ;; This could (Debian does this) be a separate output containing only
+         ;; program/libfirebird_sdbclo.so, if there's a way to point to it.
+         "--enable-firebird-sdbc"
+         ;; XXX: PDFium support requires fetching an external tarball and
+         ;; patching the build scripts to work with GCC5.  Try enabling this
+         ;; when our default compiler is >=GCC 6.
+         "--disable-pdfium"
+         "--without-doxygen"
+         "--enable-build-opensymbol")))
     (native-inputs
      (list bison
            cppunit
@@ -1152,134 +1272,14 @@ converting QuarkXPress file format.  It supports versions 3.1 to 4.1.")
            xmlsec-nss
            zip
            zxing-cpp))
-    (arguments
-     (list
-      #:tests? #f                       ; Building the tests already fails.
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-after 'unpack 'insert-external-tarballs
-            (lambda _
-              (mkdir-p "external/tarballs")
-              (copy-file #$dtoa "external/tarballs/dtoa-20180411.tgz")))
-          (add-before 'configure 'prepare-src
-            (lambda* (#:key inputs #:allow-other-keys)
-              (substitute*
-                  (list "sysui/CustomTarget_share.mk"
-                        "solenv/gbuild/gbuild.mk"
-                        "solenv/gbuild/platform/unxgcc.mk")
-                (("/bin/sh") (which "sh")))
-
-              ;; Use store references for strictly necessary commands,
-              ;; but not for optional tools like ‘gdb’ and ‘valgrind’.
-              (for-each (lambda (command)
-                          (substitute* "desktop/scripts/soffice.sh"
-                            (((format #f "~a " command))
-                             (format #f "~a " (which command)))))
-                        (list "dirname" "grep" "uname"))
-
-              ;; GPGME++ headers are installed in a gpgme++ subdirectory, but
-              ;; configure is hardcoded to use FHS directories.
-              (substitute* "configure"
-                (("GPGMEPP_CFLAGS=-I/usr/include/gpgme\\+\\+")
-                 (string-append "GPGMEPP_CFLAGS=-I"
-                                (search-input-directory inputs
-                                                        "include/gpgme++"))))
-
-              ;; /usr/bin/xdg-open doesn't exist on Guix System.
-              (substitute* '("shell/source/unix/exec/shellexec.cxx"
-                             "shell/source/unix/misc/senddoc.sh")
-                (("/usr/bin/xdg-open")
-                 (search-input-file inputs "/bin/xdg-open")))))
-          (add-after 'install 'reset-zip-timestamps
-            (lambda _
-              (for-each (lambda (file)
-                          (invoke "ziptime" file))
-                        ;; So many different extensions for .zip files.
-                        (find-files #$output "\\.(bau|dat|otp|ott|zip)$"))))
-      (add-after 'install 'bin-and-desktop-install
-        ;; Create 'soffice' and 'libreoffice' symlinks to the executable
-        ;; script.
-        (lambda _
-          (let ((out #$output))
-            (define (symlink-output src dst)
-              (mkdir-p (dirname (string-append out dst)))
-              (symlink (string-append out src) (string-append out dst)))
-            (define (install src dst)
-              (let ((dst (string-append out dst)))
-                (mkdir-p (dirname dst))
-                (copy-file src dst)))
-            (define (install-desktop-file app)
-              (let ((src (string-append "/lib/libreoffice/share/xdg/"
-                                        app ".desktop"))
-                    (dst (string-append "/share/applications/libreoffice-"
-                                        app ".desktop")))
-                (substitute* (string-append out src)
-                  (("Exec=libreoffice[0-9]+\\.[0-9]+ ")
-                   (string-append "Exec=" out "/bin/libreoffice "))
-                  (("Icon=libreoffice.*")
-                   (string-append "Icon=" app "\n"))
-                  (("LibreOffice [0-9]+\\.[0-9]+")
-                   "LibreOffice"))
-                (symlink-output src dst)))
-            (define (install-appdata app)
-              (install-file (string-append
-                             "sysui/desktop/appstream-appdata/"
-                             "libreoffice-" app ".appdata.xml")
-                            (string-append out "/share/appdata")))
-            (symlink-output "/lib/libreoffice/program/soffice"
-                            "/bin/soffice")
-            (symlink-output "/lib/libreoffice/program/soffice"
-                            "/bin/libreoffice")
-            (install
-             "workdir/CustomTarget/sysui/share/libreoffice/openoffice.org.xml"
-             "/share/mime/packages/libreoffice.xml")
-            (for-each install-desktop-file
-                      '("base" "calc" "draw" "impress" "writer"
-                        "math" "startcenter"))
-            (for-each install-appdata
-                      '("base" "calc" "draw" "impress" "writer"))
-            (mkdir-p (string-append out "/share/icons/hicolor"))
-            (copy-recursively "sysui/desktop/icons/hicolor"
-                              (string-append out "/share/icons/hicolor"))))))
-     #:configure-flags
-     #~(list
-        "--enable-release-build"
-        "--with-vendor=GNU Guix"
-        ;; Avoid using all cpu cores by default
-        (format #f "--with-parallelism=~d" (parallel-job-count))
-        "--disable-fetch-external"      ; disable downloads
-        "--with-system-libs"            ; enable all --with-system-* flags
-        (string-append "--with-boost-libdir="
-                       (dirname
-                        (search-input-file %build-inputs
-                                           "lib/libboost_system.so")))
-        ;; Avoid a dependency on ucpp.
-        "--with-idlc-cpp=cpp"
-        ;; The fonts require an external tarball (crosextrafonts).
-        ;; They should not be needed when system fonts are available.
-        "--without-fonts"
-        ;; With java, the build fails since sac.jar is missing.
-        "--without-java"
-        ;; FIXME: Enable once the corresponding inputs are packaged.
-        "--disable-coinmp"
-        "--disable-skia"
-        ;; This could (Debian does this) be a separate output containing only
-        ;; program/libfirebird_sdbclo.so, if there's a way to point to it.
-        "--enable-firebird-sdbc"
-        ;; XXX: PDFium support requires fetching an external tarball and
-        ;; patching the build scripts to work with GCC5.  Try enabling this
-        ;; when our default compiler is >=GCC 6.
-        "--disable-pdfium"
-        "--without-doxygen"
-        "--enable-build-opensymbol")))
-  (home-page "https://www.libreoffice.org/")
-  (synopsis "Office suite")
-  (description "LibreOffice is a comprehensive office suite.  It contains
+    (home-page "https://www.libreoffice.org/")
+    (synopsis "Office suite")
+    (description "LibreOffice is a comprehensive office suite.  It contains
 a number of components: Writer, a word processor; Calc, a spreadsheet
 application; Impress, a presentation engine; Draw, a drawing and
 flowcharting application; Base, a database and database frontend;
 Math for editing mathematics.")
-  (properties
-   '((release-monitoring-url
-      . "https://www.libreoffice.org/download/download-libreoffice/")))
-  (license license:mpl2.0)))
+    (properties
+     '((release-monitoring-url
+        . "https://www.libreoffice.org/download/download-libreoffice/")))
+    (license license:mpl2.0)))