summary refs log tree commit diff
path: root/gnu/packages/base.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/base.scm')
-rw-r--r--gnu/packages/base.scm90
1 files changed, 48 insertions, 42 deletions
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 8cee8f850b..41e1a8d049 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -73,14 +73,14 @@ command-line arguments, multiple languages, and so on.")
 (define-public grep
   (package
    (name "grep")
-   (version "2.14")
+   (version "2.15")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/grep/grep-"
                                 version ".tar.xz"))
             (sha256
              (base32
-              "1qbjb1l7f9blckc5pqy8jlf6482hpx4awn2acmhyf5mv9wfq03p7"))))
+              "052kjsafg2x7n2zpy3iw4pzwf8fdfng5pcvi9v3chx3rb1786nmz"))))
    (build-system gnu-build-system)
    (synopsis "Print lines matching a pattern")
    (description
@@ -130,18 +130,15 @@ is often used for substituting text patterns in a stream.")
 (define-public tar
   (package
    (name "tar")
-   (version "1.26")
+   (version "1.27")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/tar/tar-"
                                 version ".tar.bz2"))
             (sha256
              (base32
-              "0hbdkzmchq9ycr2x1pxqdcgdbaxksh8c6ac0jf75jajhcks6jlss"))))
+              "0yrwmx2f721ahpnki4fnzvnmrd3md3bq417icb4wrjky7k3caf12"))))
    (build-system gnu-build-system)
-   (inputs `(("patch/gets" ,(search-patch "tar-gets-undeclared.patch"))))
-   (arguments
-    `(#:patches (list (assoc-ref %build-inputs "patch/gets"))))
    (synopsis "Managing tar archives")
    (description
     "Tar provides the ability to create tar archives, as well as the
@@ -212,19 +209,15 @@ interactive means to merge two files.")
                                 version ".tar.gz"))
             (sha256
              (base32
-              "0amn0bbwqvsvvsh6drfwz20ydc2czk374lzw5kksbh6bf78k4ks3"))))
+              "0amn0bbwqvsvvsh6drfwz20ydc2czk374lzw5kksbh6bf78k4ks3"))
+            (patches (list (search-patch "findutils-absolute-paths.patch")))))
    (build-system gnu-build-system)
-   (native-inputs
-    `(("patch/absolute-paths"
-       ,(search-patch "findutils-absolute-paths.patch"))))
    (arguments
-    `(#:patches (list (assoc-ref %build-inputs "patch/absolute-paths"))
-
-      ;; Work around cross-compilation failure.
-      ;; See <http://savannah.gnu.org/bugs/?27299#comment1>.
-      ,@(if (%current-target-system)
-            '(#:configure-flags '("gl_cv_func_wcwidth_works=yes"))
-            '())))
+    ;; Work around cross-compilation failure.
+    ;; See <http://savannah.gnu.org/bugs/?27299#comment1>.
+    (if (%current-target-system)
+        '(#:configure-flags '("gl_cv_func_wcwidth_works=yes"))
+        '()))
    (synopsis "Operating on files matching given criteria")
    (description
     "Findutils supplies the basic file directory searching utilities of the
@@ -283,21 +276,20 @@ functionality beyond that which is outlined in the POSIX standard.")
 (define-public gnu-make
   (package
    (name "make")
-   (version "3.82")
+   (version "4.0")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/make/make-" version
                                 ".tar.bz2"))
             (sha256
              (base32
-              "0ri98385hsd7li6rh4l5afcq92v8l2lgiaz85wgcfh4w2wzsghg2"))))
+              "1nyvn8mknw0mf7727lprva3lisl1y0n03lvar342rrpdmz3qc1p6"))
+            (patches (list (search-patch "make-impure-dirs.patch")))))
    (build-system gnu-build-system)
-   (native-inputs
-    `(("patch/impure-dirs" ,(search-patch "make-impure-dirs.patch"))))
+   (inputs `(("guile" ,guile-2.0)))
    (outputs '("out" "debug"))
    (arguments
-    '(#:patches (list (assoc-ref %build-inputs "patch/impure-dirs"))
-      #:phases (alist-cons-before
+    '(#:phases (alist-cons-before
                 'build 'set-default-shell
                 (lambda* (#:key inputs #:allow-other-keys)
                   ;; Change the default shell from /bin/sh.
@@ -328,7 +320,10 @@ change.")
                                 version ".tar.bz2"))
             (sha256
              (base32
-              "15qhbkz3r266xaa52slh857qn3abw7rb2x2jnhpfrafpzrb4x4gy"))))
+              "15qhbkz3r266xaa52slh857qn3abw7rb2x2jnhpfrafpzrb4x4gy"))
+            (patches (list (search-patch "binutils-ld-new-dtags.patch")
+                           (search-patch "binutils-loongson-workaround.patch")
+                           (search-patch "binutils-loongson-madd-fix.patch")))))
    (build-system gnu-build-system)
 
    ;; Split Binutils in several outputs, mostly to avoid collisions in
@@ -337,11 +332,8 @@ change.")
               "lib"))                      ; libbfd.a, bfd.h, etc.
 
    ;; TODO: Add dependency on zlib + those for Gold.
-   (native-inputs
-    `(("patch/new-dtags" ,(search-patch "binutils-ld-new-dtags.patch"))))
    (arguments
-    `(#:patches (list (assoc-ref %build-inputs "patch/new-dtags"))
-      #:configure-flags '(;; Add `-static-libgcc' to not retain a dependency
+    `(#:configure-flags '(;; Add `-static-libgcc' to not retain a dependency
                           ;; on GCC when bootstrapping.
                           "LDFLAGS=-static-libgcc"
 
@@ -372,7 +364,11 @@ archives.")
                                 version ".tar.xz"))
             (sha256
              (base32
-              "18spla703zav8dq9fw7rbzkyv9qfisxb26p7amg1x3wjh7iy3d1c"))))
+              "18spla703zav8dq9fw7rbzkyv9qfisxb26p7amg1x3wjh7iy3d1c"))
+            (patches (map search-patch
+                          '("glibc-no-ld-so-cache.patch"
+                            "glibc-ldd-x86_64.patch"
+                            "glibc-make-4.0.patch")))))
    (build-system gnu-build-system)
 
    ;; Glibc's <limits.h> refers to <linux/limit.h>, for instance, so glibc
@@ -387,8 +383,6 @@ archives.")
 
    (arguments
     `(#:out-of-source? #t
-      #:patches (list (assoc-ref %build-inputs "patch/ld.so.cache")
-                      (assoc-ref %build-inputs "patch/ldd"))
       #:configure-flags
       (list "--enable-add-ons"
             "--sysconfdir=/etc"
@@ -472,11 +466,7 @@ archives.")
                    (zero? (system* "make" "localedata/install-locales")))
                  %standard-phases))))
 
-   (inputs `(("patch/ld.so.cache"
-              ,(search-patch "glibc-no-ld-so-cache.patch"))
-             ("patch/ldd"
-              ,(search-patch "glibc-ldd-x86_64.patch"))
-             ("static-bash" ,(static-package bash-light))))
+   (inputs `(("static-bash" ,(static-package bash-light))))
    (synopsis "The GNU C Library")
    (description
     "Any Unix-like operating system needs a C library: the library which
@@ -574,6 +564,10 @@ and daylight-saving rules.")
             ((#:phases phases)
              `(alist-replace
                'build (lambda _
+                        ;; Don't attempt to build 'guile.c' since we don't
+                        ;; have Guile here.
+                        (substitute* "build.sh"
+                          (("guile\\.\\$\\{OBJEXT\\}") ""))
                         (zero? (system* "./build.sh")))
                (alist-replace
                 'install (lambda* (#:key outputs #:allow-other-keys)
@@ -1005,6 +999,14 @@ store.")
                                  (current-source-location)
                                  #:guile %bootstrap-guile)))
 
+(define-public gnu-make-final
+  ;; The final GNU Make, which uses the final Guile.
+  (package-with-bootstrap-guile
+   (package-with-explicit-inputs gnu-make
+                                 `(("guile" ,guile-final)
+                                   ,@%boot4-inputs)
+                                 (current-source-location))))
+
 (define-public ld-wrapper
   ;; The final `ld' wrapper, which uses the final Guile.
   (package (inherit ld-wrapper-boot3)
@@ -1015,9 +1017,13 @@ store.")
                       '("guile" "bash"))))))
 
 (define-public %final-inputs
-  ;; Final derivations used as implicit inputs by `gnu-build-system'.
-  (let ((finalize (cut package-with-explicit-inputs <> %boot4-inputs
-                       (current-source-location))))
+  ;; Final derivations used as implicit inputs by 'gnu-build-system'.  We
+  ;; still use 'package-with-bootstrap-guile' so that the bootstrap tools are
+  ;; used for origins that have patches, thereby avoiding circular
+  ;; dependencies.
+  (let ((finalize (compose package-with-bootstrap-guile
+                           (cut package-with-explicit-inputs <> %boot4-inputs
+                                (current-source-location)))))
     `(,@(map (match-lambda
               ((name package)
                (list name (finalize package))))
@@ -1031,8 +1037,8 @@ store.")
                ("sed" ,sed)
                ("grep" ,grep)
                ("findutils" ,findutils)
-               ("gawk" ,gawk)
-               ("make" ,gnu-make)))
+               ("gawk" ,gawk)))
+      ("make" ,gnu-make-final)
       ("bash" ,bash-final)
       ("ld-wrapper" ,ld-wrapper)
       ("binutils" ,binutils-final)