summaryrefslogtreecommitdiff
blob: 41f1263e34652c735b2bd1ac4af015291a39f1d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From c80d18b41701082e60ce6bfa5bd6a274affaff96 Mon Sep 17 00:00:00 2001
From: James Le Cuirot <chewi@gentoo.org>
Date: Sun, 22 May 2022 12:00:01 +0100
Subject: [PATCH] Most build systems respect the CPP env var instead of just
 calling cpp

---
 setup.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index f84d56c6d..7f0db3b69 100755
--- a/setup.py
+++ b/setup.py
@@ -149,6 +149,7 @@ ARM = ARCH.startswith("arm") or ARCH.startswith("aarch")
 print("ARCH=%s" % (ARCH,))
 
 INCLUDE_DIRS = os.environ.get("INCLUDE_DIRS", os.path.join(sys.prefix, "include")).split(os.pathsep)
+CPP = os.environ.get("CPP", "cpp")
 
 from xpra.platform.features import LOCAL_SERVERS_SUPPORTED, SHADOW_SUPPORTED
 shadow_ENABLED = SHADOW_SUPPORTED and DEFAULT
@@ -2423,7 +2424,7 @@ if v4l2_ENABLED:
         ENABLE_DEVICE_CAPS = 0
         if os.path.exists(videodev2_h):
             try:
-                with subprocess.Popen("cpp -fpreprocessed %s | grep -q device_caps" % videodev2_h,
+                with subprocess.Popen("%s -fpreprocessed %s | grep -q device_caps" % (CPP, videodev2_h),
                                      shell=True) as proc:
                     ENABLE_DEVICE_CAPS = proc.wait()==0
             except OSError:
-- 
2.35.1