summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/btanks-scons-python.patch
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2025-06-15 00:35:26 +0200
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-06-20 15:06:04 +0100
commit3dc723b83ea6991b0bebb216e4525851e1638072 (patch)
tree947993b8de2756358370373703e2e993a65dfa3d /gnu/packages/patches/btanks-scons-python.patch
parent67c093a1c6784ce885853f4b03ad4ac673f554d4 (diff)
gnu: btanks: Switch to scons-python.
* gnu/packages/patches/btanks-scons-python.patch: Add file. * gnu/packages/patches/btanks-sl08-python.patch: Add file. * gnu/local.mk: Record patches * gnu/packages/games.scm (btanks): [source]{patches}: Record them. [arguments]{scons}: Remove keyword. {phases}: Refresh phase 'replace-removed-scons-syntax. [inputs]: Add python-wrapper. Change-Id: Id1e60938a22bf907288871187c0f481ba174e33e Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu/packages/patches/btanks-scons-python.patch')
-rw-r--r--gnu/packages/patches/btanks-scons-python.patch112
1 files changed, 112 insertions, 0 deletions
diff --git a/gnu/packages/patches/btanks-scons-python.patch b/gnu/packages/patches/btanks-scons-python.patch
new file mode 100644
index 0000000000..6de2b04cce
--- /dev/null
+++ b/gnu/packages/patches/btanks-scons-python.patch
@@ -0,0 +1,112 @@
+Author: Reiner Herrmann <reiner@reiner-h.de>
+Description: Fix build with recent scons version
+Bug-Debian: https://bugs.debian.org/947555
+
+--- a/SConstruct
++++ b/SConstruct
+@@ -16,7 +16,7 @@
+ env['BUILDERS']['StaticLibrary'] = picLibBuilder
+ env['BUILDERS']['Library'] = picLibBuilder
+
+-opts = Options(['options.cache'])
++opts = Variables(['options.cache'])
+ #opts.Add('CC', 'C compiler')
+ #opts.Add('CXX', 'C++ compiler')
+ opts.Add('CCFLAGS', 'General options that are passed to the C compiler')
+@@ -33,9 +33,9 @@
+ opts.Add('lib_dir', 'resources directory (default: prefix/lib)', '')
+ opts.Add('plugins_dir', 'plugins directory (default: prefix/lib/btanks)', '')
+ opts.Add('resources_dir', 'resources directory (default: prefix/share/btanks)', '')
+- opts.Add(BoolOption('gcc_visibility', 'gcc visibility', 'true'))
++ opts.Add(BoolVariable('gcc_visibility', 'gcc visibility', 'true'))
+
+-opts.Add(EnumOption('mode', 'build mode', 'release', allowed_values=('debug','release')))
++opts.Add(EnumVariable('mode', 'build mode', 'release', allowed_values=('debug','release')))
+
+ opts.Update(env)
+ opts.Save('options.cache', env.Clone())
+@@ -47,15 +47,15 @@
+ Export('debug')
+
+ import SCons.Util
+-if os.environ.has_key('CC'):
++if 'CC' in os.environ:
+ env['CC'] = os.environ['CC']
+-if os.environ.has_key('CFLAGS'):
++if 'CFLAGS' in os.environ:
+ env['CCFLAGS'] += SCons.Util.CLVar(os.environ['CFLAGS'])
+-if os.environ.has_key('CXX'):
++if 'CXX' in os.environ:
+ env['CXX'] = os.environ['CXX']
+-if os.environ.has_key('CXXFLAGS'):
++if 'CXXFLAGS' in os.environ:
+ env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS'])
+-if os.environ.has_key('LDFLAGS'):
++if 'LDFLAGS' in os.environ:
+ env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
+
+ if (sys.platform != "win32" and env['gcc_visibility']):
+@@ -174,7 +174,7 @@
+ lib_dir = '.'
+ plugins_dir = ''
+ try :
+- version_file = file('.svnversion', 'r')
++ version_file = open('.svnversion', 'r')
+ try :
+ version = version_file.readline().strip()
+ prefix = env['prefix']
+@@ -202,7 +202,7 @@
+
+ except:
+ info = sys.exc_info()
+- print "%s %s %s" %(info[0], info[1], info[2])
++ print("%s %s %s" %(info[0], info[1], info[2]))
+ except :
+ svnversion = os.popen('svnversion -n .', 'r')
+ version = svnversion.readline().strip()
+@@ -243,29 +243,29 @@
+ Export('plugins_dir')
+
+ version = '0.9.%s' %version
+-print "version: %s" %version
++print("version: %s" %version)
+
+ bt_sublibs = ['mrt', 'sdlx', 'objects', 'clunk']
+ env.Append(CPPPATH=['#'])
+
+ if (os.path.exists('private')):
+ dir = 'private'
+- BuildDir('#/build/' + buildmode + '/' + dir, dir, 0)
++ VariantDir('#/build/' + buildmode + '/' + dir, dir, 0)
+ SConscript('#/build/' + buildmode + '/' + dir + '/SConscript')
+
+ for dir in bt_sublibs:
+- BuildDir('#/build/' + buildmode + '/' + dir, dir, 0)
++ VariantDir('#/build/' + buildmode + '/' + dir, dir, 0)
+ SConscript('#/build/' + buildmode + '/' + dir + '/SConscript')
+
+ for dir in bt_sublibs:
+ env.Append(LIBPATH=['#/build/' + buildmode + '/' + dir])
+
+-env.BuildDir('#/build/' + buildmode + '/editor', 'editor', 0)
++env.VariantDir('#/build/' + buildmode + '/editor', 'editor', 0)
+ SConscript('#/build/' + buildmode + '/editor/SConscript')
+
+ env.Append(LIBPATH=['#/build/' + buildmode + '/engine'])
+
+-env.BuildDir('#/build/' + buildmode + '/engine', 'engine', 0)
++env.VariantDir('#/build/' + buildmode + '/engine', 'engine', 0)
+ SConscript('#/build/' + buildmode + '/engine/' + 'SConscript')
+
+ if len(install_targets) > 0:
+--- a/mrt/SConscript
++++ b/mrt/SConscript
+@@ -20,7 +20,7 @@
+ 'net_exception.cpp', 'dict_serializator.cpp',
+ ], LIBS=libs)
+
+-if sys.platform != 'win32' and env.has_key('prefix') and len(env['prefix']) > 0:
++if sys.platform != 'win32' and 'prefix' in env and len(env['prefix']) > 0:
+ Import('install_targets')
+ Import('lib_dir')
+ install_targets.append(Install(lib_dir, mrt))