diff options
author | Maxim Cournoyer <[email protected]> | 2022-01-25 23:36:11 -0500 |
---|---|---|
committer | Maxim Cournoyer <[email protected]> | 2022-01-25 23:48:37 -0500 |
commit | 0d41fe4855588fb659b8adafe215d5573517a79b (patch) | |
tree | 38b274bd03375f4fa5b7d3a9fb3f64a19786bef2 /gnu/packages/gettext.scm | |
parent | 7c57821c68d199ad56a8ed750b36eccc7ef238dd (diff) | |
parent | 1a5302435ff0d2822b823f5a6fe01faa7a85c629 (diff) |
Merge branch 'staging' into core-updates.
With "conflicts" resolved in (mostly in favor of master/staging):
gnu/packages/admin.scm
gnu/packages/gnuzilla.scm
gnu/packages/gtk.scm
gnu/packages/kerberos.scm
gnu/packages/linux.scm
guix/lint.scm
Diffstat (limited to 'gnu/packages/gettext.scm')
-rw-r--r-- | gnu/packages/gettext.scm | 121 |
1 files changed, 62 insertions, 59 deletions
diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm index e20d4d1427..d606acf798 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,62 @@ ;; 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))))) + ;; Work around Gnulib test failures on armhf-linux. + #$@(if (target-arm32?) + #~((with-directory-excursion "gettext-tools" + (invoke "patch" "--force" "-p1" "-i" + #$(local-file + (search-patch + "coreutils-gnulib-tests.patch"))))) + '()) + + #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 +153,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 @@ -249,13 +259,6 @@ from Markdown files.") `("PERL5LIB" ":" prefix (,path)))) (find-files bin "\\.*$")) #t))) - (add-before 'reset-gzip-timestamps 'make-compressed-files-writable - (lambda* (#:key outputs #:allow-other-keys) - (for-each make-file-writable - (find-files (string-append (assoc-ref outputs "out") - "/share/man") - ".*\\.gz$")) - #t)) (add-after 'unpack 'patch-docbook-xml (lambda* (#:key inputs #:allow-other-keys) (substitute* (find-files "." ".*\\.xml(-good)?") |