gnu: hostapd: Cross compile.
* gnu/packages/admin.scm (hostapd)[arguments]: Use cc-for-target in make-flags. Add custom flag to use correct pkg-config for target.
This commit is contained in:
parent
164c49100d
commit
afcf90c60f
@ -1723,10 +1723,10 @@ command.")
|
||||
"1mrbvg4v7vm7mknf0n29mf88k3s4a4qj6r4d51wq8hmjj1m7s7c8"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
'(#:phases
|
||||
`(#:phases
|
||||
(modify-phases %standard-phases
|
||||
(replace 'configure
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(lambda _
|
||||
;; This is mostly copied from 'wpa-supplicant' above.
|
||||
(chdir "hostapd")
|
||||
(copy-file "defconfig" ".config")
|
||||
@ -1738,6 +1738,14 @@ command.")
|
||||
CONFIG_IEEE80211AC=y\n" port)
|
||||
(close-port port))
|
||||
#t))
|
||||
(add-after 'unpack 'patch-pkg-config
|
||||
(lambda _
|
||||
(substitute* "src/drivers/drivers.mak"
|
||||
(("pkg-config")
|
||||
(or (which "pkg-config")
|
||||
(string-append ,(%current-target-system)
|
||||
"-pkg-config"))))
|
||||
#t))
|
||||
(add-after 'install 'install-man-pages
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
@ -1754,7 +1762,7 @@ command.")
|
||||
(find-files "." "\\.8"))
|
||||
#t))))
|
||||
|
||||
#:make-flags (list "CC=gcc"
|
||||
#:make-flags (list (string-append "CC=" ,(cc-for-target))
|
||||
(string-append "BINDIR=" (assoc-ref %outputs "out")
|
||||
"/sbin")
|
||||
(string-append "LIBDIR=" (assoc-ref %outputs "out")
|
||||
|
Loading…
x
Reference in New Issue
Block a user