Merge branch 'master' into core-updates
authorLudovic Courtès <ludo@gnu.org>
Sat, 15 Dec 2012 14:28:50 +0000 (15:28 +0100)
committerLudovic Courtès <ludo@gnu.org>
Sat, 15 Dec 2012 14:28:50 +0000 (15:28 +0100)
Conflicts:
distro/packages/multiprecision.scm

distro/packages/base.scm
distro/packages/bootstrap.scm
distro/packages/multiprecision.scm
guix/build/gnu-build-system.scm

index 1b08bfd..f0dd150 100644 (file)
@@ -775,6 +775,7 @@ identifier SYSTEM."
                     (let* ((binutils (assoc-ref %build-inputs "binutils"))
                            (gcc      (assoc-ref %build-inputs "gcc"))
                            (libc     (assoc-ref %build-inputs "libc"))
+                           (bash     (assoc-ref %build-inputs "bash"))
                            (out      (assoc-ref %outputs "out"))
                            (bindir   (string-append out "/bin"))
                            (triplet  ,(boot-triplet system)))
@@ -791,8 +792,9 @@ identifier SYSTEM."
                         ;; the dynamic linker.
                         (call-with-output-file "gcc"
                           (lambda (p)
-                            (format p "#!/bin/sh
+                            (format p "#!~a/bin/bash
 exec ~a/bin/~a-gcc -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
+                                    bash
                                     gcc triplet
                                     libc libc
                                     ,(glibc-dynamic-linker system))))
@@ -801,7 +803,8 @@ exec ~a/bin/~a-gcc -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
     (native-inputs
      `(("binutils" ,binutils-boot0)
        ("gcc" ,gcc-boot0)
-       ("libc" ,glibc-final)))
+       ("libc" ,glibc-final)
+       ,(assoc "bash" %boot1-inputs)))
     (inputs '())))
 
 (define %boot2-inputs
index 2349204..6dc9c3d 100644 (file)
@@ -367,6 +367,9 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
   `(("libc" ,%bootstrap-glibc)
     ("gcc" ,%bootstrap-gcc)
     ("binutils" ,%bootstrap-binutils)
-    ("coreutils&co" ,%bootstrap-coreutils&co)))
+    ("coreutils&co" ,%bootstrap-coreutils&co)
+
+    ;; In gnu-build-system.scm, we rely on the availability of Bash.
+    ("bash" ,%bootstrap-coreutils&co)))
 
 ;;; bootstrap.scm ends here
index 69a05b7..cef09b8 100644 (file)
@@ -96,14 +96,13 @@ double-precision floating-point arithmetic (53-bit mantissa).")
 (define-public mpc
   (package
    (name "mpc")
-   (version "1.0")
+   (version "1.0.1")
    (source (origin
             (method url-fetch)
             (uri (string-append
-                  "http://www.multiprecision.org/mpc/download/mpc-"
-                  version ".tar.gz"))
+                  "mirror://gnu/mpc/mpc-" version ".tar.gz"))
             (sha256 (base32
-                     "00rxjmkpqnv6zzcyw9aa5w6rzaav32ys87km25zgfcv9i32km5cw"))))
+                     "1zq0fidp1jii2j5k5n9hmx55a6wwid33gjzhimvxq9d5zrf82npd"))))
    (build-system gnu-build-system)
    (inputs `(("gmp" ,gmp)
              ("mpfr" ,mpfr)))
@@ -111,7 +110,11 @@ double-precision floating-point arithmetic (53-bit mantissa).")
 with exact rounding")
    (description
     "GNU MPC is a C library for the arithmetic of complex numbers with
-arbitrarily high precision and correct rounding of the result.  It is built
-upon and follows the same principles as GNU MPFR.")
+arbitrarily high precision and correct rounding of the result. It extends
+the principles of the IEEE-754 standard for fixed precision real floating
+point numbers to complex numbers, providing well-defined semantics for
+every operation. At the same time, speed of operation at high precision
+is a major design goal. The library is built upon and follows the same
+principles as GNU MPFR.")
    (license lgpl3+)
    (home-page "http://mpc.multiprecision.org/")))
index 2b7d1c1..efee570 100644 (file)
                          (append patch-flags (list "--input" p)))))
          patches))
 
-(define* (configure #:key outputs (configure-flags '()) out-of-source?
+(define* (configure #:key inputs outputs (configure-flags '()) out-of-source?
                     #:allow-other-keys)
   (let* ((prefix     (assoc-ref outputs "out"))
          (libdir     (assoc-ref outputs "lib"))
          (includedir (assoc-ref outputs "include"))
-         (flags      `(,(string-append "--prefix=" prefix)
+         (bash       (or (and=> (assoc-ref inputs "bash")
+                                (cut string-append <> "/bin/bash"))
+                         "/bin/sh"))
+         (flags      `(,(string-append "CONFIG_SHELL=" bash)
+                       ,(string-append "SHELL=" bash)
+                       ,(string-append "--prefix=" prefix)
                        "--enable-fast-install"    ; when using Libtool
 
                        ;; Produce multiple outputs when specific output names
     (format #t "build directory: ~s~%" (getcwd))
     (format #t "configure flags: ~s~%" flags)
 
+    ;; Use BASH to reduce reliance on /bin/sh since it may not always be
+    ;; reliable (see
+    ;; <http://thread.gmane.org/gmane.linux.distributions.nixos/9748>
+    ;; for a summary of the situation.)
+    ;;
     ;; Call `configure' with a relative path.  Otherwise, GCC's build system
     ;; (for instance) records absolute source file names, which typically
     ;; contain the hash part of the `.drv' file, leading to a reference leak.
-    (zero? (apply system*
+    (zero? (apply system* bash
                   (string-append srcdir "/configure")
                   flags))))