aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-01-06 12:03:14 +0100
committerLudovic Courtès <ludo@gnu.org>2022-01-06 16:27:30 +0100
commit495ac045a3ced3fe1b0ae888738b08be9c3fc968 (patch)
tree72b7c1501a510507da7304e0e93ae80a2323bfa7
parenta9268216e4f38189d7948cf2ecb51ad2eac7e586 (diff)
downloadguix-495ac045a3ced3fe1b0ae888738b08be9c3fc968.tar.gz
guix-495ac045a3ced3fe1b0ae888738b08be9c3fc968.zip
gnu: gettext: Use gexps for arguments.
* gnu/packages/gettext.scm (gettext-minimal)[arguments]: Use gexps. (gnu-gettext)[arguments]: Likewise.
-rw-r--r--gnu/packages/gettext.scm105
1 files 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