aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/admin.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2020-11-16 10:39:19 +0200
committerEfraim Flashner <efraim@flashner.co.il>2020-11-16 10:40:09 +0200
commit8ec5adce4119c5b574c92a0558fc6686d5563252 (patch)
tree7aa644572d9c96f675ee994ea20f8e98a79742c7 /gnu/packages/admin.scm
parent8f447b1ae5612b9090675e2108504b973e6547be (diff)
downloadguix-8ec5adce4119c5b574c92a0558fc6686d5563252.tar
guix-8ec5adce4119c5b574c92a0558fc6686d5563252.tar.gz
gnu: wpa-supplicant-minimal: Cross compile.
* gnu/packages/admin.scm (wpa-supplicant-minimal)[arguments]: Use cc-for-target in make-flags. Adjust custom 'configure phase to use the correct pkg-config for the target.
Diffstat (limited to 'gnu/packages/admin.scm')
-rw-r--r--gnu/packages/admin.scm15
1 files changed, 12 insertions, 3 deletions
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 1ae44ee4ce..5f1f7ccca9 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -1559,10 +1559,10 @@ features of sudo with a fraction of the codebase.")
#t))))
(build-system gnu-build-system)
(arguments
- '(#:phases
+ `(#:phases
(modify-phases %standard-phases
(replace 'configure
- (lambda* (#:key outputs #:allow-other-keys)
+ (lambda _
(chdir "wpa_supplicant")
(copy-file "defconfig" ".config")
(let ((port (open-file ".config" "al")))
@@ -1576,6 +1576,15 @@ features of sudo with a fraction of the codebase.")
CONFIG_LIBNL32=y
CONFIG_READLINE=y\n" port)
(close-port port))
+ ;; Make sure we have a pkg-config when cross compiling
+ (substitute* '(".config"
+ "Android.mk"
+ "Makefile"
+ "dbus/Makefile")
+ (("pkg-config")
+ (or (which "pkg-config")
+ (which (string-append ,(%current-target-system)
+ "-pkg-config")))))
#t))
(add-after 'install 'install-documentation
(lambda* (#:key outputs #:allow-other-keys)
@@ -1604,7 +1613,7 @@ features of sudo with a fraction of the codebase.")
"wpa_supplicant.conf"))
#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")