summary refs log tree commit diff
path: root/gnu/packages/vpn.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2022-07-06 12:29:33 +0300
committerEfraim Flashner <efraim@flashner.co.il>2022-07-06 12:44:16 +0300
commit422e5d351378f494612b9d6a2be4c19e625eb75c (patch)
tree2ebca916dd92f01efe8437ce6662544b7546535f /gnu/packages/vpn.scm
parent8760decca72c2b720734b04517b8d3daef3b484d (diff)
downloadguix-422e5d351378f494612b9d6a2be4c19e625eb75c.tar.gz
gnu: xl2tpd: Fix cross-compiling.
* gnu/packages/vpn.scm (xl2tpd)[arguments]: Rewrite using gexps. Don't
hard-code CC as gcc.
Diffstat (limited to 'gnu/packages/vpn.scm')
-rw-r--r--gnu/packages/vpn.scm28
1 files changed, 15 insertions, 13 deletions
diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
index 23141e56a3..a1c3ab7736 100644
--- a/gnu/packages/vpn.scm
+++ b/gnu/packages/vpn.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2013, 2016, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2015 Jeff Mickey <j@codemac.net>
-;;; Copyright © 2016, 2017, 2019, 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2019, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2018, 2020 Pierre Langlois <pierre.langlois@gmx.com>
@@ -1175,18 +1175,20 @@ public keys and can roam across IP addresses.")
                 "0is5ccrvijz0pfm45pfrlbb9y8231yz3c4zqs8mkgakl9rxajy6l"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:make-flags (list (string-append "PREFIX=" %output)
-                          "CC=gcc")
-       #:phases (modify-phases %standard-phases
-                  (delete 'configure) ;no configure script
-                  (add-before 'build 'setup-environment
-                    (lambda* (#:key inputs #:allow-other-keys)
-                      (substitute* "l2tp.h"
-                        (("/usr/sbin/pppd")
-                         (search-input-file inputs "/sbin/pppd")))
-                      (setenv "KERNELSRC"
-                              (assoc-ref inputs "kernel-headers"))
-                      #t)))
+     (list
+       #:make-flags
+       #~(list (string-append "PREFIX=" #$output)
+               (string-append "CC=" #$(cc-for-target)))
+       #:phases
+       #~(modify-phases %standard-phases
+           (delete 'configure) ;no configure script
+           (add-before 'build 'setup-environment
+             (lambda* (#:key inputs #:allow-other-keys)
+               (substitute* "l2tp.h"
+                 (("/usr/sbin/pppd")
+                  (search-input-file inputs "/sbin/pppd")))
+               (setenv "KERNELSRC"
+                       (assoc-ref inputs "kernel-headers")))))
        #:tests? #f))                    ; no tests provided
     (inputs (list libpcap ppp))
     (home-page "https://www.xelerance.com/software/xl2tpd/")