aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorJanneke Nieuwenhuizen <janneke@gnu.org>2024-11-11 13:28:58 +0100
committerJanneke Nieuwenhuizen <janneke@gnu.org>2024-12-03 08:39:01 +0100
commitf905df43babbb5696526579d19996cdbbd7ff2e1 (patch)
tree5eecf6af4f4d1636a4a5202adfe421d28badf379 /gnu/packages
parentbe81d464728cf95e015e5a89a833d9d464d39442 (diff)
downloadguix-f905df43babbb5696526579d19996cdbbd7ff2e1.tar.gz
guix-f905df43babbb5696526579d19996cdbbd7ff2e1.zip
gnu: gettext: Fix cross-build shebangs.
This fixes running autopoint from a cross-built gettext[-minimal]. * gnu/packages/gettext.scm (gettext-minimal): When cross-building, add stage "patch-cross-shebangs". Change-Id: I5029a3be0b5cee3c173de66d8f0b027b02c3bc47
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/gettext.scm16
1 files changed, 14 insertions, 2 deletions
diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm
index cabe4f3be9..7862c296bd 100644
--- a/gnu/packages/gettext.scm
+++ b/gnu/packages/gettext.scm
@@ -9,7 +9,7 @@
;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019 Miguel <rosen644835@gmail.com>
-;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2020 EuAndreh <eu@euandre.org>
;;; Copyright © 2022, 2024 gemmaro <gemmaro.dev@gmail.com>
;;; Copyright © 2023 Maxim Cournoyer maxim.cournoyer@gmail.com>
@@ -130,7 +130,19 @@
((" test-tls\\$\\(EXEEXT\\) ") " ")))
'())
- #t)))))
+ #t))))
+ #$@(if (%current-target-system)
+ #~((add-after 'install 'patch-cross-shebangs
+ (lambda _
+ (let ((path (list (string-append #$bash-minimal "/bin"))))
+ (define (patch-cross-shebang file)
+ (patch-shebang file path))
+ (with-directory-excursion
+ (string-append #$output "/bin")
+ (for-each
+ patch-cross-shebang
+ '("autopoint" "gettext.sh" "gettextize")))))))
+ '()))
;; When tests fail, we want to know the details.
#:make-flags #~'("VERBOSE=yes")))