guix-commits
[Top][All Lists]
Advanced

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

61/163: gnu: Add m4-boot.


From: Jan Nieuwenhuizen
Subject: 61/163: gnu: Add m4-boot.
Date: Thu, 30 Aug 2018 01:03:22 -0400 (EDT)

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

commit e1eef46b9cb1cd7328065e9448460071c03bdae5
Author: Jan Nieuwenhuizen <address@hidden>
Date:   Mon May 28 19:13:38 2018 +0200

    gnu: Add m4-boot.
    
    * gnu/packages/mes.scm (m4-boot): New variable.
---
 gnu/packages/mes.scm | 38 ++++++++++++++++++++++++++++++++------
 1 file changed, 32 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm
index d4e7320..0c5aea7 100644
--- a/gnu/packages/mes.scm
+++ b/gnu/packages/mes.scm
@@ -27,6 +27,7 @@
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages graphviz)
   #:use-module (gnu packages guile)
+  #:use-module (gnu packages m4)
   #:use-module (gnu packages make-bootstrap)
   #:use-module (gnu packages man)
   #:use-module (gnu packages package-management)
@@ -37,7 +38,8 @@
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module (guix licenses)
-  #:use-module (guix packages))
+  #:use-module (guix packages)
+  #:use-module (guix utils))
 
 (define %fake-bootstrap? #f)  ; cheat using Guile instead of Mes for speed-up?
 
@@ -508,11 +510,35 @@ standard.")
        (home-page "http://www.tinycc.org/";)
        (license lgpl2.1+)))))
 
-;; gcc-boot
-;; <rain1> what I did was just this  [19:11]
-;; <rain1> MAKEINFO=missing CC=tcc $HOME/gcc-4.7.4/configure
-;;         --prefix=$HOME/gcc-out --enable-languages=c --disable-multilib
-;; <rain1> with tcc built and installed in $PATH
+(define-public m4-boot
+  (package
+    (inherit m4)
+    (name "m4-boot")
+    (version "1.4")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnu/m4/m4-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1f9bxj176kf3pvs350w2dfs8jgwhminywri5pyn01b11yc4yhsjw"))))
+    (supported-systems '("i686-linux"))
+    (native-inputs `(("mes" ,mes-boot)
+                     ("tcc" ,tcc-boot)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (setenv "CONFIG_SHELL" (string-append
+                                       (assoc-ref %build-inputs "bash")
+                                       "/bin/sh"))
+               (setenv "CC" "tcc -static")
+               (setenv "CPP" "tcc -E")
+               (zero?
+                (system* "./configure"
+                         (string-append "--prefix=" out)))))))))))
 
 (define-public gcc-boot
   (package



reply via email to

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