From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id ECRtIuru7WAobAEAgWs5BA (envelope-from ) for ; Tue, 13 Jul 2021 21:52:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id CFQcHuru7WB1LgAAB5/wlQ (envelope-from ) for ; Tue, 13 Jul 2021 19:52:10 +0000 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 28B3D7AB2 for ; Tue, 13 Jul 2021 21:52:10 +0200 (CEST) Received: from localhost ([::1]:49282 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3ORt-0005DV-57 for larch@yhetil.org; Tue, 13 Jul 2021 15:52:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56626) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3ORm-0005CE-BP for guix-patches@gnu.org; Tue, 13 Jul 2021 15:52:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58788) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m3ORm-0005WW-4B for guix-patches@gnu.org; Tue, 13 Jul 2021 15:52:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m3ORm-0000zV-4F for guix-patches@gnu.org; Tue, 13 Jul 2021 15:52:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49551] [PATCH] gnu: mg: Enable cross-compilation. Resent-From: Pierre Langlois Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 13 Jul 2021 19:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49551 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49551@debbugs.gnu.org X-Debbugs-Original-To: Guix-patches Received: via spool by submit@debbugs.gnu.org id=B.16262059003779 (code B ref -1); Tue, 13 Jul 2021 19:52:01 +0000 Received: (at submit) by debbugs.gnu.org; 13 Jul 2021 19:51:40 +0000 Received: from localhost ([127.0.0.1]:42101 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3ORL-0000yo-6G for submit@debbugs.gnu.org; Tue, 13 Jul 2021 15:51:39 -0400 Received: from lists.gnu.org ([209.51.188.17]:35940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3ORK-0000yh-Bg for submit@debbugs.gnu.org; Tue, 13 Jul 2021 15:51:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3ORK-0004dO-2S for guix-patches@gnu.org; Tue, 13 Jul 2021 15:51:34 -0400 Received: from mout.gmx.net ([212.227.17.20]:36043) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3ORH-0005Cs-96 for guix-patches@gnu.org; Tue, 13 Jul 2021 15:51:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1626205889; bh=89we1fW7VALpBrKr8FSukccRx9GIN7ZeZSFbEHdxIF8=; h=X-UI-Sender-Class:From:To:Subject:Date; b=cfk/JxloWH9b3QCVJxMIH3RZoKPpKZG8WkkXNHb7VJO3CpjvNa+dWELBnjxWskIKB NfEMvmaRrTy/3BNiqxceQS52BwaI435GOBi9z8BpViNWv4FRDr/M40vvWv2asSX0RY jKcgRLl2dVW0omCB+InoCuzVyXW3HqWbhkYfIiac= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from labiere ([82.69.64.142]) by mail.gmx.net (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1MmlTC-1lKfR90LQ6-00julA for ; Tue, 13 Jul 2021 21:51:29 +0200 User-agent: mu4e 1.4.15; emacs 27.2 From: Pierre Langlois Date: Tue, 13 Jul 2021 20:51:28 +0100 Message-ID: <871r82m1q7.fsf@gmx.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Provags-ID: V03:K1:2Ayip7rSj8OhtvXZT6T1Fucb0/X97iF3UaanGpLMw2v9Nq5/HA7 A4ARJaa5EpqzIJg8VNsT+n+5H7JUYiVsMLc6oLwgkIiHgQB5t5sG9c0lG/3L/8pu+FV1LS/ usaPhIgb/8PqlzzBfe8+bdxBhIxY92wDWZXj+ZrgpcvfjMocwvZMpUROwMwoghTZbYu2mE8 +M9LoFpqY/f71FVsZC6hg== X-UI-Out-Filterresults: notjunk:1;V03:K0:vPpTObq/h5w=:vtdB73kiSn0qGfHIw/n6IP gtLqu5oW1pSAwYE6ibPVanTGmGXMU/mSgLfKdeG2iyQPZr0rCW8HQaJkPSM+ri9nfmdlPyIWC CMegt8MC5IgJOpKc0mIusTFN0G/UKGdcq/e4Fr98m+xYjgHRb6onqf3YrVJ5FPvWYWzvtVMQq AsxVedaSPRnsd4A6KSSmLPCG/YV/XbB6Z0GQ0o67/y2Kp3YcWHcJM1Q12ZEvviEev7w+Uq9q4 zNL5sP0fXbNU7Acc8j9lgLMmZmscZIEJV1NU5NQHm4fD/nyZ5E/OPWZvd8rcpZyV/SjgPItuw xwVSpbdO+bhh8euIT1a70Ed2mnmW5yRzsXi7OSt3dwibWZ37EQatCxhu7OCPMIo6CgrYpuok0 x2JqspUkUnGWr/BfNKZYCnOOzws3BSHrcT4u3pCPGgS6DEfF8hNzNNTedtXSOQjB9XGRiGctS MaonMT6t4hIU9InsKj/rl7raFXjZXfbrhMlqYnFj1sEu1NCpk/6wKJmXyYPAavLRS0OqI//KB mk4sn19RHr58mOPlrrnbZdRCO9BbGylNm8t5U46T/d3yNvQYvEQTgJ7a48lYuK16Hc/WWGCLL lEFAp9iNtayk2Ov/Ngu27W7fMynIT/uCxmc+Dx5VAJpsnSJLdVjlxQlvZ7pfSKbXKCECk48XX FD59VbT4q9SDq0Q/n0gj5DU6wPUetz5HugldReQ5A6boejCWeWNdW24Y7iFMg5IW0xs9iiF3N fVOBH8bdJziAj3tu64TJz4gI8A21zyV3/TBGWYq26xlLuwXp+4PpDedwqNOnM9uM4o1DTwphH 4wOYMb6kny1Rxf6iLWBUceL1JEaSqBLw7r95Kkw4vuU7TOPGLvXarCGUJ6ZJlvy/GPm/YnQUB FSVh7KRsUw2B+Y6FaC8Geb9TD3OCwuceKA8gBDSjpW4zx4peJz01kHVPmsEU3+l/yB3+FyvH1 e+APzMNolrYHfbRXcBSotocb8g8y1QR5pDdztFaOa/90P5qTvlX8akxtQUmMfG6yEA69voGna n6HxqvdL9ZPi/mrqAak9dFF3LCy9GBCzoReVWM90rDHSMmgogtXxWCK4pVskO9NLMkkbiyzJJ RSILypvuOrpiCtipsGsR4eh2+iEzQJMQ235sv7kbDu3pT3IfpfUlIWMNg== Received-SPF: pass client-ip=212.227.17.20; envelope-from=pierre.langlois@gmx.com; helo=mout.gmx.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1626205930; 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:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=JAwAzy8CWPeXU/Ifq49F9iixJ93ChZz2h6D7fkE7p9g=; b=lMEWcsc8OwBR5IuzXmmCcFxFoQ5uksdHGzTW5RUkN4KaToqFBKahlKb+CeDzV+E1emzlBD eZFgsFdgZNCPf0+vqJqKIYxpDOPfck59FeOLQiTl/wFbJDePalWJbYlTwNcP2r+QrWOl6F 049R7yiQfxu6ppZhhLu21tKh/La8NHggEf+H1S71z4z2Oa5V6YYv7eC0seRJv+Dv7wpI2a RL44Zxa4RY2ViGBRjiX8jwwL2Kb0lUYG/2P3xiMudPb7WVo049DFM/2m5+X51mhnPbPjHz A9g5D/mD5my+aPatU53zRpGrrKLG//k6SKzCWvFDcYlSUbPjHWfgwFCMYVHEXw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626205930; a=rsa-sha256; cv=none; b=fG5RBAEV/9zXHmdRBKGyw8EoipN2lHyVZxZNX6eM+WzrYs0dR8H5Cdvgq/ecRzM96N7odb ns9hKtgWmeT8u4KSYXDrBhxa2GCuRIzUuexsMLZNd89oiF/LrX7b8J/ECRhWkhnFvo0Ogd Jz4ZAoQJMyqVwIRQDsXlr0UhgK/uJmwFafVx4rJMxSNMc1OeT8K4GcRb/REbgI5Au1EhUH q0yDeC6bGiyPRznyX03OO9qe23nK74TfnYdB09hfjbLdp1YrlYQWZzkYK3L1Q9v4y5qJbU QBt16CXMrh2m8JHJKoak7xuTF2JeQ11YotJD2TW2SpMDolwnJk98CllwrOr8Ww== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b="cfk/Jxlo"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmx.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -3.40 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmx.net header.s=badeba3b8450 header.b="cfk/Jxlo"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmx.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 28B3D7AB2 X-Spam-Score: -3.40 X-Migadu-Scanner: scn0.migadu.com X-TUID: Ke3Kw3b8DsSj --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain Hi Guix! I was trying to revive my pinebook pro over the weekend, and realised we needed to cross-compile mg in order to get an inital bare-bones image. OK to apply? I also removed the #t from the phases, hopefully that's OK, I'm not sure if this sort of transition should be done incrementally or all at once. Thanks, Pierre --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAmDt7sAYHHBpZXJyZS5s YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31U4/8H/3IkD4GfyFWuwMpNzrQ/d9Pr LB/RqhxMhvfoXAi5RFkf9/7AJc6/4c3y4HjhYBfutBE6xl10IQ3qj3WZV+VBDm7P TfVgSDoKSISrcF7d5yhhRE72fgn7ttkHtRMw9Ps9EG/Y9WwxfyXC4tZCMeBLX2Ui btypb6izI48oGc9xHOJnkOjhnb9fkjsAaqF5fNo1ZUiPGyjfTrJb290jAZmoBh9E yPxyGKLqL8ghKQTcvrzH7L6zvRBHxio65eaGJ6WAb8qRfEL8ScHPJmuN2pGrpv1N pMAcqLZYopQ69xEeu+SHFTOM7u1qGuGrjW0MW5JIGWc4IFz8SYeSzu1WNx87Q54= =33Ry -----END PGP SIGNATURE----- --==-=-=-- --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: attachment; filename=0001-gnu-mg-Enable-cross-compilation.patch Content-Transfer-Encoding: quoted-printable >From 9bf02578c486cd4e65ab5faf30c86f972f05f300 Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Tue, 13 Jul 2021 20:17:51 +0100 Subject: [PATCH] gnu: mg: Enable cross-compilation. * gnu/packages/text-editors.scm (mg)[arguments]: Use cc-for-target. Add phase to substitute pkg-config with the target's pkg-config. --- gnu/packages/text-editors.scm | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/gnu/packages/text-editors.scm b/gnu/packages/text-editors.scm index 965ed6b9e7..11332fab0b 100644 --- a/gnu/packages/text-editors.scm +++ b/gnu/packages/text-editors.scm @@ -15,6 +15,7 @@ ;;; Copyright =C2=A9 2020 Maxime Devos ;;; Copyright =C2=A9 2021 aecepoglu ;;; Copyright =C2=A9 2021 Leo Famulari +;;; Copyright =C2=A9 2021 Pierre Langlois ;;; ;;; This file is part of GNU Guix. ;;; @@ -527,28 +528,32 @@ Wordstar-, EMACS-, Pico, Nedit or vi-like key binding= s. e3 can be used on ("ncurses" ,ncurses))) (arguments ;; No test suite available. - '(#:tests? #f + `(#:tests? #f #:make-flags (list (string-append "prefix=3D" %output) - "CC=3Dgcc") + (string-append "CC=3D" ,(cc-for-target))) #:phases (modify-phases %standard-phases (delete 'configure) ; no configure script (add-before 'build 'correct-location-of-difftool (lambda _ (substitute* "buffer.c" (("/usr/bin/diff") - (which "diff"))) - #t)) + (which "diff"))))) + (add-before 'build 'pkg-config-for-cross-compiling-target + (lambda _ + (substitute* "GNUmakefile" + (("pkg-config") + (or (which "pkg-config") + (string-append ,(%current-target-system) + "-pkg-config")))))) (add-before 'install 'patch-tutorial-location (lambda* (#:key outputs #:allow-other-keys) (substitute* "mg.1" - (("/usr") (assoc-ref outputs "out"))) - #t)) + (("/usr") (assoc-ref outputs "out"))))) (add-after 'install 'install-tutorial (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (doc (string-append out "/share/doc/mg"))) - (install-file "tutorial" doc) - #t)))))) + (install-file "tutorial" doc))))))) (home-page "https://homepage.boetes.org/software/mg/") (synopsis "Microscopic GNU Emacs clone") (description --=20 2.32.0 --=-=-=--