mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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.
This commit is contained in:
parent
14bf5890c3
commit
681a0c7518
1 changed files with 13 additions and 8 deletions
|
@ -15,6 +15,7 @@
|
||||||
;;; Copyright © 2020 Maxime Devos <maximedevos@telenet.be>
|
;;; Copyright © 2020 Maxime Devos <maximedevos@telenet.be>
|
||||||
;;; Copyright © 2021 aecepoglu <aecepoglu@fastmail.fm>
|
;;; Copyright © 2021 aecepoglu <aecepoglu@fastmail.fm>
|
||||||
;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
|
;;; Copyright © 2021 Leo Famulari <leo@famulari.name>
|
||||||
|
;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; 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)))
|
("ncurses" ,ncurses)))
|
||||||
(arguments
|
(arguments
|
||||||
;; No test suite available.
|
;; No test suite available.
|
||||||
'(#:tests? #f
|
`(#:tests? #f
|
||||||
#:make-flags (list (string-append "prefix=" %output)
|
#:make-flags (list (string-append "prefix=" %output)
|
||||||
"CC=gcc")
|
(string-append "CC=" ,(cc-for-target)))
|
||||||
#:phases (modify-phases %standard-phases
|
#:phases (modify-phases %standard-phases
|
||||||
(delete 'configure) ; no configure script
|
(delete 'configure) ; no configure script
|
||||||
(add-before 'build 'correct-location-of-difftool
|
(add-before 'build 'correct-location-of-difftool
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "buffer.c"
|
(substitute* "buffer.c"
|
||||||
(("/usr/bin/diff")
|
(("/usr/bin/diff")
|
||||||
(which "diff")))
|
(which "diff")))))
|
||||||
#t))
|
(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
|
(add-before 'install 'patch-tutorial-location
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(substitute* "mg.1"
|
(substitute* "mg.1"
|
||||||
(("/usr") (assoc-ref outputs "out")))
|
(("/usr") (assoc-ref outputs "out")))))
|
||||||
#t))
|
|
||||||
(add-after 'install 'install-tutorial
|
(add-after 'install 'install-tutorial
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
(doc (string-append out "/share/doc/mg")))
|
(doc (string-append out "/share/doc/mg")))
|
||||||
(install-file "tutorial" doc)
|
(install-file "tutorial" doc)))))))
|
||||||
#t))))))
|
|
||||||
(home-page "https://homepage.boetes.org/software/mg/")
|
(home-page "https://homepage.boetes.org/software/mg/")
|
||||||
(synopsis "Microscopic GNU Emacs clone")
|
(synopsis "Microscopic GNU Emacs clone")
|
||||||
(description
|
(description
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue