summaryrefslogtreecommitdiff
path: root/graphics/goxel/files/patch-SConstruct
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2022-11-09 11:20:56 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2022-11-09 11:20:56 +0000
commitf6123f561a05ded0cf2af0c9cb1f7c86e48653ae (patch)
tree881edce8dcea95604a8f68f8bb38828f7e23d983 /graphics/goxel/files/patch-SConstruct
parentsecurity/vuxml: add www/chromium < 107.0.5304.110 (diff)
graphics/goxel: resurrect the port, unbreak against Python 3.x
Keep the changes at minimum to help Git track history better.
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..a4c6b5177ff8
--- /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 b'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 {',