[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
134/160: gnu: mescc-tools-boot: Use gnu-build-system.
From: |
Jan Nieuwenhuizen |
Subject: |
134/160: gnu: mescc-tools-boot: Use gnu-build-system. |
Date: |
Tue, 28 Aug 2018 15:56:37 -0400 (EDT) |
janneke pushed a commit to branch wip-bootstrap
in repository guix.
commit ceef3a8075292a55f5d2d6b113253558c8ec3ffd
Author: Jan Nieuwenhuizen <address@hidden>
Date: Thu Aug 23 17:33:33 2018 +0200
gnu: mescc-tools-boot: Use gnu-build-system.
* gnu/packages/mes.scm (mescc-tools-boot): Use gnu-build-system.
---
gnu/packages/mes.scm | 78 +++++++++++++++++++++++++++++++---------------------
1 file changed, 46 insertions(+), 32 deletions(-)
diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm
index 62857cb..f467667 100644
--- a/gnu/packages/mes.scm
+++ b/gnu/packages/mes.scm
@@ -118,7 +118,7 @@ with a Knight VM that runs Forth and Lisp.")
(license gpl3+))))
(define-public mescc-tools-boot
- (let ((version "0.4")
+ (let ((version "0.4")
(revision "1")
(commit "f02b8f4fda8d0c5c11a1d63a02b2bfdfab55abc5"))
(package-with-bootstrap-guile
@@ -141,38 +141,52 @@ with a Knight VM that runs Forth and Lisp.")
("mes-source" ,(package-source mes-boot))
("mes-seed" ,%mes-seed)))
(supported-systems '("i686-linux" "x86_64-linux"))
- (build-system trivial-build-system)
+ (build-system gnu-build-system)
(arguments
- `(#:modules ((guix build utils))
- #:builder
- (begin
- (use-modules (guix build utils))
- (let* ((coreutils (assoc-ref %build-inputs "coreutils"))
- (source (assoc-ref %build-inputs "source"))
- (mescc-tools-seed (assoc-ref %build-inputs
"mescc-tools-seed"))
- (mes-seed (assoc-ref %build-inputs "mes-seed"))
- (mes-source (assoc-ref %build-inputs "mes-source"))
- (out (assoc-ref %outputs "out"))
- (out/bin (string-append out "/bin")))
- (setenv "PATH" (string-append coreutils "/bin"
- ":" "../mescc-tools-seed"))
- (format (current-error-port) "PATH=~s\n" (getenv "PATH"))
- (mkdir-p "source")
- (system* "tar" "--strip=1" "-C" "source" "-xvf" source)
- (mkdir-p "mescc-tools-seed")
- (system* "tar" "--strip=1" "-C" "mescc-tools-seed" "-xvf"
mescc-tools-seed)
- (mkdir-p "mes-source")
- (system* "tar" "--strip=1" "-C" "mes-source" "-xvf" mes-source)
- (mkdir-p "mes-seed")
- (system* "tar" "--strip=1" "-C" "mes-seed" "-xvf" mes-seed)
- (chdir "source")
- (setenv "PREFIX" out)
- (setenv "MES_PREFIX" "../mes-source")
- (setenv "MESCC_TOOLS_SEED" "../mescc-tools-seed")
- (setenv "MES_SEED" "../mes-seed")
- (and (zero? (system* "sh" "build.sh"))
- (zero? (system* "sh" "check.sh"))
- (zero? (system* "sh" "install.sh")))))))
+ `(#:strip-binaries? #f ; binutil's strip b0rkes MesCC/M1/hex2 binaries
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'unpack-seeds
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((coreutils (assoc-ref %build-inputs "coreutils"))
+ (mescc-tools-seed (assoc-ref %build-inputs
"mescc-tools-seed"))
+ (mes-seed (assoc-ref %build-inputs "mes-seed"))
+ (mes-source (assoc-ref %build-inputs "mes-source"))
+ (out (assoc-ref %outputs "out")))
+ (setenv "PATH" (string-append coreutils "/bin"))
+ (format (current-error-port) "PATH=~s\n" (getenv "PATH"))
+ (with-directory-excursion ".."
+ (and
+ (mkdir-p "mescc-tools-seed")
+ (zero? (system* "tar" "--strip=1" "-C" "mescc-tools-seed"
+ "-xvf" mescc-tools-seed))
+ (mkdir-p "mes-source")
+ (zero? (system* "tar" "--strip=1" "-C" "mes-source"
+ "-xvf" mes-source))
+ (mkdir-p "mes-seed")
+ (zero? (system* "tar" "--strip=1" "-C" "mes-seed"
+ "-xvf" mes-seed)))))))
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;;(use-modules (guix build utils))
+ (let ((coreutils (assoc-ref %build-inputs "coreutils"))
+ (out (assoc-ref %outputs "out")))
+ (setenv "PATH" (string-append coreutils "/bin"
+ ":" "../mescc-tools-seed"))
+ (format (current-error-port) "PATH=~s\n" (getenv "PATH"))
+ (setenv "PREFIX" out)
+ (setenv "MES_PREFIX" "../mes-source")
+ (setenv "MESCC_TOOLS_SEED" "../mescc-tools-seed")
+ (setenv "MES_SEED" "../mes-seed"))))
+ (replace 'build
+ (lambda* (#:key outputs #:allow-other-keys)
+ (zero? (system* "sh" "build.sh"))))
+ (replace 'check
+ (lambda* (#:key outputs #:allow-other-keys)
+ (zero? (system* "sh" "check.sh"))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (zero? (system* "sh" "install.sh")))))))
(description
"Mescc-tools is a collection of tools for use in a full source
bootstrapping process. Currently consists of the M1 macro assembler and the
- 129/160: gnu: %mes-seed: Update for mes 0.17., (continued)
- 129/160: gnu: %mes-seed: Update for mes 0.17., Jan Nieuwenhuizen, 2018/08/28
- 126/160: gnu: gcc-mesboot0: Revise dependencies., Jan Nieuwenhuizen, 2018/08/28
- 131/160: gnu: mes: Update to 0.17., Jan Nieuwenhuizen, 2018/08/28
- 128/160: gnu: gcc-mesboot: Revise dependencies., Jan Nieuwenhuizen, 2018/08/28
- 116/160: gnu: gcc-mesboot0: Package with bootstrap-guile., Jan Nieuwenhuizen, 2018/08/28
- 139/160: gnu: Add %bootstrap-make., Jan Nieuwenhuizen, 2018/08/28
- 144/160: gnu: bootstrap-tarballs: Update inputs for i686-linux., Jan Nieuwenhuizen, 2018/08/28
- 133/160: bootstrap: Move mes seeds to bootstrap.scm, Jan Nieuwenhuizen, 2018/08/28
- 65/160: gnu: binutils-boot: Update to 2.25., Jan Nieuwenhuizen, 2018/08/28
- 135/160: gnu: mes-boot: Use gnu-build-system., Jan Nieuwenhuizen, 2018/08/28
- 134/160: gnu: mescc-tools-boot: Use gnu-build-system.,
Jan Nieuwenhuizen <=
- 125/160: gnu: glibc-mesboot: Revise dependencies., Jan Nieuwenhuizen, 2018/08/28
- 124/160: gnu: gcc-core-mesboot: Revise dependencies., Jan Nieuwenhuizen, 2018/08/28
- 114/160: gnu: gcc-core-mesboot: Package with bootstrap-guile., Jan Nieuwenhuizen, 2018/08/28
- 95/160: gnu: binutils-boot: Update to 2.20.1a., Jan Nieuwenhuizen, 2018/08/28
- 121/160: gnu: tcc-boot0: Revise dependencies., Jan Nieuwenhuizen, 2018/08/28
- 115/160: gnu: glibc-mesboot: Package with bootstrap-guile., Jan Nieuwenhuizen, 2018/08/28
- 112/160: gnu: tcc-boot: Package with bootstrap-guile., Jan Nieuwenhuizen, 2018/08/28
- 97/160: gnu: gcc-boot: build with %cheat-binutils?, Jan Nieuwenhuizen, 2018/08/28
- 120/160: gnu: mes-boot: Update to 0.16.1; revise dependencies., Jan Nieuwenhuizen, 2018/08/28
- 103/160: gnu: glibc-mesboot: Rename from glibc-boot., Jan Nieuwenhuizen, 2018/08/28