gnu: mes: Prepare for non-x86 architectures.

* gnu/packages/mes.scm (mes)[native-inputs]: Change i686-linux-binutils and
i686-linux-gcc conditional inclusion.
This commit is contained in:
Danny Milosavljevic 2019-05-15 18:53:36 +02:00
parent 07592c77a6
commit 0a01bb55a6
No known key found for this signature in database
GPG key ID: E71A35542C30BAA5

View file

@ -60,46 +60,48 @@ (define-public nyacc
(license (list gpl3+ lgpl3+)))) (license (list gpl3+ lgpl3+))))
(define-public mes (define-public mes
(let ((triplet "i686-unknown-linux-gnu")) (package
(package (name "mes")
(name "mes") (version "0.19")
(version "0.19") (source (origin
(source (origin (method url-fetch)
(method url-fetch) (uri (string-append "mirror://gnu/mes/"
(uri (string-append "mirror://gnu/mes/" "mes-" version ".tar.gz"))
"mes-" version ".tar.gz")) (sha256
(sha256 (base32
(base32 "15h4yhaywdc0djpjlin2jz1kzahpqxfki0r0aav1qm9nxxmnp1l0"))))
"15h4yhaywdc0djpjlin2jz1kzahpqxfki0r0aav1qm9nxxmnp1l0")))) (build-system gnu-build-system)
(build-system gnu-build-system) (supported-systems '("i686-linux" "x86_64-linux"))
(supported-systems '("i686-linux" "x86_64-linux")) (propagated-inputs
(propagated-inputs `(("mescc-tools" ,mescc-tools)
`(("mescc-tools" ,mescc-tools) ("nyacc" ,nyacc)))
("nyacc" ,nyacc))) (native-inputs
(native-inputs `(("guile" ,guile-2.2)
`(("guile" ,guile-2.2) ,@(let ((target-system (or (%current-target-system)
,@(if (not (string-prefix? "i686-linux" (or (%current-target-system) (%current-system))))
(%current-system)))) (cond
;; Use cross-compiler rather than #:system "i686-linux" to get ((string-prefix? "x86_64-linux" target-system)
;; MesCC 64 bit .go files installed ready for use with Guile. ;; Use cross-compiler rather than #:system "i686-linux" to get
`(("i686-linux-binutils" ,(cross-binutils triplet)) ;; MesCC 64 bit .go files installed ready for use with Guile.
("i686-linux-gcc" ,(cross-gcc triplet))) `(("i686-linux-binutils" ,(cross-binutils "i686-unknown-linux-gnu"))
'()) ("i686-linux-gcc" ,(cross-gcc "i686-unknown-linux-gnu"))))
("graphviz" ,graphviz) (else
("help2man" ,help2man) '())))
("perl" ,perl) ; build-aux/gitlog-to-changelog ("graphviz" ,graphviz)
("texinfo" ,texinfo))) ("help2man" ,help2man)
(arguments ("perl" ,perl) ; build-aux/gitlog-to-changelog
`(#:strip-binaries? #f)) ; binutil's strip b0rkes MesCC/M1/hex2 binaries ("texinfo" ,texinfo)))
(synopsis "Scheme interpreter and C compiler for full source bootstrapping") (arguments
(description `(#:strip-binaries? #f)) ; binutil's strip b0rkes MesCC/M1/hex2 binaries
"GNU Mes--Maxwell Equations of Software--brings the Reduced Binary Seed (synopsis "Scheme interpreter and C compiler for full source bootstrapping")
(description
"GNU Mes--Maxwell Equations of Software--brings the Reduced Binary Seed
bootstrap to Guix and aims to help create full source bootstrapping for bootstrap to Guix and aims to help create full source bootstrapping for
GNU/Linux distributions. It consists of a mutual self-hosting Scheme GNU/Linux distributions. It consists of a mutual self-hosting Scheme
interpreter in C and a Nyacc-based C compiler in Scheme and is compatible with interpreter in C and a Nyacc-based C compiler in Scheme and is compatible with
Guile.") Guile.")
(home-page "https://gnu.org/software/mes") (home-page "https://gnu.org/software/mes")
(license gpl3+)))) (license gpl3+)))
(define-public mescc-tools (define-public mescc-tools
(package (package