summaryrefslogtreecommitdiff
path: root/recipes-navigation/gpsd/gpsd-3.20/0002-SConstruct-fix.patch
blob: 111e3044cb9ddea3d967994bab204c43e30c7fa3 (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
35
36
37
38
39
40
41
42
43
From f59c31cc7c36944e9a45ac920ce14233060a7a11 Mon Sep 17 00:00:00 2001
From: Serhii Voloshynov <serhii.voloshynov@globallogic.com>
Date: Tue, 8 Dec 2020 11:04:12 +0200
Subject: [PATCH] fix unbuildable SConstruct. the fix was taken from previous
 versions

---
 SConstruct | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/SConstruct b/SConstruct
index 6546f73..3742e43 100644
--- a/SConstruct
+++ b/SConstruct
@@ -386,17 +386,19 @@ env['SC_PYTHON'] = sys.executable  # Path to SCons Python
 # So we rely on MergeFlags/ParseFlags to do the right thing for us.
 env['STRIP'] = "strip"
 env['PKG_CONFIG'] = "pkg-config"
-for i in ["AR", "CC", "CXX", "LD",
-          "PKG_CONFIG", "STRIP", "TAR"]:
+for i in ["AR", "ARFLAGS", "CC", "CCFLAGS", "CFLAGS", "CXX", "CXXFLAGS", "LD",
+          "LINKFLAGS", "PKG_CONFIG", "STRIP", "TAR"]:
     if i in os.environ:
         j = i
         if i == "LD":
             i = "SHLINK"
-        env[i] = os.getenv(j)
-for i in ["ARFLAGS", "CFLAGS", "CXXFLAGS", "LDFLAGS", "SHLINKFLAGS",
-          "CPPFLAGS", "CCFLAGS", "LINKFLAGS"]:
+        if i in ("CFLAGS", "CCFLAGS", "LINKFLAGS"):
+            env.Replace(**{j: Split(os.getenv(i))})
+        else:
+            env.Replace(**{j: os.getenv(i)})
+for flag in ["LDFLAGS", "SHLINKFLAGS", "CPPFLAGS"]:
     if i in os.environ:
-        env.MergeFlags(Split(os.getenv(i)))
+        env.MergeFlags({flag: Split(os.getenv(flag))})
 
 
 # Keep scan-build options in the environment
-- 
2.7.4