[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
134/176: gnu: mescc-tools-boot: Use gnu-build-system.
From: |
Jan Nieuwenhuizen |
Subject: |
134/176: gnu: mescc-tools-boot: Use gnu-build-system. |
Date: |
Fri, 31 Aug 2018 11:20:28 -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
- 67/176: Revert "gnu: binutils-boot: Update to 2.30.", (continued)
- 67/176: Revert "gnu: binutils-boot: Update to 2.30.", Jan Nieuwenhuizen, 2018/08/31
- 106/176: Revert: gnu: binutils-boot0: Inject AR, LD from bootstrap-binaries., Jan Nieuwenhuizen, 2018/08/31
- 156/176: Revert "gnu: Add %bootstrap-make.", Jan Nieuwenhuizen, 2018/08/31
- 133/176: bootstrap: Move mes seeds to bootstrap.scm, Jan Nieuwenhuizen, 2018/08/31
- 122/176: gnu: tcc-boot: Revise dependencies., Jan Nieuwenhuizen, 2018/08/31
- 117/176: gnu: Remove gcc-mesboot-4.1.0., Jan Nieuwenhuizen, 2018/08/31
- 125/176: gnu: glibc-mesboot: Revise dependencies., Jan Nieuwenhuizen, 2018/08/31
- 120/176: gnu: mes-boot: Update to 0.16.1; revise dependencies., Jan Nieuwenhuizen, 2018/08/31
- 123/176: gnu: binutils-mesboot0: Revise dependencies., Jan Nieuwenhuizen, 2018/08/31
- 153/176: bootstrap: Remove dependency on %bootstrap-make, %bootstrap-diffutils., Jan Nieuwenhuizen, 2018/08/31
- 134/176: gnu: mescc-tools-boot: Use gnu-build-system.,
Jan Nieuwenhuizen <=
- 124/176: gnu: gcc-core-mesboot: Revise dependencies., Jan Nieuwenhuizen, 2018/08/31
- 132/176: gnu: tcc-boot0: Update for mes 0.17., Jan Nieuwenhuizen, 2018/08/31
- 143/176: gnu: Add %bootstrap-linux-libre-headers., Jan Nieuwenhuizen, 2018/08/31
- 147/176: gnu: %tinycc-seed: Update for mes 0.18. WIP, Jan Nieuwenhuizen, 2018/08/31
- 158/176: gnu: Add make-mesboot0 3.80, Jan Nieuwenhuizen, 2018/08/31
- 170/176: gnu: binutils-boot0: Export (for testing)., Jan Nieuwenhuizen, 2018/08/31
- 173/176: gnu: libstdc++-boot0: Export (for testing)., Jan Nieuwenhuizen, 2018/08/31
- 155/176: Revert "gnu: Add %diffutils-static, %diffutils-static-stripped, %diffutils-bootstrap-tarball.", Jan Nieuwenhuizen, 2018/08/31
- 149/176: gnu: tcc-boot: Update for mes 0.18. WIP, Jan Nieuwenhuizen, 2018/08/31
- 141/176: gnu: Add %bootstrap-diffutils., Jan Nieuwenhuizen, 2018/08/31