diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-02-22 00:34:49 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-02-22 00:34:49 +0100 |
commit | 17919a58012c38052133ed029450fdb98d01fb5c (patch) | |
tree | 525bb5af3e77fd69c24123e748df82916209754e | |
parent | b2bfa32d253337a48f3bc0260982cbb945b345a3 (diff) | |
download | patches-17919a58012c38052133ed029450fdb98d01fb5c.tar patches-17919a58012c38052133ed029450fdb98d01fb5c.tar.gz |
build-system/gnu: Allow the source to be a directory.
* guix/build/gnu-build-system.scm (unpack): Check if SOURCE is a
directory, and copy it locally if it is.
* gnu/packages/libwebsockets.scm (libwebsockets)[arguments]: Remove
'unpack' phase.
-rw-r--r-- | gnu/packages/libwebsockets.scm | 22 | ||||
-rw-r--r-- | guix/build/gnu-build-system.scm | 15 |
2 files changed, 18 insertions, 19 deletions
diff --git a/gnu/packages/libwebsockets.scm b/gnu/packages/libwebsockets.scm index 3f900aef72..65aa174355 100644 --- a/gnu/packages/libwebsockets.scm +++ b/gnu/packages/libwebsockets.scm @@ -50,22 +50,12 @@ (build-system gnu-build-system) (arguments - '(#:phases (alist-replace - 'unpack - ;; FIXME: Remove this when gnu-build-system handles that - ;; case correctly. - (lambda* (#:key source #:allow-other-keys) - (mkdir "source") - (chdir "source") - (copy-recursively source ".") - #t) - - (alist-cons-before - 'configure 'bootstrap - (lambda _ - (chmod "libwebsockets-api-doc.html" #o666) - (zero? (system* "./autogen.sh"))) - %standard-phases)))) + '(#:phases (alist-cons-before + 'configure 'bootstrap + (lambda _ + (chmod "libwebsockets-api-doc.html" #o666) + (zero? (system* "./autogen.sh"))) + %standard-phases))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) ("libtool" ,libtool "bin") diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index 4cda7fc11a..da6b31c326 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.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. ;;; @@ -90,8 +90,17 @@ #t) (define* (unpack #:key source #:allow-other-keys) - (and (zero? (system* "tar" "xvf" source)) - (chdir (first-subdirectory ".")))) + "Unpack SOURCE in the working directory, and change directory within the +source. When SOURCE is a directory, copy it in a sub-directory of the current +working directory." + (if (file-is-directory? source) + (begin + (mkdir "source") + (chdir "source") + (copy-recursively source ".") + #t) + (and (zero? (system* "tar" "xvf" source)) + (chdir (first-subdirectory "."))))) (define* (patch-source-shebangs #:key source #:allow-other-keys) "Patch shebangs in all source files; this includes non-executable |