guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

04/04: gnu: mes-boot0: Support Nyacc 0.86.0.


From: Jan Nieuwenhuizen
Subject: 04/04: gnu: mes-boot0: Support Nyacc 0.86.0.
Date: Sun, 9 Sep 2018 02:12:09 -0400 (EDT)

janneke pushed a commit to branch wip-bootstrap
in repository guix.

commit 6fb02eb6d51b0029e8b417e592bff315d18162d0
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Sat Sep 8 15:39:28 2018 +0200

    gnu: mes-boot0: Support Nyacc 0.86.0.
    
    * gnu/packages/commencement.scm (mes-boot0): Support Nyacc 0.86.0.
---
 gnu/packages/commencement.scm               | 87 ++++++++++++-----------------
 gnu/packages/patches/mes-nyacc-0.86.0.patch | 25 +++++++++
 2 files changed, 60 insertions(+), 52 deletions(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 60425fc..612456d 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -86,7 +86,7 @@
 
 (define mes-boot0
   (let ((version "0.17.1")
-        (revision "0")
+        (revision "2")
         (commit #f))
     (package
       (inherit mes)
@@ -102,13 +102,7 @@
                     (sha256
                      (base32
                       "1dfnchrz3fb8x220bz28i6p3ql2xfahk9mzin3vk8lyw45s12r5g")))
-                  (origin
-                    (method url-fetch)
-                    (uri (string-append "http://alpha.gnu.org/gnu/mes/";
-                                        "mes-" version ".tar.gz"))
-                    (sha256
-                     (base32
-                      
"02g8zig53ffd0ai8kqhv2zj7bj2366a8hr6ydkwakmi2d1amyrna")))))
+                  (package-source mes)))
       (native-inputs '())
       (propagated-inputs '()))))
 
@@ -250,58 +244,47 @@
                             #t)))))))
           (replace 'configure
             (lambda* (#:key outputs #:allow-other-keys)
-              (let ((out (assoc-ref %outputs "out"))
-                    (dir (with-directory-excursion ".." (getcwd)))
-                    (coreutils (assoc-ref %build-inputs "coreutils"))
-                    (guile (assoc-ref %build-inputs "guile"))
-                    (mescc-tools (assoc-ref %build-inputs "mescc-tools"))
-                    (srfi-43 (assoc-ref %build-inputs "srfi-43")))
-                (setenv "PATH" (string-append
-                                coreutils "/bin"
-                                (if guile (string-append ":" guile "/bin") "")
-                                ":" mescc-tools "/bin"))
-                (format (current-error-port) "PATH=~s\n" (getenv "PATH"))
-                (setenv "SHELL" (string-append coreutils "/bin/bash"))
-                (setenv "srcdir" ".")
+              (let ((out (assoc-ref %outputs "out")))
+                (symlink (string-append "../nyacc-source/module") "nyacc")
+                (setenv "GUILE_LOAD_PATH" "nyacc")
+                (setenv "GUILE_TOOLS" "true") ; no tools in bootstrap-guile
                 (invoke "bash" "-x" "configure.sh"
                         (string-append "--prefix=" out))
-                (if ,%fake-bootstrap?
-                    (begin   ; Cheat using Guile+Nyacc+MesCC; ~30 times faster
-                      (setenv "MES" "guile")
-                      (setenv "GUILE_AUTO_COMPILE" "1")
-                      (setenv "GUILE_LOAD_COMPILED_PATH"
-                              (string-append guile "/lib/guile/2.0/ccache"))
-                      (setenv "GUILE_LOAD_PATH"
-                              (string-append (string-append dir 
"/nyacc-source/module")
-                                             ":" dir
-                                             ":" guile "/share/guile/2.0/"))
-                      ;; these fail with guile-2.0
-                      (when srfi-43
-                        (delete-file "tests/srfi-9.test")
-                        (delete-file "tests/srfi-43.test"))
-                      ;; give auto-compile a home -- massive speed-up
-                      (mkdir-p "/tmp/home")
-                      (setenv "HOME" "/tmp/home"))
-                    (begin              ; True bootstrap build Mes+Nyacc+MesCC
-                      (symlink (string-append "../nyacc-source/module") 
"nyacc")
-                      (setenv "GUILE_LOAD_PATH" "nyacc")
-                      (setenv "MES" "src/mes")))
-                (setenv "GUILE_TOOLS" "true") ; no tools in bootstrap-guile
-                (setenv "MESCC" "scripts/mescc")
-                (setenv "MES_MODULEDIR" "module")
+                (when ,%fake-bootstrap? ; Cheat using Guile+Nyacc+MesCC; ~30 
times faster
+                  (let ((dir (with-directory-excursion ".." (getcwd)))
+                        (guile (assoc-ref %build-inputs "guile"))
+                        (srfi-43 (assoc-ref %build-inputs "srfi-43")))
+                    (setenv "MES" "guile")
+                    (setenv "GUILE_AUTO_COMPILE" "1")
+                    (setenv "GUILE_LOAD_COMPILED_PATH"
+                            (string-append guile "/lib/guile/2.0/ccache"))
+                    (setenv "GUILE_LOAD_PATH"
+                            (string-append (string-append dir 
"/nyacc-source/module")
+                                           ":" dir
+                                           ":" guile "/share/guile/2.0/"))
+                    ;; these fail with guile-2.0
+                    (when srfi-43
+                      (delete-file "tests/srfi-9.test")
+                      (delete-file "tests/srfi-43.test"))
+                    ;; give auto-compile a home -- massive speed-up
+                    (mkdir-p "/tmp/home")
+                    (setenv "HOME" "/tmp/home")))
                 #t)))
           (replace 'build
             (lambda _
               (invoke "sh" "build.sh")))
           (replace 'check
             (lambda _
-              (or ,%fake-bootstrap?     ; check takes ~15min, skip when faking
-                  (and
-                   (setenv "MES_ARENA" "100000000")
-                   (setenv "DIFF" "sh scripts/diff.scm")
-                   (invoke "sh" "-x" "build-aux/test.sh" "scaffold/tests/t")
-                   (invoke "sh" "-x" "build-aux/test.sh" 
"scaffold/tests/63-struct-cell")
-                   (invoke "sh" "-x" "check.sh")))))
+              (when ,%fake-bootstrap?
+                ;; breaks with guile-2.0
+                (delete-file "scaffold/boot/50-primitive-load.scm")
+                (delete-file "scaffold/boot/51-module.scm"))
+              (and
+               (setenv "MES_ARENA" "100000000")
+               (setenv "DIFF" "sh scripts/diff.scm")
+               (invoke "sh" "-x" "build-aux/test.sh" "scaffold/tests/t")
+               (invoke "sh" "-x" "build-aux/test.sh" 
"scaffold/tests/63-struct-cell")
+               (invoke "sh" "-x" "check.sh"))))
           (replace 'install
             (lambda _
               (invoke "sh" "install.sh"))))))
diff --git a/gnu/packages/patches/mes-nyacc-0.86.0.patch 
b/gnu/packages/patches/mes-nyacc-0.86.0.patch
index 58dfc5a..221c82c 100644
--- a/gnu/packages/patches/mes-nyacc-0.86.0.patch
+++ b/gnu/packages/patches/mes-nyacc-0.86.0.patch
@@ -195,3 +195,28 @@ index 9e341cba..c2efb32c 100644
 -- 
 2.18.0
 
+From 20deefe6ea0d62a3338a8e2a9552d2a20b0f607e Mon Sep 17 00:00:00 2001
+From: Jan Nieuwenhuizen <address@hidden>
+Date: Sun, 9 Sep 2018 07:11:50 +0200
+Subject: [PATCH] build: Oops, fix ./check.sh for bootstrap build.
+
+* build-aux/config.sh (top_builddir): Set default to `.'.
+---
+ build-aux/config.sh | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/build-aux/config.sh b/build-aux/config.sh
+index a4b9fdef..4fa84441 100644
+--- a/build-aux/config.sh
++++ b/build-aux/config.sh
+@@ -17,6 +17,7 @@
+ # along with GNU Mes.  If not, see <http://www.gnu.org/licenses/>.
+ 
+ srcdir=${srcdir-.}
++top_builddir=${top_builddir-.}
+ if [ "$V" = 2 ]; then
+     echo $0
+     echo srcdest=${srcdest}
+-- 
+2.18.0
+



reply via email to

[Prev in Thread] Current Thread [Next in Thread]