summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages/admin.scm11
-rw-r--r--gnu/packages/base.scm98
-rw-r--r--gnu/packages/cross-base.scm10
-rw-r--r--gnu/packages/gawk.scm4
-rw-r--r--gnu/packages/gcc.scm102
-rw-r--r--gnu/packages/gettext.scm34
-rw-r--r--gnu/packages/libunistring.scm7
-rw-r--r--gnu/packages/make-bootstrap.scm31
-rw-r--r--gnu/packages/multiprecision.scm4
-rw-r--r--gnu/packages/ncurses.scm11
-rw-r--r--guix/build-system/gnu.scm12
-rw-r--r--guix/build/gnu-build-system.scm6
-rw-r--r--guix/build/utils.scm61
13 files changed, 275 insertions, 116 deletions
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index b10fc6fe39..a3d600d7be 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -205,16 +205,7 @@ client and server, a telnet client and server, and an rsh client and server.")
(delete-file (string-append bin "/groups"))
(for-each delete-file (find-files man "^groups\\."))
#t))
- (alist-cons-after
- 'unpack 'reset-timestamps
- (lambda _
- ;; FIXME: Reset the file timestamps here, until the
- ;; 'unpack' phase does it for us. See
- ;; <https://lists.gnu.org/archive/html/guix-devel/2014-04/msg00098.html>.
- (for-each (lambda (file)
- (utime file 0 0 0))
- (find-files "." "")))
- %standard-phases)))))
+ %standard-phases))))
(inputs (if (string-suffix? "-linux"
(or (%current-target-system)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 2e16f325ef..bbeee3f0cd 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;;
@@ -71,14 +72,14 @@ command-line arguments, multiple languages, and so on.")
(define-public grep
(package
(name "grep")
- (version "2.18")
+ (version "2.20")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/grep/grep-"
version ".tar.xz"))
(sha256
(base32
- "08773flbnx28ksy0y4mzd4iifysh7yysmzn8rkz9f57sfx86whz6"))))
+ "0rcs0spsxdmh6yz8y4frkqp6f5iw19mdbdl9s2v6956hq0mlbbzh"))))
(build-system gnu-build-system)
(synopsis "Print lines matching a pattern")
(description
@@ -262,14 +263,16 @@ used to apply commands with arbitrarily long arguments.")
'build 'patch-shell-references
(lambda* (#:key inputs #:allow-other-keys)
(let ((bash (assoc-ref inputs "bash")))
- (substitute* (cons "src/split.c"
- (find-files "gnulib-tests"
- "\\.c$"))
+ ;; 'split' uses either $SHELL or /bin/sh. Set $SHELL so
+ ;; that tests pass, since /bin/sh isn't in the chroot.
+ (setenv "SHELL" (which "sh"))
+
+ (substitute* (find-files "gnulib-tests" "\\.c$")
(("/bin/sh")
(format #f "~a/bin/sh" bash)))
(substitute* (find-files "tests" "\\.sh$")
(("#!/bin/sh")
- (format #f "#!~a/bin/bash" bash)))))
+ (format #f "#!~a/bin/sh" bash)))))
%standard-phases)))
(synopsis "Core GNU utilities (file, text, shell)")
(description
@@ -728,15 +731,19 @@ identifier SYSTEM."
source)))
(list gmp mpfr mpc))
- ;; Create symlinks like `gmp' -> `gmp-5.0.5'.
+ ;; Create symlinks like `gmp' -> `gmp-x.y.z'.
,@(map (lambda (lib)
- `(symlink ,(package-full-name lib)
+ ;; Drop trailing letters, as gmp-6.0.0a unpacks
+ ;; into gmp-6.0.0.
+ `(symlink ,(string-trim-right
+ (package-full-name lib)
+ char-set:letter)
,(package-name lib)))
(list gmp mpfr mpc))))
(alist-cons-after
'install 'symlink-libgcc_eh
(lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
+ (let ((out (assoc-ref outputs "lib")))
;; Glibc wants to link against libgcc_eh, so provide
;; it.
(with-directory-excursion
@@ -822,22 +829,37 @@ identifier SYSTEM."
;; Build Sun/ONC RPC support. In particular,
;; install rpc/*.h.
"--enable-obsolete-rpc")
- ,flags)))))
+ ,flags))
+ ((#:phases phases)
+ `(alist-cons-before
+ 'configure 'pre-configure
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Don't clobber CPATH with the bootstrap libc.
+ (setenv "NATIVE_CPATH" (getenv "CPATH"))
+ (unsetenv "CPATH")
+
+ ;; 'rpcgen' needs native libc headers to be built.
+ (substitute* "sunrpc/Makefile"
+ (("sunrpc-CPPFLAGS =.*" all)
+ (string-append "CPATH = $(NATIVE_CPATH)\n"
+ "export CPATH\n"
+ all "\n"))))
+ ,phases)))))
(propagated-inputs `(("linux-headers" ,(linux-libre-headers-boot0))))
(native-inputs
`(("texinfo" ,texinfo-boot0)
("perl" ,perl-boot0)))
(inputs
- `( ;; A native GCC is needed to build `cross-rpcgen'.
+ `(;; The boot inputs. That includes the bootstrap libc. We don't want
+ ;; it in $CPATH, hence the 'pre-configure' phase above.
+ ,@%boot1-inputs
+
+ ;; A native GCC is needed to build `cross-rpcgen'.
("native-gcc" ,@(assoc-ref %boot0-inputs "gcc"))
;; Here, we use the bootstrap Bash, which is not satisfactory
;; because we don't want to depend on bootstrap tools.
- ("static-bash" ,@(assoc-ref %boot0-inputs "bash"))
-
- ,@%boot1-inputs
- ,@(alist-delete "static-bash"
- (package-inputs glibc))))))) ; patches
+ ("static-bash" ,@(assoc-ref %boot0-inputs "bash")))))))
(define (cross-gcc-wrapper gcc binutils glibc bash)
"Return a wrapper for the pseudo-cross toolchain GCC/BINUTILS/GLIBC
@@ -846,6 +868,7 @@ that makes it available under the native tool names."
(name (string-append (package-name gcc) "-wrapped"))
(source #f)
(build-system trivial-build-system)
+ (outputs '("out"))
(arguments
`(#:guile ,%bootstrap-guile
#:modules ((guix build utils))
@@ -914,7 +937,17 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(inputs `(("static-bash" ,static-bash-for-glibc)
,@(alist-delete
"static-bash"
- (package-inputs glibc-final-with-bootstrap-bash))))))
+ (package-inputs glibc-final-with-bootstrap-bash))))
+
+ ;; The final libc only refers to itself, but the 'debug' output contains
+ ;; references to GCC-BOOT0 and to the Linux headers. XXX: Would be great
+ ;; if 'allowed-references' were per-output.
+ (arguments
+ `(#:allowed-references
+ ,(cons* `(,gcc-boot0 "lib") (linux-libre-headers-boot0)
+ (package-outputs glibc-final-with-bootstrap-bash))
+
+ ,@(package-arguments glibc-final-with-bootstrap-bash)))))
(define gcc-boot0-wrapped
;; Make the cross-tools GCC-BOOT0 and BINUTILS-BOOT0 available under the
@@ -934,6 +967,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(arguments
`(#:guile ,%bootstrap-guile
#:implicit-inputs? #f
+ #:allowed-references ("out" ,glibc-final)
,@(package-arguments binutils)))
(inputs %boot2-inputs))))
@@ -962,6 +996,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
;; "/include/c++/"
;; ,(package-version gcc-4.8)
))))
+ (outputs '("out"))
(inputs %boot2-inputs)
(native-inputs '())
(propagated-inputs '())
@@ -976,6 +1011,8 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
`(#:guile ,%bootstrap-guile
#:implicit-inputs? #f
+ #:allowed-references ("out" "lib" ,glibc-final)
+
;; Build again GMP & co. within GCC's build process, because it's hard
;; to do outside (because GCC-BOOT0 is a cross-compiler, and thus
;; doesn't honor $LIBRARY_PATH, which breaks `gnu-build-system'.)
@@ -1003,6 +1040,10 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
((#:phases phases)
`(alist-delete 'symlink-libgcc_eh ,phases)))))
+ ;; This time we want Texinfo, so we get the manual.
+ (native-inputs `(("texinfo" ,texinfo-boot0)
+ ,@(package-native-inputs gcc-boot0)))
+
(inputs `(("gmp-source" ,(package-source gmp))
("mpfr-source" ,(package-source mpfr))
("mpc-source" ,(package-source mpc))
@@ -1105,13 +1146,32 @@ store.")
,@(fold alist-delete (package-inputs ld-wrapper-boot3)
'("guile" "bash"))))))
+(define coreutils-final
+ ;; The final Coreutils. Treat them specially because some packages, such as
+ ;; Findutils, keep a reference to the Coreutils they were built with.
+ (package-with-bootstrap-guile
+ (package-with-explicit-inputs coreutils
+ %boot4-inputs
+ (current-source-location)
+
+ ;; Use the final Guile, linked against the
+ ;; final libc with working iconv, so that
+ ;; 'substitute*' works well when touching
+ ;; test files in Gettext.
+ #:guile guile-final)))
+
+(define %boot5-inputs
+ ;; Now use the final Coreutils.
+ `(("coreutils" ,coreutils-final)
+ ,@%boot4-inputs))
+
(define-public %final-inputs
;; 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
+ (cut package-with-explicit-inputs <> %boot5-inputs
(current-source-location)))))
`(,@(map (match-lambda
((name package)
@@ -1122,11 +1182,11 @@ store.")
("xz" ,xz)
("diffutils" ,diffutils)
("patch" ,patch)
- ("coreutils" ,coreutils)
("sed" ,sed)
("grep" ,grep)
("findutils" ,findutils)
("gawk" ,gawk)))
+ ("coreutils" ,coreutils-final)
("make" ,gnu-make-final)
("bash" ,bash-final)
("ld-wrapper" ,ld-wrapper)
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 41128b73cd..bba85e3c0a 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -76,7 +76,13 @@ GCC that does not target a libc; otherwise, target that libc."
target))
(source (origin (inherit (package-source gcc-4.8))
(patches
- (list (search-patch "gcc-cross-environment-variables.patch")))))
+ (list (search-patch
+ "gcc-cross-environment-variables.patch")))))
+
+ ;; For simplicity, use a single output. Otherwise libgcc_s & co. are not
+ ;; found by default, etc.
+ (outputs '("out"))
+
(arguments
`(#:implicit-inputs? #f
#:modules ((guix build gnu-build-system)
diff --git a/gnu/packages/gawk.scm b/gnu/packages/gawk.scm
index 9b22a1e5b8..fe422a2014 100644
--- a/gnu/packages/gawk.scm
+++ b/gnu/packages/gawk.scm
@@ -27,13 +27,13 @@
(define-public gawk
(package
(name "gawk")
- (version "4.1.0")
+ (version "4.1.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/gawk/gawk-" version
".tar.xz"))
(sha256
- (base32 "0hin2hswbbd6kd6i4zzvgciwpl5fba8d2s524z8y5qagyz3x010q"))))
+ (base32 "1nz83vpss8xv7m475sv4qhhj40g74nvcw0y9kwq9ds8wzfmcdm7g"))))
(build-system gnu-build-system)
(arguments
`(#:parallel-tests? #f ; test suite fails in parallel
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index a8d63fc98a..93dc6c0565 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -51,6 +51,13 @@ where the OS part is overloaded to denote a specific ABI---into GCC
(define-public gcc-4.7
(let* ((stripped? #t) ; TODO: make this a parameter
+ (install-target
+ ;; The 'install-strip' rule uses the native 'strip' instead of
+ ;; 'TARGET-strip' when cross-compiling. Thus, use 'install' in that
+ ;; case.
+ (if (and stripped? (not (%current-target-system)))
+ "install-strip"
+ "install"))
(maybe-target-tools
(lambda ()
;; Return the `_FOR_TARGET' variables that are needed when
@@ -79,6 +86,14 @@ where the OS part is overloaded to denote a specific ABI---into GCC
"--with-local-prefix=/no-gcc-local-prefix"
+ ;; With a separate "lib" output, the build system
+ ;; incorrectly guesses GPLUSPLUS_INCLUDE_DIR, so force
+ ;; it. (Don't use a versioned sub-directory, that's
+ ;; unnecessary.)
+ ,(string-append "--with-gxx-include-dir="
+ (assoc-ref %outputs "out")
+ "/include/c++")
+
,(let ((libc (assoc-ref %build-inputs "libc")))
(if libc
(string-append "--with-native-system-header-dir=" libc
@@ -94,15 +109,21 @@ where the OS part is overloaded to denote a specific ABI---into GCC
(maybe-target-tools))))))
(package
(name "gcc")
- (version "4.7.3")
+ (version "4.7.4")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/gcc/gcc-"
version "/gcc-" version ".tar.bz2"))
(sha256
(base32
- "1hx9h64ivarlzi4hxvq42as5m9vlr5cyzaaq4gzj4i619zmkfz1g"))))
+ "10k2k71kxgay283ylbbhhs51cl55zn2q38vj5pk4k950qdnirrlj"))))
(build-system gnu-build-system)
+
+ ;; Separate out the run-time support libraries because all the
+ ;; dynamic-linked objects depend on it.
+ (outputs '("out" ; commands, etc. (60+ MiB)
+ "lib")) ; libgcc_s, libgomp, etc. (15+ MiB)
+
(inputs `(("gmp" ,gmp)
("mpfr" ,mpfr)
("mpc" ,mpc)
@@ -119,32 +140,39 @@ where the OS part is overloaded to denote a specific ABI---into GCC
#:strip-binaries? ,stripped?
#:configure-flags ,(configure-flags)
#:make-flags
- (let* ((libc (assoc-ref %build-inputs "libc"))
- (libc-native (or (assoc-ref %build-inputs "libc-native")
- libc)))
- `(,@(if libc
- (list (string-append "LDFLAGS_FOR_TARGET="
- "-B" libc "/lib "
- "-Wl,-dynamic-linker "
- "-Wl," libc
- ,(glibc-dynamic-linker)))
- '())
-
- ;; Native programs like 'genhooks' also need that right.
- ,(string-append "LDFLAGS="
- "-Wl,-rpath=" libc-native "/lib "
- "-Wl,-dynamic-linker "
- "-Wl," libc-native ,(glibc-dynamic-linker))
- ,(string-append "BOOT_CFLAGS=-O2 "
- ,(if stripped? "-g0" "-g"))))
+ ;; None of the flags below are needed when doing a Canadian cross.
+ ;; TODO: Simplify this.
+ ,(if (%current-target-system)
+ (if stripped?
+ ''("CFLAGS=-g0 -O2")
+ ''())
+ `(let* ((libc (assoc-ref %build-inputs "libc"))
+ (libc-native (or (assoc-ref %build-inputs "libc-native")
+ libc)))
+ `(,@(if libc
+ (list (string-append "LDFLAGS_FOR_TARGET="
+ "-B" libc "/lib "
+ "-Wl,-dynamic-linker "
+ "-Wl," libc
+ ,(glibc-dynamic-linker)))
+ '())
+
+ ;; Native programs like 'genhooks' also need that right.
+ ,(string-append "LDFLAGS="
+ "-Wl,-rpath=" libc-native "/lib "
+ "-Wl,-dynamic-linker "
+ "-Wl," libc-native ,(glibc-dynamic-linker))
+ ,(string-append "BOOT_CFLAGS=-O2 "
+ ,(if stripped? "-g0" "-g")))))
#:tests? #f
#:phases
(alist-cons-before
'configure 'pre-configure
(lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (libc (assoc-ref inputs "libc")))
+ (let ((libdir (or (assoc-ref outputs "lib")
+ (assoc-ref outputs "out")))
+ (libc (assoc-ref inputs "libc")))
(when libc
;; The following is not performed for `--without-headers'
;; cross-compiler builds.
@@ -170,7 +198,7 @@ where the OS part is overloaded to denote a specific ABI---into GCC
;; <http://sourceware.org/ml/libc-help/2013-11/msg00023.html>.)
(format #f "#define GNU_USER_TARGET_LIB_SPEC \
\"-L~a/lib %{!static:-rpath=~a/lib %{!static-libgcc:-rpath=~a/lib64 -rpath=~a/lib -lgcc_s}} \" ~a"
- libc libc out out suffix))
+ libc libc libdir libdir suffix))
(("#define GNU_USER_TARGET_STARTFILE_SPEC.*$" line)
(format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib\"
#define STANDARD_STARTFILE_PREFIX_2 \"\"
@@ -180,7 +208,24 @@ where the OS part is overloaded to denote a specific ABI---into GCC
;; Don't retain a dependency on the build-time sed.
(substitute* "fixincludes/fixincl.x"
(("static char const sed_cmd_z\\[\\] =.*;")
- "static char const sed_cmd_z[] = \"sed\";"))))
+ "static char const sed_cmd_z[] = \"sed\";"))
+
+ ;; Move libstdc++*-gdb.py to the "lib" output to avoid a
+ ;; circularity between "out" and "lib". (Note:
+ ;; --with-python-dir is useless because it imposes $(prefix) as
+ ;; the parent directory.)
+ (substitute* "libstdc++-v3/python/Makefile.in"
+ (("pythondir = .*$")
+ (string-append "pythondir = " libdir "/share"
+ "/gcc-$(gcc_version)/python\n")))
+
+ ;; Avoid another circularity between the outputs: this #define
+ ;; ends up in auto-host.h in the "lib" output, referring to
+ ;; "out". (This variable is used to augment cpp's search path,
+ ;; but there's nothing useful to look for here.)
+ (substitute* "gcc/config.in"
+ (("PREFIX_INCLUDE_DIR")
+ "PREFIX_INCLUDE_DIR_isnt_necessary_here"))))
(alist-cons-after
'configure 'post-configure
@@ -193,10 +238,7 @@ where the OS part is overloaded to denote a specific ABI---into GCC
(alist-replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(zero?
- (system* "make"
- ,(if stripped?
- "install-strip"
- "install"))))
+ (system* "make" ,install-target)))
%standard-phases)))))
(native-search-paths
@@ -218,14 +260,14 @@ Go. It also includes runtime support libraries for these languages.")
(define-public gcc-4.8
(package (inherit gcc-4.7)
- (version "4.8.2")
+ (version "4.8.3")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/gcc/gcc-"
version "/gcc-" version ".tar.bz2"))
(sha256
(base32
- "1j6dwgby4g3p3lz7zkss32ghr45zpdidrg8xvazvn91lqxv25p09"))))))
+ "07hg10zs7gnqz58my10ch0zygizqh0z0bz6pv4pgxx45n48lz3ka"))))))
(define-public gcc-4.9
(package (inherit gcc-4.7)
diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm
index e5a2c6e479..a4c8ef1a34 100644
--- a/gnu/packages/gettext.scm
+++ b/gnu/packages/gettext.scm
@@ -34,37 +34,41 @@
(define-public gnu-gettext
(package
(name "gettext")
- (version "0.18.3.2")
+ (version "0.19.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/gettext/gettext-"
version ".tar.gz"))
(sha256
(base32
- "1my5njl7mp663abpdn8qsm5i462wlhlnb5q50fmhgd0fsr9f996i"))))
+ "1ih104j74dw90cb18ym50qlks3k6632zsiv2c94fnpyzbgcp2x18"))))
(build-system gnu-build-system)
(inputs
`(("expat" ,expat)))
(arguments
`(#:phases (alist-cons-before
- 'configure 'link-expat
- (lambda _
- (substitute* "gettext-tools/configure"
- (("LIBEXPAT=\"-ldl\"") "LIBEXPAT=\"-ldl -lexpat\"")
- (("LTLIBEXPAT=\"-ldl\"") "LTLIBEXPAT=\"-ldl -lexpat\"")))
- (alist-cons-before
'check 'patch-tests
(lambda* (#:key inputs #:allow-other-keys)
- (let ((bash (which "sh")))
- (substitute* (find-files "gettext-tools/tests"
- "^msgexec-[0-9]")
+ (let* ((bash (which "sh")))
+ (substitute*
+ (find-files "gettext-tools/tests"
+ "^(lang-sh|msg(exec|filter)-[0-9])")
(("#![[:blank:]]/bin/sh")
(format #f "#!~a" bash)))
- (substitute* (find-files "gettext-tools/gnulib-tests"
- "posix_spawn")
+
+ (substitute* (cons "gettext-tools/src/msginit.c"
+ (find-files "gettext-tools/gnulib-tests"
+ "posix_spawn"))
(("/bin/sh")
- bash))))
- %standard-phases))))
+ bash))
+
+ (substitute* "gettext-tools/src/project-id"
+ (("/bin/pwd")
+ "pwd"))))
+ %standard-phases)
+
+ ;; When tests fail, we want to know the details.
+ #:make-flags '("VERBOSE=yes")))
(home-page "http://www.gnu.org/software/gettext/")
(synopsis "Tools and documentation for translation")
(description
diff --git a/gnu/packages/libunistring.scm b/gnu/packages/libunistring.scm
index b48cb2d207..a7681009ac 100644
--- a/gnu/packages/libunistring.scm
+++ b/gnu/packages/libunistring.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -36,6 +36,11 @@
"18q620269xzpw39dwvr9zpilnl2dkw5z5kz3mxaadnpv4k3kw3b1"))))
(propagated-inputs '()) ; FIXME: add libiconv when !glibc
(build-system gnu-build-system)
+ (arguments
+ ;; Work around parallel build issue whereby C files may be compiled before
+ ;; config.h is built: see <http://hydra.gnu.org/build/59381/nixlog/2/raw> and
+ ;; <http://lists.openembedded.org/pipermail/openembedded-core/2012-April/059850.html>.
+ '(#:parallel-build? #f))
(synopsis "C library for manipulating Unicode strings")
(description
"GNU libunistring is a library providing functions to manipulate
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index 2e3e9ec4c1..2808bebee3 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -103,6 +103,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
,@%final-inputs))
`(("libc" ,(glibc-for-bootstrap))
("gcc" ,(package (inherit gcc-4.8)
+ (outputs '("out")) ; all in one so libgcc_s is easily found
(inputs
`(("libc",(glibc-for-bootstrap))
,@(package-inputs gcc-4.8)))))
@@ -393,6 +394,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(package-with-relocatable-glibc
(package (inherit gcc-4.8)
(name "gcc-static")
+ (outputs '("out")) ; all in one
(arguments
`(#:modules ((guix build utils)
(guix build gnu-build-system)
@@ -404,9 +406,20 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
((#:implicit-inputs? _) #t)
((#:configure-flags flags)
`(append (list
+ ;; We don't need a full bootstrap here.
+ "--disable-bootstrap"
+
+ ;; Make sure '-static' is passed where it matters.
+ "--with-stage1-ldflags=-static"
+
+ ;; GCC 4.8+ requires a C++ compiler and library.
+ "--enable-languages=c,c++"
+
+ ;; Make sure gcc-nm doesn't require liblto_plugin.so.
+ "--disable-lto"
+
"--disable-shared"
"--disable-plugin"
- "--enable-languages=c"
"--disable-libmudflap"
"--disable-libatomic"
"--disable-libsanitizer"
@@ -416,11 +429,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
"--disable-libquadmath"
"--disable-decimal-float")
(remove (cut string-match "--(.*plugin|enable-languages)" <>)
- ,flags)))
- ((#:make-flags flags)
- (if (%current-target-system)
- `(cons "LDFLAGS=-static" ,flags)
- `(cons "BOOT_LDFLAGS=-static" ,flags))))))
+ ,flags))))))
(native-inputs
(if (%current-target-system)
`(;; When doing a Canadian cross, we need GMP/MPFR/MPC both
@@ -442,6 +451,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
(name "gcc-stripped")
(build-system trivial-build-system)
(source #f)
+ (outputs '("out")) ;only one output
(arguments
`(#:modules ((guix build utils))
#:builder
@@ -475,7 +485,14 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
;; (‘genchecksum’, ‘gcc-nm’, etc.) rely on C++ headers.
(copy-recursively (string-append gcc "/include/c++")
(string-append includedir "/c++"))
- #t))))
+
+ ;; For native builds, check whether the binaries actually work.
+ ,(if (%current-target-system)
+ '#t
+ '(every (lambda (prog)
+ (zero? (system* (string-append gcc "/bin/" prog)
+ "--version")))
+ '("gcc" "g++" "cpp")))))))
(inputs `(("gcc" ,%gcc-static)))))
(define %guile-static
diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm
index b77e307aea..377d922a09 100644
--- a/gnu/packages/multiprecision.scm
+++ b/gnu/packages/multiprecision.scm
@@ -27,7 +27,7 @@
(define-public gmp
(package
(name "gmp")
- (version "5.1.3")
+ (version "6.0.0a")
(source (origin
(method url-fetch)
(uri
@@ -35,7 +35,7 @@
version ".tar.xz"))
(sha256
(base32
- "0wbhn3wih61vjcs94q531fipfvvzqfq2v4qr03rl3xaggyiyvqny"))))
+ "0r5pp27cy7ch3dg5v0rsny8bib1zfvrza6027g2mp5f6v8pd6mli"))))
(build-system gnu-build-system)
(native-inputs `(("m4" ,m4)))
(outputs '("out" "debug"))
diff --git a/gnu/packages/ncurses.scm b/gnu/packages/ncurses.scm
index b8f6bc834b..95ad57a10c 100644
--- a/gnu/packages/ncurses.scm
+++ b/gnu/packages/ncurses.scm
@@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;;
;;; This file is part of GNU Guix.
@@ -52,7 +52,6 @@
(("cross_compiling:=no")
"cross_compiling:=yes"))))
(post-install-phase
- ;; FIXME: The `tic' binary lacks a RUNPATH; fix it.
'(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
;; When building a wide-character (Unicode) build, create backward
@@ -95,6 +94,9 @@
`(#:configure-flags
`("--with-shared" "--without-debug" "--enable-widec"
+ ;; Create a separate libtinfo.so, as many distributions do.
+ "--with-termlib"
+
;; By default headers land in an `ncursesw' subdir, which is not
;; what users expect.
,(string-append "--includedir=" (assoc-ref %outputs "out")
@@ -105,6 +107,11 @@
,(string-append "--mandir=" (assoc-ref %outputs "out")
"/share/man")
+ ;; Make sure programs like 'tic', 'reset', and 'clear' have a
+ ;; correct RUNPATH.
+ ,(string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out")
+ "/lib")
+
;; C++ bindings fail to build on
;; `i386-pc-solaris2.11' with GCC 3.4.3:
;; <http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6395191>.
diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index 0c3f1ea4e3..4fa1d1683d 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -33,7 +33,8 @@
package-with-extra-configure-variable
static-libgcc-package
static-package
- dist-package))
+ dist-package
+ package-with-restricted-references))
;; Commentary:
;;
@@ -190,6 +191,15 @@ runs `make distcheck' and whose result is one or more source tarballs."
("gettext" ,(ref '(gnu packages gettext) 'gnu-gettext))
("texinfo" ,(ref '(gnu packages texinfo) 'texinfo))))))))
+(define (package-with-restricted-references p refs)
+ "Return a package whose outputs are guaranteed to only refer to the packages
+listed in REFS."
+ (if (eq? (package-build-system p) gnu-build-system) ; XXX: dirty
+ (package (inherit p)
+ (arguments `(#:allowed-references ,refs
+ ,@(package-arguments p))))
+ p))
+
(define %store
;; Store passed to STANDARD-INPUTS.
diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index da6b31c326..8636931ed9 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -97,7 +97,11 @@ working directory."
(begin
(mkdir "source")
(chdir "source")
- (copy-recursively source ".")
+
+ ;; Preserve timestamps (set to the Epoch) on the copied tree so that
+ ;; things work deterministically.
+ (copy-recursively source "."
+ #:keep-mtime? #t)
#t)
(and (zero? (system* "tar" "xvf" source))
(chdir (first-subdirectory ".")))))
diff --git a/guix/build/utils.scm b/guix/build/utils.scm
index 40af785b88..2f3dc9cad0 100644
--- a/guix/build/utils.scm
+++ b/guix/build/utils.scm
@@ -134,9 +134,12 @@ return values of applying PROC to the port."
(define* (copy-recursively source destination
#:key
(log (current-output-port))
- (follow-symlinks? #f))
+ (follow-symlinks? #f)
+ keep-mtime?)
"Copy SOURCE directory to DESTINATION. Follow symlinks if FOLLOW-SYMLINKS?
-is true; otherwise, just preserve them. Write verbose output to the LOG port."
+is true; otherwise, just preserve them. When KEEP-MTIME? is true, keep the
+modification time of the files in SOURCE on those of DESTINATION. Write
+verbose output to the LOG port."
(define strip-source
(let ((len (string-length source)))
(lambda (file)
@@ -152,10 +155,15 @@ is true; otherwise, just preserve them. Write verbose output to the LOG port."
(let ((target (readlink file)))
(symlink target dest)))
(else
- (copy-file file dest)))))
+ (copy-file file dest)
+ (when keep-mtime?
+ (set-file-time dest stat))))))
(lambda (dir stat result) ; down
- (mkdir-p (string-append destination
- (strip-source dir))))
+ (let ((target (string-append destination
+ (strip-source dir))))
+ (mkdir-p target)
+ (when keep-mtime?
+ (set-file-time target stat))))
(lambda (dir stat result) ; up
result)
(const #t) ; skip
@@ -170,25 +178,30 @@ is true; otherwise, just preserve them. Write verbose output to the LOG port."
stat
lstat)))
-(define (delete-file-recursively dir)
- "Delete DIR recursively, like `rm -rf', without following symlinks. Report
-but ignore errors."
- (file-system-fold (const #t) ; enter?
- (lambda (file stat result) ; leaf
- (delete-file file))
- (const #t) ; down
- (lambda (dir stat result) ; up
- (rmdir dir))
- (const #t) ; skip
- (lambda (file stat errno result)
- (format (current-error-port)
- "warning: failed to delete ~a: ~a~%"
- file (strerror errno)))
- #t
- dir
-
- ;; Don't follow symlinks.
- lstat))
+(define* (delete-file-recursively dir
+ #:key follow-mounts?)
+ "Delete DIR recursively, like `rm -rf', without following symlinks. Don't
+follow mount points either, unless FOLLOW-MOUNTS? is true. Report but ignore
+errors."
+ (let ((dev (stat:dev (lstat dir))))
+ (file-system-fold (lambda (dir stat result) ; enter?
+ (or follow-mounts?
+ (= dev (stat:dev stat))))
+ (lambda (file stat result) ; leaf
+ (delete-file file))
+ (const #t) ; down
+ (lambda (dir stat result) ; up
+ (rmdir dir))
+ (const #t) ; skip
+ (lambda (file stat errno result)
+ (format (current-error-port)
+ "warning: failed to delete ~a: ~a~%"
+ file (strerror errno)))
+ #t
+ dir
+
+ ;; Don't follow symlinks.
+ lstat)))
(define (find-files dir regexp)
"Return the lexicographically sorted list of files under DIR whose basename