From 422e5d351378f494612b9d6a2be4c19e625eb75c Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Wed, 6 Jul 2022 12:29:33 +0300 Subject: gnu: xl2tpd: Fix cross-compiling. * gnu/packages/vpn.scm (xl2tpd)[arguments]: Rewrite using gexps. Don't hard-code CC as gcc. --- gnu/packages/vpn.scm | 28 +++++++++++++++------------- 1 file 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 ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2015 Jeff Mickey -;;; Copyright © 2016, 2017, 2019, 2021 Efraim Flashner +;;; Copyright © 2016, 2017, 2019, 2021, 2022 Efraim Flashner ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice ;;; Copyright © 2017 Julien Lepiller ;;; Copyright © 2018, 2020 Pierre Langlois @@ -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/") -- cgit v1.2.1