From 0919d6148faa40914a6cfe574688734dbda8728d Mon Sep 17 00:00:00 2001
From: Mathieu Othacehe <othacehe@gnu.org>
Date: Mon, 22 Jun 2020 16:46:09 +0200
Subject: [PATCH] gnu: xl2tpd: Fix build.

* gnu/packages/vpn.scm (xl2tpd)[arguments]: Substitute hardcoded pppd path
instead of trying to set CFLAGS variable.
---
 gnu/packages/vpn.scm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm
index 26cb67661e5..e6a2f42ee39 100644
--- a/gnu/packages/vpn.scm
+++ b/gnu/packages/vpn.scm
@@ -648,10 +648,10 @@ (define-public xl2tpd
                   (delete 'configure) ;no configure script
                   (add-before 'build 'setup-environment
                     (lambda* (#:key inputs #:allow-other-keys)
-                      (setenv "CFLAGS"
-                              (string-append "-DPPPD=\""
-                                             (assoc-ref inputs "ppp")
-                                             "/sbin/pppd\""))
+                      (substitute* "l2tp.h"
+                        (("/usr/sbin/pppd")
+                         (string-append (assoc-ref inputs "ppp")
+                                        "/sbin/pppd")))
                       (setenv "KERNELSRC"
                               (assoc-ref inputs "linux-libre-headers"))
                       #t)))
-- 
GitLab