gnu: wireles-tools: Fix cross-compilation.

* gnu/packages/linux.scm (wireless-tools)[source]:
Rewrite as G-expression.
[arguments]: Likewise to avoid %OUTPUT when cross-compiling.
Remove superfluous %CURRENT-TARGET-SYSTEM call.
Don't explicitly return #t from phases.
This commit is contained in:
Tobias Geerinckx-Rice 2022-01-08 03:49:03 +01:00
parent bb2c7e2e13
commit 9644d5b1e6
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -4151,42 +4151,40 @@ (define-public wireless-tools
(package
(name "wireless-tools")
(version "30.pre9")
(source (origin
(method url-fetch)
(uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools."
version ".tar.gz"))
(sha256
(base32
"0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
(snippet
'(begin
;; Remove the older header files that are not free software.
(for-each (lambda (n)
(delete-file (format #f "wireless.~a.h" n)))
'(10 11 12 13 14 15 16 17 18 19 20))
#t))))
(source
(origin
(method url-fetch)
(uri (string-append "http://www.hpl.hp.com/personal/Jean_Tourrilhes/"
"Linux/wireless_tools." version ".tar.gz"))
(sha256
(base32 "0qscyd44jmhs4k32ggp107hlym1pcyjzihiai48xs7xzib4wbndb"))
(snippet
#~(begin
;; Remove the older header files that are not free software.
(for-each (lambda (n)
(delete-file (format #f "wireless.~a.h" n)))
'(10 11 12 13 14 15 16 17 18 19 20))))))
(build-system gnu-build-system)
(arguments
`(#:make-flags
(list (string-append "PREFIX=" %output)
(string-append "INSTALL_MAN=" %output "/share/man")
(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib")
"BUILD_STATIC=")
#:phases
(modify-phases %standard-phases
(replace 'configure
(lambda* (#:key target #:allow-other-keys)
(when ,(%current-target-system)
;; Cross-compilation: use the cross tools.
(substitute* (find-files "." "Makefile")
(("CC = .*$")
(string-append "CC = " target "-gcc\n"))
(("AR = .*$")
(string-append "AR = " target "-ar\n"))
(("RANLIB = .*$")
(string-append "RANLIB = " target "-ranlib\n"))))
#t)))
#:tests? #f))
(list #:make-flags
#~(list (string-append "PREFIX=" #$output)
(string-append "INSTALL_MAN=" #$output "/share/man")
(string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib")
"BUILD_STATIC=")
#:phases
#~(modify-phases %standard-phases
(replace 'configure
(lambda* (#:key target #:allow-other-keys)
(when target
;; Cross-compilation: use the cross tools.
(substitute* (find-files "." "Makefile")
(("CC = .*$")
(string-append "CC = " target "-gcc\n"))
(("AR = .*$")
(string-append "AR = " target "-ar\n"))
(("RANLIB = .*$")
(string-append "RANLIB = " target "-ranlib\n")))))))
#:tests? #f))
(synopsis "Tools for manipulating Linux Wireless Extensions")
(description "Wireless Tools are used to manipulate the now-deprecated
Linux Wireless Extensions; consider using @code{iw} instead. The Wireless