From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <guix-patches-bounces+larch=yhetil.org@gnu.org>
Received: from mp1.migadu.com ([2001:41d0:303:e16b::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms13.migadu.com with LMTPS
	id SFJxMJA3PGdwdQEA62LTzQ:P1
	(envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Tue, 19 Nov 2024 07:00:32 +0000
Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp1.migadu.com with LMTPS
	id SFJxMJA3PGdwdQEA62LTzQ
	(envelope-from <guix-patches-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Tue, 19 Nov 2024 08:00:32 +0100
X-Envelope-To: larch@yhetil.org
Authentication-Results: aspmx1.migadu.com;
	dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=HXh88mfo;
	dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=o7pIBpAK;
	spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org";
	dmarc=pass (policy=none) header.from=gnu.org
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=key1; t=1731999632;
	h=from:from:sender:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc:mime-version:mime-version:
	 content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:resent-cc:
	 resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to:
	 references:references:list-id:list-help:list-unsubscribe:
	 list-subscribe:list-post:dkim-signature;
	bh=vc6TmPsZt9gRfGUT3TPTCxPOTd6Do/TxOPguHB3OS0M=;
	b=cyv2hCBNKwFR05FLBBx2Dh0ZzMiiD8jLXUzjQR6MoxVNQnD89t+lmVveo7jHZqUAtW1FiM
	YwMLeb+bkm3alx8PI3nJ2oYklmtWSMG/yAB5LSH5nSwypMHLkPPCBIJ4nMk1cZpPTdqyf3
	+HtuZGgR00+sfLNnQicPCr/89DRgDJzfbPvn5JXk8UFOQ4UcZma5Q9IjW3vUbs7jsP5w+l
	eY2eForY98LRTZt1aNHne+ku1I0lsJQhznByGoO0sfVLef/sYzaMlcX9Up5h7Qf/cW9/GD
	fRrNu5YRHLD9RZ4atJdTwD+waRUzFrtoYypU8nEgGHuJZS2gpk2yYxswnxsL3g==
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1731999632; a=rsa-sha256; cv=none;
	b=b8sUHKNEW0+48ufZGYiopMePK/2KvMug6dHabTgBana1CtRVE4LXQb5kYFk5hnzEY8Qh1M
	Ew6g0l9fn4cW9hfdLPTRe+A7Dye21FcxBY/SV6xxDhMTrugeXSU/gJzQPKFG1k0Ck4VUJ/
	C9qggsyYyOs+9DPbZrTVeoDac/QfGFWKcIfCX8OJunu0FT+coGJg+gaZmzi9t8jytwvbCT
	a3Lz2J69ngN/1qBXWMLouH851tJAzuz+9NSaYQxKNiG1elH/0u9Gyo5TF0eI8VJVD+USjA
	flFQBSGgE1ggjj8V64SNja1IJ9azFarlaH5lsklNv2n7xX7NdYHKFlP49x6Jbg==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=HXh88mfo;
	dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=o7pIBpAK;
	spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org";
	dmarc=pass (policy=none) header.from=gnu.org
Received: from lists.gnu.org (lists.gnu.org [209.51.188.17])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by aspmx1.migadu.com (Postfix) with ESMTPS id 9A85F79A05
	for <larch@yhetil.org>; Tue, 19 Nov 2024 08:00:32 +0100 (CET)
Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <guix-patches-bounces@gnu.org>)
	id 1tDIDY-0000k7-J2; Tue, 19 Nov 2024 02:00:08 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1tDIDW-0000hL-1I
 for guix-patches@gnu.org; Tue, 19 Nov 2024 02:00:06 -0500
Received: from debbugs.gnu.org ([2001:470:142:5::43])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1tDIDV-0004ge-C0
 for guix-patches@gnu.org; Tue, 19 Nov 2024 02:00:05 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
 d=debbugs.gnu.org; s=debbugs-gnu-org; 
 h=MIME-Version:References:In-Reply-To:Date:From:To:Subject;
 bh=vc6TmPsZt9gRfGUT3TPTCxPOTd6Do/TxOPguHB3OS0M=; 
 b=HXh88mfooJdd/+ZzGkSo7LfxjYXJT0PIzqQINuB0/JJUZR6ozCkEW1rl9FlCzmzaKx+9HWE+6+YJAKzJ97VqER5clOQ3CUo25wbsXvyWUXvR5mCFJqoYV3Q6rsKgFwSbrfRTYoFL9umAEgWb/Mx46sY6DVSaZeqvM3gwNFDKHLt1JH6vdjEJGq37YUkxyjWn9meL0GXb0dR3D52Jh7sePheQO/iMf0tdmomtWHg8qA9khyWW8pQxjaAWs8v84LuiaTHuAoj3nI7ZEVpOrW07diJxebuo3Db3cI/w0gW38dymzUyigw/sDUlAvuI+aZRjBBEvHk7axr3q1bAxHhYS3Q==;
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1tDIDV-0005OW-6H
 for guix-patches@gnu.org; Tue, 19 Nov 2024 02:00:05 -0500
X-Loop: help-debbugs@gnu.org
Subject: [bug#74290] [PATCH v3 45/51] gnu: gettext: Fix cross-build shebangs.
Resent-From: Janneke Nieuwenhuizen <janneke@gnu.org>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: guix-patches@gnu.org
Resent-Date: Tue, 19 Nov 2024 07:00:05 +0000
Resent-Message-ID: <handler.74290.B74290.173199959020577@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 74290
X-GNU-PR-Package: guix-patches
X-GNU-PR-Keywords: patch
To: 74290@debbugs.gnu.org
Received: via spool by 74290-submit@debbugs.gnu.org id=B74290.173199959020577
 (code B ref 74290); Tue, 19 Nov 2024 07:00:05 +0000
Received: (at 74290) by debbugs.gnu.org; 19 Nov 2024 06:59:50 +0000
Received: from localhost ([127.0.0.1]:40657 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1tDIDF-0005Lg-Pv
 for submit@debbugs.gnu.org; Tue, 19 Nov 2024 01:59:50 -0500
Received: from eggs.gnu.org ([209.51.188.92]:43482)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <janneke@gnu.org>) id 1tDICO-0005CE-8h
 for 74290@debbugs.gnu.org; Tue, 19 Nov 2024 01:58:56 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <janneke@gnu.org>)
 id 1tDIAC-00046X-Vx; Tue, 19 Nov 2024 01:56:41 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To:
 From; bh=vc6TmPsZt9gRfGUT3TPTCxPOTd6Do/TxOPguHB3OS0M=; b=o7pIBpAK+DsLPtYzorEM
 tpcRdL3uTIHzZUQYJtL/YSrQVxovPRUn88wI2Dq+zlqoxUEEbfMo/fOtMCZ6vFb4ixFvTie+p38K0
 N/kv1n6tKYodO9qtpZj+t6/0JZHtmW8gS+RFGwWXhTK0nlStTjfAWP2MxykXsAvF8iKLzVo3d3p9O
 OvevAQh47S+naBxLeoNf6nLTV3DuDSMDPUpse5P6Knxnfl8Yl4XAgZ10lfwOhLmg5SruYPC9JScFL
 SggyZKqxcHvAlGYBB7CyGEeSpG8NghQ+ZdqGFtlN+8A43CSAg7AeJtB4yjiAhfkVdutFDoOukPfWM
 HunmlZIDdZLq7g==;
From: Janneke Nieuwenhuizen <janneke@gnu.org>
Date: Tue, 19 Nov 2024 07:55:15 +0100
Message-ID: <fcc0050212ab0f27020523a95213601bde66b51c.1731999203.git.janneke@gnu.org>
X-Mailer: git-send-email 2.46.0
In-Reply-To: <cover.1731999202.git.janneke@gnu.org>
References: <cover.1731999202.git.janneke@gnu.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-BeenThere: guix-patches@gnu.org
List-Id: <guix-patches.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>,
 <mailto:guix-patches-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/guix-patches>
List-Post: <mailto:guix-patches@gnu.org>
List-Help: <mailto:guix-patches-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>,
 <mailto:guix-patches-request@gnu.org?subject=subscribe>
Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org
Sender: guix-patches-bounces+larch=yhetil.org@gnu.org
X-Migadu-Flow: FLOW_IN
X-Migadu-Country: US
X-Migadu-Spam-Score: -6.53
X-Spam-Score: -6.53
X-Migadu-Queue-Id: 9A85F79A05
X-Migadu-Scanner: mx13.migadu.com
X-TUID: +Gg6Vl90eoor

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
---
 gnu/packages/gettext.scm | 16 ++++++++++++++--
 1 file 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 @@ (define-public gettext-minimal
                                    ((" 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")))
-- 
2.46.0