From unknown Sun Jun 22 00:54:48 2025 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-Spam-Flag: NO 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-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= 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 --=-=-=-- From unknown Sun Jun 22 00:54:48 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#49551] [PATCH] gnu: mg: Enable cross-compilation. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 14 Jul 2021 07:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49551 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Pierre Langlois Cc: 49551@debbugs.gnu.org Received: via spool by 49551-submit@debbugs.gnu.org id=B49551.162624698720192 (code B ref 49551); Wed, 14 Jul 2021 07:17:02 +0000 Received: (at 49551) by debbugs.gnu.org; 14 Jul 2021 07:16:27 +0000 Received: from localhost ([127.0.0.1]:42740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3Z87-0005Fb-FT for submit@debbugs.gnu.org; Wed, 14 Jul 2021 03:16:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3Z84-0005FK-2N for 49551@debbugs.gnu.org; Wed, 14 Jul 2021 03:16:25 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60344) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3Z7y-0001WF-El; Wed, 14 Jul 2021 03:16:18 -0400 Received: from [2a01:e0a:19b:d9a0:f2f7:a404:c3d3:f8b4] (port=34694 helo=meije) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Z7y-0003Wm-6w; Wed, 14 Jul 2021 03:16:18 -0400 From: Mathieu Othacehe References: <871r82m1q7.fsf@gmx.com> Date: Wed, 14 Jul 2021 09:16:17 +0200 In-Reply-To: <871r82m1q7.fsf@gmx.com> (Pierre Langlois's message of "Tue, 13 Jul 2021 20:51:28 +0100") Message-ID: <87bl75mkla.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hey Pierre, > 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. Oops missed that when I added mg to the installation image. Your patch looks fine, please go ahead. Thanks, Mathieu From unknown Sun Jun 22 00:54:48 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Pierre Langlois Subject: bug#49551: closed (Re: [bug#49551] [PATCH] gnu: mg: Enable cross-compilation.) Message-ID: References: <87im1dl10y.fsf@gmx.com> <871r82m1q7.fsf@gmx.com> X-Gnu-PR-Message: they-closed 49551 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 49551@debbugs.gnu.org Date: Wed, 14 Jul 2021 09:05:01 +0000 Content-Type: multipart/mixed; boundary="----------=_1626253501-6242-1" This is a multi-part message in MIME format... ------------=_1626253501-6242-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #49551: [PATCH] gnu: mg: Enable cross-compilation. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 49551@debbugs.gnu.org. --=20 49551: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D49551 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1626253501-6242-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 49551-done) by debbugs.gnu.org; 14 Jul 2021 09:04:26 +0000 Received: from localhost ([127.0.0.1]:42851 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3aoc-0001ba-GV for submit@debbugs.gnu.org; Wed, 14 Jul 2021 05:04:26 -0400 Received: from mout.gmx.net ([212.227.17.20]:51107) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3aoY-0001bI-Bm for 49551-done@debbugs.gnu.org; Wed, 14 Jul 2021 05:04:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1626253455; bh=ibV83GAlxBuBtG+F62dQzvJGXt3hucGaboCm9hjDV2Y=; h=X-UI-Sender-Class:References:From:To:Cc:Subject:In-reply-to:Date; b=l1e9OsZR3dh0W0nah+e74LCP2HbWGiKTNWwi9GW5e1A/dgvUtT7xpZyYhPk8y7l0u DA8JUKrEYsmZ/pKS2hA7S3wJi5fnSqaJHajeCs5ZiOR6gnww0dqGfBM7YIeUvG+DY8 JcVsXicwonTiqP/20exeeXja1iIXFZkHLZY7vjaQ= 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 1M6DWi-1m5njr2fpg-006fvo; Wed, 14 Jul 2021 11:04:15 +0200 References: <871r82m1q7.fsf@gmx.com> <87bl75mkla.fsf@gnu.org> User-agent: mu4e 1.4.15; emacs 27.2 From: Pierre Langlois To: Mathieu Othacehe Subject: Re: [bug#49551] [PATCH] gnu: mg: Enable cross-compilation. In-reply-to: <87bl75mkla.fsf@gnu.org> Date: Wed, 14 Jul 2021 10:04:13 +0100 Message-ID: <87im1dl10y.fsf@gmx.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Provags-ID: V03:K1:XaObPaXx8dcoziWD7tITnShVaUu2ZPQeg2bnnINlY+B6qSm++zz lPyYiMiy8Nnu+mpa0BhMVn+2ll6dLLd8Ec5uETOGWi3HKvk+cyDw3/HZedshANJ/g21Vmjs Ek1wLy9c9eBNlDBAlr4Sfn/Z0odw4M5vSJDrk7UCTh7cO7i54wrfjn6Xq+HZHSWj4Uf0dl8 YVsrV51j0wP8MpFF6tnhw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:NhS3vjWXnoM=:0JGDO4cZt+EeMpqtBgUeDC g0xSR3RwTIltTBZieFyLID3EBUFa+ap8Li7mk/7GmobP1vEgUO5SKSr2j+hZ0XdxC9yJkaNAj SxanygJJ8r6aj6GugZFfO358hOFvhAx2JAdyy8josgBpc2NHvPUABCnFA0JIHpNL/FAHJhSVy 0o1U1blqHHvt5jNCuvR4OL9wgs8hRe7whxpv0FxX6sVza28GYv7FQPIjRq/dUtwauVfrs4qPg 1M+GChXwglS/T4JyWxcimFCG04vZH23edVJwFWFIKfk1V84tJu9UTQPfuKvz6S4y5Zp7fxuJl ynZewE0byv+6b+m+aV+Ci2M+1/7QBxXyG022zGVMklP44koRSavvnKYtvYa1py2/V4N28lvfa lUfByJU8QgT2+/W2LTae89UFMjvvSHGHG4FK1yikGn84nOcGq/KpwaFfg9Olh65wRBzPbRIoY 7IruK+tc7zswJ9SeK2iv2iR3O02Bg4V/Z5LYBf3KKFclooyThVwBM0J35d8r7atM5FzIGsO2m I9GSqsjpZeD4OY6KU2UchE6UYaOr9LvvU/YYTjRdVLOgJhQFZtttYuSmsE15ig7fDrA8k5HNA puDDZCPGr7BfvY1yOTuFcDtq+v9EiTSxp2szuxwOq9R38vFfAL8oPtZQQr6nNALX44NxUf5Bo h1MfG6MsYgV07NyPHmE68e1jlkuG9d8gjR2Hs2DRqxKz+zS+em94A9XPFx/g+05zKPEmcUqPC zUPz6YcEvN2nMjFtkagzqXKo5kJbIijI1Ln6/DC4UGRQSe3vpOcYzkZVUr8IbJPSFJQskiKSc YeBcLjphCP/ukKe5j82P86KYfFJkrdEFZVjG/hBPBQiRfsT3vOLuKUHqoeYcV47HEGcjbTUyk ebWp6EK7Vsx11SJRi+7Pa+CzreZUqzew1RxOUZvK0elzKkFqxlMK0nsI/9mOMQ76pLMRdlVlm Td7KRq5Z4YRbU4Dcx+hTGwOt5Q51fUVBLmx7QN14XP5QdLdngr5lcSdrdOnPsd63upf0JJQs5 bxv4QeeRwdatXysptCbZVm1n+5h2Fq4T30z84lnmtU0HOOdS0yVq000m1i2FNgvWjrJXrAA0r tkz9SumJ/YOX0IMergpm1wjcXjR+juoF34DhAOj8iFlt4kJ2i0kZ339kA== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 49551-done Cc: 49551-done@debbugs.gnu.org, Pierre Langlois X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Hi Mathieu, Mathieu Othacehe writes: > Hey Pierre, > >> 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. > > Oops missed that when I added mg to the installation image. Your patch > looks fine, please go ahead. No worries! Pushed with 681a0c75182e3f5cc5d8dba063451a96d64fa23c. Thanks for the review, Pierre --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQFMBAEBCgA2FiEEctU9gYy29KFyWDdMqPyeRH9PfVQFAmDuqI0YHHBpZXJyZS5s YW5nbG9pc0BnbXguY29tAAoJEKj8nkR/T31UpYkIAMGQgxpz6UrKDX3tu+POXxoy SZq1YX7QUtRJfMnslKi4QhegpqMOjxjRShrr1nq6Jb4GQvmTo+8frSilA/qIY6tw 4lZSuCcXwii8TLY4zPcCydnZxz56OSjcGy/GmK1mD8L9JZoVlfKe8lY+SgcSoDrm yCtzKkEYhVLDHB5+JuRdf7M6NmXXD0Jzipdbqh6N7K0QphOPLR85ZwN1y2JZlMVK BXE9vbZ5DTelFdu+cVTCMLG5j/KYkg8e/PzSTREP5seQhEMvmYAg3GGFSgubyk58 G6WHJyxfa/FAxYqEgVaU0ReKh/G7NP+gNtR2GTyGDJuyhMZCF2REy7/vBWCZLtY= =F4C5 -----END PGP SIGNATURE----- --=-=-=-- ------------=_1626253501-6242-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit 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 To: Guix-patches Subject: [PATCH] gnu: mg: Enable cross-compilation. 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-Spam-Flag: NO 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-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= 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 --=-=-=-- ------------=_1626253501-6242-1--