mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-22 10:16:45 +01:00
gnu: hwinfo: Make with flags.
* gnu/packages/hardware.scm (hwinfo)[arguments]: Move CC, LIBDIR, and VERSION from hacky substitutions to superior #:make-flags. Honour them in the 'build phase.
This commit is contained in:
parent
84779e6271
commit
4c20d7a661
1 changed files with 6 additions and 7 deletions
|
@ -362,6 +362,10 @@ (define-public hwinfo
|
|||
(arguments
|
||||
(list
|
||||
#:tests? #f ; no test-suite available
|
||||
#:make-flags
|
||||
#~(list (string-append "CC=" #$(cc-for-target))
|
||||
(string-append "LIBDIR=" #$output:lib "/lib")
|
||||
(string-append "VERSION=" #$version))
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(add-after 'unpack 'patch
|
||||
|
@ -378,10 +382,6 @@ (define-public hwinfo
|
|||
(string-append "OUTPUT_DIRECTORY = " doc "/libhd")))
|
||||
;; Correct values of the version and install directories.
|
||||
(substitute* "Makefile"
|
||||
(("VERSION.*\\:=.*$")
|
||||
(string-append "VERSION := " #$version "\n"))
|
||||
(("LIBDIR.*\\?=.*$")
|
||||
(string-append "LIBDIR ?= " lib "\n"))
|
||||
(("/usr/include") include)
|
||||
(("/(usr|var)/(lib|lib64)") lib)
|
||||
(("/usr/sbin") sbin)
|
||||
|
@ -400,9 +400,8 @@ (define-public hwinfo
|
|||
(delete 'configure)
|
||||
(replace 'build
|
||||
(lambda* (#:key make-flags #:allow-other-keys)
|
||||
(setenv "CC" #$(cc-for-target))
|
||||
(invoke "make" "shared")
|
||||
(invoke "make" "doc")))
|
||||
(apply invoke "make" "shared" make-flags)
|
||||
(apply invoke "make" "doc" make-flags)))
|
||||
(add-after 'install 'install-man-pages
|
||||
(lambda _
|
||||
(for-each
|
||||
|
|
Loading…
Reference in a new issue