guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: mg: Enable cross-compilation.


From: guix-commits
Subject: branch master updated: gnu: mg: Enable cross-compilation.
Date: Wed, 14 Jul 2021 05:00:50 -0400

This is an automated email from the git hooks/post-receive script.

planglois pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 681a0c7  gnu: mg: Enable cross-compilation.
681a0c7 is described below

commit 681a0c75182e3f5cc5d8dba063451a96d64fa23c
Author: Pierre Langlois <pierre.langlois@gmx.com>
AuthorDate: Tue Jul 13 20:17:51 2021 +0100

    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.
    Remote #t return from phases.
---
 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 965ed6b..11332fa 100644
--- a/gnu/packages/text-editors.scm
+++ b/gnu/packages/text-editors.scm
@@ -15,6 +15,7 @@
 ;;; Copyright © 2020 Maxime Devos <maximedevos@telenet.be>
 ;;; Copyright © 2021 aecepoglu <aecepoglu@fastmail.fm>
 ;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
+;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
 ;;;
 ;;; 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]