From patchwork Tue Jul 13 19:51:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre Langlois X-Patchwork-Id: 31385 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id DC3C027BC82; Tue, 13 Jul 2021 20:52:09 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 616AC27BC6B for ; Tue, 13 Jul 2021 20:52:09 +0100 (BST) Received: from localhost ([::1]:49282 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3ORs-0005DV-63 for patchwork@mira.cbaines.net; Tue, 13 Jul 2021 15:52:08 -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 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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 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 © 2020 Maxime Devos ;;; Copyright © 2021 aecepoglu ;;; Copyright © 2021 Leo Famulari +;;; Copyright © 2021 Pierre Langlois ;;; ;;; This file is part of GNU Guix. ;;; @@ -527,28 +528,32 @@ Wordstar-, EMACS-, Pico, Nedit or vi-like key bindings. e3 can be used on ("ncurses" ,ncurses))) (arguments ;; No test suite available. - '(#:tests? #f + `(#:tests? #f #:make-flags (list (string-append "prefix=" %output) - "CC=gcc") + (string-append "CC=" ,(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 -- 2.32.0