scons.diff 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. diff -Naur bombono-dvd-1.2.4/SConstruct bombono-dvd-1.2.4.patched/SConstruct
  2. --- bombono-dvd-1.2.4/SConstruct 2016-04-10 06:45:39.000000000 -0400
  3. +++ bombono-dvd-1.2.4.patched/SConstruct 2022-02-15 13:53:32.444205004 -0500
  4. @@ -274,13 +274,13 @@
  5. # Config
  6. if os.path.exists( BV.CfgFile ):
  7. - print "Using config file: " + BV.CfgFile
  8. + print("Using config file: " + BV.CfgFile)
  9. user_options = Variables(BV.CfgFile, BV.Args)
  10. ParseVariables(user_options)
  11. else:
  12. - print "Creating new config file: " + BV.CfgFile
  13. + print("Creating new config file: " + BV.CfgFile)
  14. user_options = Variables(None, BV.Args)
  15. ParseVariables(user_options)
  16. @@ -352,20 +352,19 @@
  17. def GenerateBaseConfigH(target, source, env):
  18. cfg_file = open(target[0].path, 'w')
  19. - print >> cfg_file, "/* Generated by means of Autoconfig */"
  20. + print("/* Generated by means of Autoconfig */", file=cfg_file)
  21. config_dict = user_options_dict['CONFIGURATION']
  22. - key_list = config_dict.keys()
  23. - key_list.sort()
  24. + key_list = sorted(config_dict)
  25. for key in key_list:
  26. var = config_dict[key]
  27. text = var.get('text', None)
  28. if text:
  29. - print >> cfg_file
  30. + print("", file=cfg_file)
  31. BV.AddComment(cfg_file, var)
  32. - print >> cfg_file, text
  33. + print(text, file=cfg_file)
  34. continue
  35. BV.AddDefine(cfg_file, key, **var)
  36. diff -Naur bombono-dvd-1.2.4/libs/mpeg2dec/SConscript bombono-dvd-1.2.4.patched/libs/mpeg2dec/SConscript
  37. --- bombono-dvd-1.2.4/libs/mpeg2dec/SConscript 2016-04-10 06:45:39.000000000 -0400
  38. +++ bombono-dvd-1.2.4.patched/libs/mpeg2dec/SConscript 2022-02-15 13:47:04.028766834 -0500
  39. @@ -69,9 +69,9 @@
  40. def GenerateMpeg2DecCfg(target, source, env):
  41. cfg_file = open(target[0].path, 'w')
  42. - print >> cfg_file, "/* Auto-generated header */"
  43. - print >> cfg_file
  44. - print >> cfg_file, '#include <cfg/config.h>'
  45. + print("/* Auto-generated header */", file=cfg_file)
  46. + print("", file=cfg_file)
  47. + print('#include <cfg/config.h>', file=cfg_file)
  48. BuildVars.AddDefine(cfg_file, 'ACCEL_DETECT', is_on = 1, comment = "autodetect accelerations")
  49. BuildVars.AddDefine(cfg_file, 'LIBVO_DX', is_on = 0, comment = "libvo DirectX support")
  50. diff -Naur bombono-dvd-1.2.4/po/SConscript bombono-dvd-1.2.4.patched/po/SConscript
  51. --- bombono-dvd-1.2.4/po/SConscript 2016-04-10 06:45:39.000000000 -0400
  52. +++ bombono-dvd-1.2.4.patched/po/SConscript 2022-02-15 13:47:04.028766834 -0500
  53. @@ -35,7 +35,7 @@
  54. str(source[0]),
  55. str(source[1]),
  56. ]
  57. - print 'Updating ' + trgt
  58. + print('Updating ' + trgt)
  59. return os.spawnvp(os.P_WAIT, 'msgmerge', args)
  60. po_bld = Builder (action = po_builder)
  61. diff -Naur bombono-dvd-1.2.4/src/mgui/tests/SConscript bombono-dvd-1.2.4.patched/src/mgui/tests/SConscript
  62. --- bombono-dvd-1.2.4/src/mgui/tests/SConscript 2016-04-10 06:45:39.000000000 -0400
  63. +++ bombono-dvd-1.2.4.patched/src/mgui/tests/SConscript 2022-02-15 13:47:04.028766834 -0500
  64. @@ -36,8 +36,8 @@
  65. bin_mgui_tests_env.Program(target=test_prg_name, source = source_files+lib_mgui_objs)
  66. import os
  67. -if os.environ.has_key('DISPLAY'):
  68. +if 'DISPLAY' in os.environ:
  69. UnitTest(test_prg_name, bin_mgui_tests_env)
  70. else:
  71. - print "Warning: X Display is not found. GUI tests are disabled."
  72. + print("Warning: X Display is not found. GUI tests are disabled.")
  73. diff -Naur bombono-dvd-1.2.4/tools/scripts/BuildVars.py bombono-dvd-1.2.4.patched/tools/scripts/BuildVars.py
  74. --- bombono-dvd-1.2.4/tools/scripts/BuildVars.py 2016-04-10 06:45:39.000000000 -0400
  75. +++ bombono-dvd-1.2.4.patched/tools/scripts/BuildVars.py 2022-02-15 13:47:54.476603032 -0500
  76. @@ -30,11 +30,11 @@
  77. def PrintBright(is_end):
  78. if not is_end:
  79. - print
  80. - print "****************************************************"
  81. + print()
  82. + print("****************************************************")
  83. else:
  84. - print "****************************************************"
  85. - print
  86. + print("****************************************************")
  87. + print()
  88. def IsDebugCfg():
  89. return BuildCfg == 'debug'
  90. @@ -68,10 +68,10 @@
  91. def CheckSettings(main_env):
  92. global Cc, Cxx, BuildDir, Targets, RunTests, BuildTests
  93. if RunTests :
  94. - print 'Tests: on'
  95. + print('Tests: on')
  96. else:
  97. if BuildTests:
  98. - print 'Tests: on (only building)'
  99. + print('Tests: on (only building)')
  100. def_env = GetDefEnv()
  101. # for SCons =<0.96 we need to warn that just 'scons' is not enough:
  102. @@ -92,9 +92,9 @@
  103. ( (len(BuildDir) >= 1 and BuildDir[0] == '/') or (len(BuildDir) >= 2 and BuildDir[0:2] == '..') ) and \
  104. (Targets == [] or Targets == ['.']) :
  105. PrintBright(0)
  106. - print 'Warning! "scons" or "scons ." detected while BUILD_DIR is outside "."!'
  107. - print 'To build successfully with SCons <= v0.96.1 you may need to run something like '
  108. - print '\t"scons <...> ' + BuildDir + '".'
  109. + print('Warning! "scons" or "scons ." detected while BUILD_DIR is outside "."!')
  110. + print('To build successfully with SCons <= v0.96.1 you may need to run something like ')
  111. + print('\t"scons <...> ' + BuildDir + '".' )
  112. PrintBright(1)
  113. # we use TestSConscript() function instead of SConscript()
  114. @@ -149,7 +149,7 @@
  115. SetBriefOutput(main_env)
  116. # to separate our output from SCons'
  117. - print
  118. + print()
  119. # Non/Verbose output
  120. def SetBriefOutput(env):
  121. @@ -228,7 +228,7 @@
  122. def ErrorAndExit(msg):
  123. PrintBright(0)
  124. - print msg
  125. + print(msg)
  126. PrintBright(1)
  127. GetDefEnv().Exit(1)
  128. @@ -383,20 +383,20 @@
  129. comment = MakeHeaderComment(var['ccomment'], var.get('val') == '1')
  130. if comment:
  131. - print >> cfg_file, "/* " + comment + " */"
  132. + print("/* " + comment + " */", file=cfg_file)
  133. def AddDefine(cfg_file, key, **var):
  134. - print >> cfg_file
  135. + print("", file=cfg_file)
  136. AddComment(cfg_file, var)
  137. if var['is_on']:
  138. str = var.get('val', None)
  139. if str == None:
  140. - print >> cfg_file, "#define %s" % key
  141. + print("#define %s" % key, file=cfg_file)
  142. else:
  143. - print >> cfg_file, "#define %s %s" % (key, var['val'])
  144. + print("#define %s %s" % (key, var['val']), file=cfg_file)
  145. else:
  146. - print >> cfg_file, "/* #undef %s */" % key
  147. + print("/* #undef %s */" % key, file=cfg_file)
  148. GenFunctionMap = {}
  149. @@ -495,7 +495,7 @@
  150. res = True
  151. elif not IsReenter(IsToBuildQuick):
  152. # warn once only
  153. - print 'BUILD_QUICK=true is not supported for current compiler(%s)!' % Cc
  154. + print('BUILD_QUICK=true is not supported for current compiler(%s)!' % Cc)
  155. return res
  156. @@ -504,7 +504,7 @@
  157. def CreateEnvVersion2(**kw):
  158. tools = ['default', 'AuxTools']
  159. - if kw.has_key('tools'):
  160. + if 'tools' in kw:
  161. tools += kw['tools']
  162. kw['tools'] = tools
  163. diff -Naur bombono-dvd-1.2.4/tools/scripts/copy_boost.py bombono-dvd-1.2.4.patched/tools/scripts/copy_boost.py
  164. --- bombono-dvd-1.2.4/tools/scripts/copy_boost.py 2016-04-10 06:45:39.000000000 -0400
  165. +++ bombono-dvd-1.2.4.patched/tools/scripts/copy_boost.py 2022-02-15 13:47:04.029766851 -0500
  166. @@ -26,7 +26,7 @@
  167. for fname in os.listdir(boost_dst):
  168. if not fname in lst:
  169. fpath = os.path.join(boost_dst, fname)
  170. - print 'rm', fpath
  171. + #print 'rm', fpath
  172. o_p.del_any_fpath(fpath)
  173. cmd = '''%(bcp)s --boost=%(boost_src)s boost/smart_ptr.hpp boost/test boost/function.hpp boost/lambda boost/bind \
  174. diff -Naur bombono-dvd-1.2.4/tools/scripts/gch.py bombono-dvd-1.2.4.patched/tools/scripts/gch.py
  175. --- bombono-dvd-1.2.4/tools/scripts/gch.py 2016-04-10 06:45:39.000000000 -0400
  176. +++ bombono-dvd-1.2.4.patched/tools/scripts/gch.py 2022-02-15 13:47:04.029766851 -0500
  177. @@ -78,10 +78,10 @@
  178. def SetPCHDependencies(target, source, env, gch_key):
  179. - if env.has_key(gch_key) and env[gch_key]:
  180. + if gch_key in env and env[gch_key]:
  181. gch_node = env[gch_key]
  182. # Murav'jov - alternative variant
  183. - if env.has_key('DepGch') and env['DepGch']:
  184. + if 'DepGch' in env and env['DepGch']:
  185. env.Depends(target, gch_node)
  186. else:
  187. scanner = GetCScannerFunc()