[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
19/70: bootstrap: mes-boot: Use Gash instead of coretutils&co.
From: |
guix-commits |
Subject: |
19/70: bootstrap: mes-boot: Use Gash instead of coretutils&co. |
Date: |
Sun, 15 Dec 2019 08:36:42 -0500 (EST) |
janneke pushed a commit to branch wip-bootstrap
in repository guix.
commit 6e2d34fe045ebc601effe11f90571507a9a4efed
Author: Jan Nieuwenhuizen <address@hidden>
Date: Thu Jan 3 21:50:10 2019 +0100
bootstrap: mes-boot: Use Gash instead of coretutils&co.
* gnu/packages/commencement.scm (mes-boot): Update to 0.21-32-g51c7e5f6f.
Use
Gash instead of coretutils&co.
---
gnu/packages/commencement.scm | 109 +++++++++++++++++++++++-------------------
1 file changed, 61 insertions(+), 48 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 8c7a90d..5dfe80f 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -509,77 +509,90 @@ $MES -e '(mescc)' module/mescc.scm -- \"$@\"
(package
(inherit mes)
(name "mes-boot")
- (version "0.19")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/mes/"
- "mes-" version ".tar.gz"))
- (sha256
- (base32
- "15h4yhaywdc0djpjlin2jz1kzahpqxfki0r0aav1qm9nxxmnp1l0"))))
+ (version "0.21-33-g6d493b90d")
+ (source (bootstrap-origin
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://lilypond.org/janneke/mes/"
+ "mes-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0nr74zyam5n82svjwfbcz2mycj88vvsqab12x0mxv1lm6yqxqmmj")))))
(inputs '())
(propagated-inputs '())
(native-inputs
- `(("mescc-tools" ,%bootstrap-mescc-tools)
- ("nyacc-source" ,(bootstrap-origin
- (package-source nyacc-0.86)))
-
- ("coreutils" , %bootstrap-coreutils&co)
- ("bootstrap-mes" ,%bootstrap-mes)))
+ `(("nyacc-source" ,(bootstrap-origin
+ (origin (inherit (package-source nyacc))
+ (snippet #f))))
+ ("mes" ,%bootstrap-mes-rewired)
+ ("mescc-tools" ,%bootstrap-mescc-tools)
+ ,@(%boot-gash-inputs)))
(arguments
`(#:implicit-inputs? #f
+ #:tests? #f
#:guile ,%bootstrap-guile
#:strip-binaries? #f ; binutil's strip b0rkes MesCC/M1/hex2 binaries
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'unpack-seeds
(lambda _
- (let ((nyacc-source (assoc-ref %build-inputs "nyacc-source"))
- (bootstrap-mes (assoc-ref %build-inputs "bootstrap-mes")))
+ (let ((nyacc-source (assoc-ref %build-inputs "nyacc-source")))
(with-directory-excursion ".."
- (mkdir-p "nyacc-source")
- (invoke "tar" "--strip=1" "-C" "nyacc-source" "-xvf"
nyacc-source)
- (symlink (string-append bootstrap-mes "/share/mes/lib")
"mes-seed"))
- #t)))
+ (invoke "tar" "-xvf" nyacc-source)))))
(replace 'configure
(lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref %outputs "out")))
- (setenv "GUILE" "mes")
- (setenv "GUILE_EFFECTIVE_VERSION" "2.2")
- (setenv "GUILE_LOAD_PATH" "nyacc")
- (symlink (string-append "../nyacc-source/module") "nyacc")
- (invoke "bash" "configure.sh"
- (string-append "--prefix=" out)))))
+ (let ((out (assoc-ref %outputs "out"))
+ (gash (assoc-ref %build-inputs "bash"))
+ (mes (assoc-ref %build-inputs "mes"))
+ (dir (with-directory-excursion ".." (getcwd))))
+ (setenv "AR" (string-append "gash " (getcwd) "/scripts/mesar"))
+ (setenv "BASH" (string-append gash "/bin/bash"))
+ (setenv "CC" (string-append mes "/bin/mescc"))
+ (setenv "GUILE_LOAD_PATH"
+ (string-append
+ mes "/share/mes/module"
+ ":" dir "/nyacc-0.99.0/module"
+ ":" (getenv "GUILE_LOAD_PATH")))
+ (invoke "gash" "configure.sh"
+ (string-append "--prefix=" out)
+ (string-append "--host=i686-linux-gnu")))))
(replace 'build
(lambda _
- (let ((mes (assoc-ref %build-inputs "bootstrap-mes")))
- (setenv "MES_PREFIX" (string-append mes "/share/mes"))
- (setenv "MES_ARENA" "100000000")
- (setenv "MES_MAX_ARENA" "100000000")
- (setenv "MES_STACK" "10000000")
- (invoke "sh" "bootstrap.sh"))))
- (replace 'check
- (lambda _
- (setenv "DIFF" "sh scripts/diff.scm")
- ;; fail fast tests
- ;; (invoke "sh" "-x" "build-aux/test.sh" "scaffold/tests/t")
- ;; (invoke "sh" "-x" "build-aux/test.sh"
"scaffold/tests/63-struct-cell")
- (invoke "sh" "check.sh")))
+ (invoke "sh" "bootstrap.sh")))
+ (delete 'check)
(replace 'install
(lambda _
- (invoke "sh" "install.sh"))))))
+ (substitute* "install.sh" ; show some progress
+ ((" -xf") " -xvf")
+ (("^( *)((cp|mkdir|tar) [^']*[^\\])\n" all space cmd)
+ (string-append space "echo '" cmd "'\n"
+ space cmd "\n")))
+ (invoke "sh" "install.sh")
+ ;; Keep ASCII output, for friendlier comparison and bisection
+ (let* ((out (assoc-ref %outputs "out"))
+ (cache (string-append out "/lib/cache")))
+ (define (objects-in-dir dir)
+ (find-files dir
+ (lambda (name stat)
+ (and (equal? (dirname name) dir)
+ (or (string-suffix? ".o" name)
+ (string-suffix? ".s" name))))))
+ (for-each (lambda (x) (install-file x cache))
+ (append (objects-in-dir ".")
+ (objects-in-dir "mescc-lib"))))
+ #t)))))
(native-search-paths
- ;; Use the language-specific variables rather than 'CPATH' because they
- ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
- ;; The intent is to allow headers that are in the search path to be
- ;; treated as "system headers" (headers exempt from warnings) just like
- ;; the typical /usr/include headers on an FHS system.
(list (search-path-specification
(variable "C_INCLUDE_PATH")
- (files '("share/mes/include")))
+ (files '("include")))
(search-path-specification
(variable "LIBRARY_PATH")
- (files '("share/mes/lib")))))))
+ (files '("lib")))
+ (search-path-specification
+ (variable "MES_PREFIX")
+ (separator #f)
+ (files '("")))))))
+
(define tcc-boot0
;; Pristine tcc cannot be built by MesCC, we are keeping a delta of 11
- 34/70: bootstrap: gcc-mesboot0: Use Gash instead of coretutils&co., (continued)
- 34/70: bootstrap: gcc-mesboot0: Use Gash instead of coretutils&co., guix-commits, 2019/12/15
- 40/70: bootstrap: Add gawk-mesboot., guix-commits, 2019/12/15
- 43/70: bootstrap: Add bash-mesboot., guix-commits, 2019/12/15
- 49/70: bootstrap: glibc-mesboot: Use Gash instead of coreutils&co., guix-commits, 2019/12/15
- 53/70: bootstrap: gcc-mesboot-wrapper: Use Gash instead of coreutils&co., guix-commits, 2019/12/15
- 42/70: bootstrap: Add gcc-core-mesboot1., guix-commits, 2019/12/15
- 55/70: bootstrap: Remove m4-mesboot., guix-commits, 2019/12/15
- 54/70: bootstrap: Add coreutils-mesboot., guix-commits, 2019/12/15
- 62/70: bootstrap: Add patch-boot0., guix-commits, 2019/12/15
- 70/70: bootstrap: %bootstrap-tarballs: Remove %bootstrap-binaries-tarball., guix-commits, 2019/12/15
- 19/70: bootstrap: mes-boot: Use Gash instead of coretutils&co.,
guix-commits <=
- 66/70: bootstrap: Add coreutils-boot0., guix-commits, 2019/12/15
- 63/70: bootstrap: Add bzip2-boot0., guix-commits, 2019/12/15
- 68/70: bootstrap: patch-boot0: Remove ed dependency., guix-commits, 2019/12/15
- 69/70: bootstrap: static-bash-for-bootstrap: Use static-bash., guix-commits, 2019/12/15
- 60/70: gnu: Add ed-1.4., guix-commits, 2019/12/15
- 67/70: bootstrap: coreutils-final: Inherit from coreutils-minimal., guix-commits, 2019/12/15
- 64/70: bootstrap: Add tar-boot0., guix-commits, 2019/12/15