summaryrefslogtreecommitdiff
path: root/graphics/goxel/files/patch-SConstruct
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/goxel/files/patch-SConstruct')
-rw-r--r--graphics/goxel/files/patch-SConstruct35
1 files changed, 35 insertions, 0 deletions
diff --git a/graphics/goxel/files/patch-SConstruct b/graphics/goxel/files/patch-SConstruct
new file mode 100644
index 000000000000..3ee0c2f64df3
--- /dev/null
+++ b/graphics/goxel/files/patch-SConstruct
@@ -0,0 +1,35 @@
+--- SConstruct.orig 2018-12-22 14:00:12 UTC
++++ SConstruct
+@@ -28,15 +28,18 @@ clang = int(ARGUMENTS.get("clang", 0))
+ cycles = int(ARGUMENTS.get('cycles', 1))
+ sound = False
+
+-if os.environ.get('CC') == 'clang': clang = 1
++import subprocess
++if 'clang' in subprocess.check_output([os.environ.get('CC', 'cc'), '-v'],
++ stderr=subprocess.STDOUT):
++ clang = 1
++print 'clang', clang
+ if profile: debug = 0
+
+-env = Environment(ENV = os.environ)
++
++env = Environment(ENV = os.environ, CC = os.environ.get('CC', 'cc'),
++ CXX = os.environ.get('CXX', 'c++'))
+ conf = env.Configure()
+
+-if clang:
+- env.Replace(CC='clang', CXX='clang++')
+-
+ # Asan & Ubsan (need to come first).
+ # Cycles doesn't like libasan with clang, so we only use it on
+ # C code with clang.
+@@ -145,7 +148,7 @@ if cycles:
+ sources += glob.glob('ext_src/cycles/src/subd/*.cpp')
+
+ env.Append(CPPPATH=['ext_src/cycles/src'])
+- env.Append(CPPPATH=['ext_src/cycles/third_party/atomic'])
++ env.Prepend(CPPPATH=['ext_src/cycles/third_party/atomic'])
+ env.Append(CPPFLAGS=[
+ '-DCYCLES_STD_UNORDERED_MAP',
+ '-DCCL_NAMESPACE_BEGIN=namespace ccl {',