* gnu/packages/ncurses.scm (ncurses): Add `cross-pre-install-phase'.
Use different phases when (%current-target-system) is true.
* gnu/packages/readline.scm (readline): Use %standard-cross-phases as
the base when (%current-target-system) is true.
* gnu/packages/libffi.scm (libffi): Use %standard-cross-phases as the
base when cross-compiling. Add (guix build gnu-cross-build) to the
#:modules when cross-compiling. Improve synopsis.
* gnu/packages/gawk.scm (gawk)[arguments]: Use `set-shell-file-name'
phase that works when cross-compiling; use `%standard-cross-phases' as
the base when (%current-target-system) is true.
* gnu/packages/base.scm (coreutils): Remove Perl input
when (%current-target-system) is true. Use %standard-cross-phases as
the base when (%current-target-system) is true.
* guix/build-system/trivial.scm (guile-for-build): New procedure.
(trivial-build): Use it.
(trivial-cross-build): New procedure.
(trivial-build-system): Use it.
* guix/scripts/package.scm (guix-package)[ensure-default-profile]: Check
whether S is true before checking its owner. Fixes the case where we
built %PROFILE-DIRECTORY just above.
* guix/build-system/gnu.scm (inputs-search-paths): New procedure.
(standard-search-paths): Use it.
(expand-inputs): New procedure.
(standard-inputs): Use it.
(standard-cross-packages, standard-cross-inputs,
standard-cross-search-paths, gnu-cross-build): New procedures.
(gnu-build-system): Set `cross-build' field to `gnu-cross-build'.
* gnu/packages/cross-base.scm: Export `cross-gcc', `cross-binutils', and
`cross-libc'.
* guix/build/gnu-cross-build.scm: New file.
* Makefile.am (MODULES): Add it.
* gnu/packages/patches/gcc-cross-environment-variables.patch: Add two
hunks, most notably one that changes GCC to honor LIBRARY_PATH_ENV
when cross-compiling.
* guix/packages.scm (expand-input): New procedure, moved out of...
(package-derivation): ... here. Adjust accordingly.
(package-cross-derivation): Add `cross-system' and `system'
parameters.
* gnu/packages/autotools.scm (autoconf-wrapper): Wrap `configure' files
regardless of the exit code of `autoconf'. Triggered by Automake's
`t/am-prog-cc-stdc.sh'.
(automake): Update to 1.13.2.
* guix/scripts/package.scm (guix-package)[ensure-default-profile]: Check
the owner of %PROFILE-DIRECTORY. Report an error when the owner is
not the current user. Add `rtfm' procedure.
* doc/guix.texi (Invoking guix package): Mention the ownership test.
This fixes a bug whereby `read-response' would read more than just the
response, with the extra data going into the port's buffer; the
"bzip2 -dc" process spawned by `filtered-port' would not see the those
buffered data, which are definitely lost, and would bail out with
"bzip2: (stdin) is not a bzip2 file."
* guix/utils.scm (filtered-port): Document that INPUT must be
unbuffered.
* guix/web.scm (http-fetch): Add `buffered?' parameter. Call
`open-socket-for-uri' explicitly, and call `setvbuf' when BUFFERED? is
false. Pass the port to `http-get'. Close it upon 301/302.
* guix/scripts/substitute-binary.scm (fetch): Add `buffered?'
parameter. Pass it to `http-fetch'; honor it for `file' URIs.
(guix-substitute-binary): Call `fetch' with #:buffered? #f for port RAW.
* tests/utils.scm ("filtered-port, file"): Open FILE as unbuffered.
* guix/scripts/substitute-binary.scm (%regexp-exec-mutex): New variable.
(string->uri): New procedure.
(fields->alist): Wrap `regexp-exec' call in `with-mutex'.
* guix/ftp-client.scm (ftp-open): Let exceptions through.
* guix/scripts/package.scm (waiting): Wrap EXP in a `dynamic-wind', so
the line is always cleared.