commit 5721bfc120a15121fcb164c8e188e7faebc6bf37
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Fri Aug 11 01:54:45 2023 +0100
fix
fix_scons_issue.patch | 68 +++++++++++++++++++++++++++++++++++++--------------
1 file changed, 49 insertions(+), 19 deletions(-)
---
diff --git a/fix_scons_issue.patch b/fix_scons_issue.patch
index e90fdf8..242ca48 100644
--- a/fix_scons_issue.patch
+++ b/fix_scons_issue.patch
@@ -1,22 +1,33 @@
-From 769164a55bd74f2f11d14dd5175fbee01cf77638 Mon Sep 17 00:00:00 2001
-From: Arne de Bruijn <mail(a)arnedebruijn.nl>
-Date: Wed, 22 Mar 2023 10:41:28 +0100
-Subject: [PATCH] Fix SConstruct for scons 4.5.0+
-
-env['CPPDEFINES'] may return a deque object in scons 4.5.0+ (see
-SCons/scons#4321).
-Explicitly convert it to a list where needed.
-
-Tested with scons 4.4.0, 4.5.0, 4.5.1 and 4.5.2.
----
- SConstruct | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/SConstruct b/SConstruct
-index d89d101f9..7dfea1e1f 100644
--- a/SConstruct
+++ b/SConstruct
-@@ -4771,7 +4771,7 @@ class DXXProgram(DXXCommon):
+@@ -310,7 +310,7 @@
+ # creates copies, so it is safe for the default value to be
+ # shared.
+ def __init__(self,env,keyviews,_l=[]):
+- self.flags = {k: env.get(k, _l)[:] for k in itertools.chain.from_iterable(keyviews)}
++ self.flags = {k: env.get(k, _l).copy() for k in
itertools.chain.from_iterable(keyviews)}
+ def restore(self,env):
+ env.Replace(**self.flags)
+ def __getitem__(self,name):
+@@ -1527,7 +1527,7 @@
+ # If joysticks are disabled, then disable all possible
+ # inputs.
+ user_settings.max_axes_per_joystick = user_settings.max_buttons_per_joystick =
user_settings.max_hats_per_joystick = 0
+- successflags['CPPDEFINES'] = CPPDEFINES =
successflags.get('CPPDEFINES', [])[:]
++ successflags['CPPDEFINES'] = CPPDEFINES =
successflags.get('CPPDEFINES', []).copy()
+ # use Redbook if at least one of the following applies
+ # 1. we are on SDL1
+ # 2. we are building for a platform for which we have a custom CD implementation
(currently only win32)
+@@ -4528,7 +4528,7 @@
+ user_settings = self.user_settings
+ builddir = env.Dir(user_settings.builddir).Dir(self.srcdir)
+ for test in runtime_test_boost_tests:
+- LIBS = [] if test.nodefaultlibs else env['LIBS'][:]
++ LIBS = [] if test.nodefaultlibs else env['LIBS'].copy()
+ LIBS.append('boost_unit_test_framework')
+ env.Program(target=builddir.File(test.target), source=test.source(self), LIBS=LIBS)
+
+@@ -4771,7 +4771,7 @@
# Bypass ccache, if any, since this is a preprocess only
# call.
kwargs['CXXFLAGS'] = (env['CXXFLAGS'] or []) + ['-E']
@@ -34,7 +45,7 @@ index d89d101f9..7dfea1e1f 100644
get_objects_similar_arch_ogl =
DXXCommon.create_lazy_object_states_getter((LazyObjectState(sources=(
'similar/arch/ogl/gr.cpp',
'similar/arch/ogl/ogl.cpp',
-@@ -4887,7 +4887,7 @@ class DXXProgram(DXXCommon):
+@@ -4887,7 +4887,7 @@
), LazyObjectState(sources=(
'similar/main/inferno.cpp',
),
@@ -43,7 +54,7 @@ index d89d101f9..7dfea1e1f 100644
transform_target=_apply_target_name,
), LazyObjectState(sources=(
'similar/main/kconfig.cpp',
-@@ -4897,7 +4897,7 @@ class DXXProgram(DXXCommon):
+@@ -4897,7 +4897,7 @@
), LazyObjectState(sources=(
'similar/misc/physfsx.cpp',
),
@@ -52,3 +63,22 @@ index d89d101f9..7dfea1e1f 100644
transform_target=_apply_target_name,
), LazyObjectState(sources=(
'similar/main/playsave.cpp',
+@@ -5108,7 +5108,7 @@
+ objects.extend(self.get_objects_editor())
+ objects.extend(static_archive_construction.get_objects_editor())
+ versid_build_environ = ['CXX', 'CPPFLAGS', 'CXXFLAGS',
'LINKFLAGS']
+- versid_cppdefines = env['CPPDEFINES'][:]
++ versid_cppdefines = env['CPPDEFINES'].copy()
+ extra_version = user_settings.extra_version
+ if extra_version is None:
+ extra_version = 'v%u.%u' % (self.VERSION_MAJOR, self.VERSION_MINOR)
+@@ -5226,7 +5226,7 @@
+ env.Install(install_dir, exe_node)
+ env.Alias('install', install_dir)
+ else:
+- syspath = sys.path[:]
++ syspath = sys.path.copy()
+ cocoa = 'common/arch/cocoa'
+ sys.path += [cocoa]
+ import tool_bundle
+