guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

06/09: gnu: gettext: Use gexps for arguments.


From: guix-commits
Subject: 06/09: gnu: gettext: Use gexps for arguments.
Date: Thu, 6 Jan 2022 10:41:30 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 495ac045a3ced3fe1b0ae888738b08be9c3fc968
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu Jan 6 12:03:14 2022 +0100

    gnu: gettext: Use gexps for arguments.
    
    * gnu/packages/gettext.scm (gettext-minimal)[arguments]: Use gexps.
    (gnu-gettext)[arguments]: Likewise.
---
 gnu/packages/gettext.scm | 105 ++++++++++++++++++++++++-----------------------
 1 file changed, 53 insertions(+), 52 deletions(-)

diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm
index e20d4d1427..b75c20c751 100644
--- a/gnu/packages/gettext.scm
+++ b/gnu/packages/gettext.scm
@@ -31,6 +31,7 @@
   #:use-module ((guix licenses) #:select (gpl2+ gpl3+ bsd-3))
   #:use-module (gnu packages)
   #:use-module (guix packages)
+  #:use-module (guix gexp)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
@@ -71,53 +72,53 @@
            ;; but for now we include it here in 'gettext-minimal'.
            ncurses))
     (arguments
-     `(#:configure-flags '("--with-included-libunistring=no"
-                           "--with-included-libxml=no")
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'patch-source-shebangs 'patch-fixed-paths
-           (lambda _
-             (substitute* '("gettext-tools/config.h.in"
-                            "gettext-tools/gnulib-tests/init.sh"
-                            "gettext-tools/tests/init.sh"
-                            "gettext-tools/system-tests/run-test")
-               (("/bin/sh") "sh"))
-             (substitute* '("gettext-tools/src/project-id"
-                            "gettext-tools/projects/KDE/trigger"
-                            "gettext-tools/projects/GNOME/trigger")
-               (("/bin/pwd") "pwd"))
-             #t))
-        (add-before 'check 'patch-tests
-         (lambda* (#:key inputs #:allow-other-keys)
-           (let* ((bash (which "sh")))
-             ;; Some of the files we're patching are
-             ;; ISO-8859-1-encoded, so choose it as the default
-             ;; encoding so the byte encoding is preserved.
-             (with-fluids ((%default-port-encoding #f))
-               (substitute*
-                   (find-files "gettext-tools/tests"
-                               "^(lang-sh|msg(exec|filter)-[0-9])")
-                 (("#![[:blank:]]/bin/sh")
-                  (format #f "#!~a" bash)))
+     (list #:configure-flags #~'("--with-included-libunistring=no"
+                                 "--with-included-libxml=no")
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-before 'patch-source-shebangs 'patch-fixed-paths
+                 (lambda _
+                   (substitute* '("gettext-tools/config.h.in"
+                                  "gettext-tools/gnulib-tests/init.sh"
+                                  "gettext-tools/tests/init.sh"
+                                  "gettext-tools/system-tests/run-test")
+                     (("/bin/sh") "sh"))
+                   (substitute* '("gettext-tools/src/project-id"
+                                  "gettext-tools/projects/KDE/trigger"
+                                  "gettext-tools/projects/GNOME/trigger")
+                     (("/bin/pwd") "pwd"))
+                   #t))
+               (add-before 'check 'patch-tests
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   (let* ((bash (which "sh")))
+                     ;; Some of the files we're patching are
+                     ;; ISO-8859-1-encoded, so choose it as the default
+                     ;; encoding so the byte encoding is preserved.
+                     (with-fluids ((%default-port-encoding #f))
+                       (substitute*
+                           (find-files "gettext-tools/tests"
+                                       "^(lang-sh|msg(exec|filter)-[0-9])")
+                         (("#![[:blank:]]/bin/sh")
+                          (format #f "#!~a" bash)))
 
-               (substitute* (cons "gettext-tools/src/msginit.c"
-                                  (find-files "gettext-tools/gnulib-tests"
-                                              "posix_spawn"))
-                 (("/bin/sh")
-                  bash))
+                       (substitute* (cons "gettext-tools/src/msginit.c"
+                                          (find-files 
"gettext-tools/gnulib-tests"
+                                                      "posix_spawn"))
+                         (("/bin/sh")
+                          bash))
 
-               (substitute* "gettext-tools/src/project-id"
-                 (("/bin/pwd")
-                  "pwd"))
+                       (substitute* "gettext-tools/src/project-id"
+                         (("/bin/pwd")
+                          "pwd"))
 
-               #t)))))
+                       #t)))))
 
        ;; When tests fail, we want to know the details.
-       #:make-flags '("VERBOSE=yes"
-                      ,@(if (hurd-target?)
-                            ;; Linking to libgettextlib.so makes test-raise 
fail
-                            '("XFAIL_TESTS=test-raise")
-                            '()))))
+       #:make-flags #~'("VERBOSE=yes"
+                        #$@(if (hurd-target?)
+                               ;; Linking to libgettextlib.so makes test-raise 
fail
+                               '("XFAIL_TESTS=test-raise")
+                               '()))))
     (home-page "https://www.gnu.org/software/gettext/";)
     (synopsis
      "Tools and documentation for translation (used to build other packages)")
@@ -143,16 +144,16 @@ translated messages from the catalogs.  Nearly all GNU 
packages use Gettext.")
     (arguments
      (substitute-keyword-arguments (package-arguments gettext-minimal)
        ((#:phases phases)
-        `(modify-phases ,phases
-           (add-after 'install 'add-emacs-autoloads
-             (lambda* (#:key outputs #:allow-other-keys)
-               ;; Make 'po-mode' and other things available by default.
-               (with-directory-excursion
-                   (string-append (assoc-ref outputs "out")
-                                  "/share/emacs/site-lisp")
-                 (symlink "start-po.el" "gettext-autoloads.el")
-                 #t)))))))
-    (native-inputs `(("emacs" ,emacs-minimal))) ; for Emacs tools
+        #~(modify-phases #$phases
+            (add-after 'install 'add-emacs-autoloads
+              (lambda* (#:key outputs #:allow-other-keys)
+                ;; Make 'po-mode' and other things available by default.
+                (with-directory-excursion
+                    (string-append (assoc-ref outputs "out")
+                                   "/share/emacs/site-lisp")
+                  (symlink "start-po.el" "gettext-autoloads.el")
+                  #t)))))))
+    (native-inputs `(("emacs" ,emacs-minimal)))   ; for Emacs tools
     (synopsis "Tools and documentation for translation")))
 
 (define-public libtextstyle



reply via email to

[Prev in Thread] Current Thread [Next in Thread]