From 1baf2bb97ab79cd020718605131b0a087fa215b4 Mon Sep 17 00:00:00 2001
Message-Id: <1baf2bb97ab79cd020718605131b0a087fa215b4.1657012966.git.me@jeandudey.tech>
From: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
Date: Tue, 5 Jul 2022 11:21:07 +0200
Subject: [PATCH] gnu: xl2tpd: Fix cross-compilation.
* gnu/packages/vpn.scm (xl2tpd): Fix cross-compilation.
[arguments]: Use G-Expressions and use `cc-for-target'.
---
gnu/packages/vpn.scm | 28 +++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)
@@ -1175,19 +1175,21 @@ (define-public xl2tpd
"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)))
- #:tests? #f)) ; no tests provided
+ (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"))
+ #t)))
+ #:tests? #f)) ;; No tests provided.
(inputs (list libpcap ppp))
(home-page "https://www.xelerance.com/software/xl2tpd/")
(synopsis "Layer 2 Tunnelling Protocol Daemon (RFC 2661)")
--
2.36.1