me
/
guix
Archived
1
0
Fork 0

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.
master
Ludovic Courtès 2014-02-22 00:34:49 +01:00
parent b2bfa32d25
commit 17919a5801
2 changed files with 18 additions and 19 deletions

View File

@ -50,22 +50,12 @@
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
'(#:phases (alist-replace '(#:phases (alist-cons-before
'unpack 'configure 'bootstrap
;; FIXME: Remove this when gnu-build-system handles that (lambda _
;; case correctly. (chmod "libwebsockets-api-doc.html" #o666)
(lambda* (#:key source #:allow-other-keys) (zero? (system* "./autogen.sh")))
(mkdir "source") %standard-phases)))
(chdir "source")
(copy-recursively source ".")
#t)
(alist-cons-before
'configure 'bootstrap
(lambda _
(chmod "libwebsockets-api-doc.html" #o666)
(zero? (system* "./autogen.sh")))
%standard-phases))))
(native-inputs `(("autoconf" ,autoconf) (native-inputs `(("autoconf" ,autoconf)
("automake" ,automake) ("automake" ,automake)
("libtool" ,libtool "bin") ("libtool" ,libtool "bin")

View File

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU ;;; 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. ;;; This file is part of GNU Guix.
;;; ;;;
@ -90,8 +90,17 @@
#t) #t)
(define* (unpack #:key source #:allow-other-keys) (define* (unpack #:key source #:allow-other-keys)
(and (zero? (system* "tar" "xvf" source)) "Unpack SOURCE in the working directory, and change directory within the
(chdir (first-subdirectory ".")))) 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) (define* (patch-source-shebangs #:key source #:allow-other-keys)
"Patch shebangs in all source files; this includes non-executable "Patch shebangs in all source files; this includes non-executable