gnu: r-abaenrichment: Update to 1.14.0.
[jackhill/guix/guix.git] / gnu / packages / ninja.scm
index ea5488a..0791abe 100644 (file)
@@ -1,6 +1,8 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -28,7 +30,7 @@
 (define-public ninja
   (package
     (name "ninja")
-    (version "1.5.3")
+    (version "1.9.0")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://github.com/martine/ninja/"
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "1h3yfwcfl61v493vna6jia2fizh8rpig7qw2504cvkr6gid3p5bw"))
-              (patches (map search-patch
-                            '("ninja-zero-mtime.patch" "ninja-tests.patch")))))
+                "1ffmzj5s9h98qhl94d9i23zcv057rsqbac9g1hdgvlzq51ccfzjx"))))
     (build-system gnu-build-system)
     (native-inputs `(("python" ,python-2)))
     (arguments
      '(#:phases
        (modify-phases %standard-phases
-         (replace
-          'configure
-          (lambda _
-            (substitute* "src/subprocess-posix.cc"
-              (("/bin/sh") (which "sh")))
-            #t))
-         (replace
-          'build
-          (lambda _
-            (zero? (system* "./configure.py" "--bootstrap"))))
-         (replace
-          'check
-          (lambda _
-            (and (zero? (system* "./configure.py"))
-                 (zero? (system* "./ninja" "ninja_test"))
-                 (zero? (system* "./ninja_test")))))
-         (replace
-          'install
-          (lambda* (#:key outputs #:allow-other-keys)
-            (let* ((out (assoc-ref outputs "out"))
-                   (bin (string-append out "/bin"))
-                   (doc (string-append out "/share/doc/ninja")))
-              (install-file "ninja" bin)
-              (install-file "doc/manual.asciidoc" doc)
-              #t))))))
-    (home-page "http://martine.github.io/ninja/")
+         (replace 'configure
+           (lambda _
+             (substitute* "src/subprocess-posix.cc"
+               (("/bin/sh") (which "sh")))
+             (substitute* "src/subprocess_test.cc"
+               (("/bin/echo") (which "echo")))
+             #t))
+         (replace 'build
+           (lambda _
+             (invoke "./configure.py" "--bootstrap")))
+         (replace 'check
+           (lambda _
+             (invoke "./configure.py")
+             (invoke "./ninja" "ninja_test")
+             (invoke "./ninja_test")))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin"))
+                    (doc (string-append out "/share/doc/ninja")))
+               (install-file "ninja" bin)
+               (install-file "doc/manual.asciidoc" doc)
+               #t))))))
+    (home-page "https://ninja-build.org/")
     (synopsis "Small build system")
     (description
      "Ninja is a small build system with a focus on speed.  It differs from