summaryrefslogtreecommitdiffstats
path: root/multimedia/bombono-dvd/patches/scons.diff
blob: d45d1d4d1fb589a26d743da2908a7a7ec773ffc5 (plain)
diff -Naur bombono-dvd-1.2.4/SConstruct bombono-dvd-1.2.4.patched/SConstruct
--- bombono-dvd-1.2.4/SConstruct	2016-04-10 06:45:39.000000000 -0400
+++ bombono-dvd-1.2.4.patched/SConstruct	2022-02-15 13:53:32.444205004 -0500
@@ -274,13 +274,13 @@
 # Config
 
 if os.path.exists( BV.CfgFile ):
-    print "Using config file: " + BV.CfgFile
+    print("Using config file: " + BV.CfgFile)
 
     user_options = Variables(BV.CfgFile, BV.Args)
     ParseVariables(user_options)
 
 else:
-    print "Creating new config file: " + BV.CfgFile
+    print("Creating new config file: " + BV.CfgFile)
 
     user_options = Variables(None, BV.Args)
     ParseVariables(user_options)
@@ -352,20 +352,19 @@
 
 def GenerateBaseConfigH(target, source, env):
     cfg_file = open(target[0].path, 'w')
-    print >> cfg_file, "/* Generated by means of Autoconfig */"
+    print("/* Generated by means of Autoconfig */", file=cfg_file)
 
     config_dict = user_options_dict['CONFIGURATION']
-    key_list = config_dict.keys()
-    key_list.sort()
+    key_list = sorted(config_dict)
 
     for key in key_list:
         var = config_dict[key]
 
         text = var.get('text', None)
         if text:
-            print >> cfg_file
+            print("", file=cfg_file)
             BV.AddComment(cfg_file, var)
-            print >> cfg_file, text
+            print(text, file=cfg_file)
             continue
 
         BV.AddDefine(cfg_file, key, **var)
diff -Naur bombono-dvd-1.2.4/libs/mpeg2dec/SConscript bombono-dvd-1.2.4.patched/libs/mpeg2dec/SConscript
--- bombono-dvd-1.2.4/libs/mpeg2dec/SConscript	2016-04-10 06:45:39.000000000 -0400
+++ bombono-dvd-1.2.4.patched/libs/mpeg2dec/SConscript	2022-02-15 13:47:04.028766834 -0500
@@ -69,9 +69,9 @@
 
 def GenerateMpeg2DecCfg(target, source, env):
     cfg_file = open(target[0].path, 'w')
-    print >> cfg_file, "/* Auto-generated header */"
-    print >> cfg_file
-    print >> cfg_file, '#include <cfg/config.h>'
+    print("/* Auto-generated header */", file=cfg_file)
+    print("", file=cfg_file)
+    print('#include <cfg/config.h>', file=cfg_file)
 
     BuildVars.AddDefine(cfg_file, 'ACCEL_DETECT', is_on = 1, comment = "autodetect accelerations")
     BuildVars.AddDefine(cfg_file, 'LIBVO_DX',     is_on = 0, comment = "libvo DirectX support")
diff -Naur bombono-dvd-1.2.4/po/SConscript bombono-dvd-1.2.4.patched/po/SConscript
--- bombono-dvd-1.2.4/po/SConscript	2016-04-10 06:45:39.000000000 -0400
+++ bombono-dvd-1.2.4.patched/po/SConscript	2022-02-15 13:47:04.028766834 -0500
@@ -35,7 +35,7 @@
              str(source[0]),
              str(source[1]),
            ]
-    print 'Updating ' + trgt
+    print('Updating ' + trgt)
     return os.spawnvp(os.P_WAIT, 'msgmerge', args)
 
 po_bld = Builder (action = po_builder)
diff -Naur bombono-dvd-1.2.4/src/mgui/tests/SConscript bombono-dvd-1.2.4.patched/src/mgui/tests/SConscript
--- bombono-dvd-1.2.4/src/mgui/tests/SConscript	2016-04-10 06:45:39.000000000 -0400
+++ bombono-dvd-1.2.4.patched/src/mgui/tests/SConscript	2022-02-15 13:47:04.028766834 -0500
@@ -36,8 +36,8 @@
 bin_mgui_tests_env.Program(target=test_prg_name, source = source_files+lib_mgui_objs)
 
 import os
-if os.environ.has_key('DISPLAY'):
+if 'DISPLAY' in os.environ:
     UnitTest(test_prg_name, bin_mgui_tests_env)
 else:
-    print "Warning: X Display is not found. GUI tests are disabled."
+    print("Warning: X Display is not found. GUI tests are disabled.")
 
diff -Naur bombono-dvd-1.2.4/tools/scripts/BuildVars.py bombono-dvd-1.2.4.patched/tools/scripts/BuildVars.py
--- bombono-dvd-1.2.4/tools/scripts/BuildVars.py	2016-04-10 06:45:39.000000000 -0400
+++ bombono-dvd-1.2.4.patched/tools/scripts/BuildVars.py	2022-02-15 13:47:54.476603032 -0500
@@ -30,11 +30,11 @@
 
 def PrintBright(is_end):
     if not is_end:
-        print
-        print "****************************************************"
+        print()
+        print("****************************************************")
     else:
-        print "****************************************************"
-        print
+        print("****************************************************")
+        print()
 
 def IsDebugCfg():
     return BuildCfg == 'debug'
@@ -68,10 +68,10 @@
 def CheckSettings(main_env):
     global Cc, Cxx, BuildDir, Targets, RunTests, BuildTests
     if RunTests :
-        print 'Tests: on'
+        print('Tests: on')
     else:
         if BuildTests:
-            print 'Tests: on (only building)'
+            print('Tests: on (only building)')
 
     def_env = GetDefEnv()
     # for SCons =<0.96 we need to warn that just 'scons' is not enough:
@@ -92,9 +92,9 @@
       ( (len(BuildDir) >= 1 and BuildDir[0] == '/') or (len(BuildDir) >= 2 and BuildDir[0:2] == '..') ) and \
       (Targets == [] or Targets == ['.']) :
         PrintBright(0)
-        print 'Warning! "scons" or "scons ." detected while BUILD_DIR is outside "."!'
-        print 'To build successfully with SCons <= v0.96.1 you may need to run something like '
-        print '\t"scons <...> ' + BuildDir + '".' 
+        print('Warning! "scons" or "scons ." detected while BUILD_DIR is outside "."!')
+        print('To build successfully with SCons <= v0.96.1 you may need to run something like ')
+        print('\t"scons <...> ' + BuildDir + '".' )
         PrintBright(1)
 
     # we use TestSConscript() function instead of SConscript()
@@ -149,7 +149,7 @@
     SetBriefOutput(main_env)
 
     # to separate our output from SCons'
-    print
+    print()
 
 # Non/Verbose output
 def SetBriefOutput(env):
@@ -228,7 +228,7 @@
 
 def ErrorAndExit(msg):
     PrintBright(0)
-    print msg
+    print(msg)
     PrintBright(1)
 
     GetDefEnv().Exit(1)
@@ -383,20 +383,20 @@
         comment = MakeHeaderComment(var['ccomment'], var.get('val') == '1')
 
     if comment:
-        print >> cfg_file, "/* " + comment + " */"
+        print("/* " + comment + " */", file=cfg_file)
 
 def AddDefine(cfg_file, key, **var):
-    print >> cfg_file
+    print("", file=cfg_file)
     AddComment(cfg_file, var)
 
     if var['is_on']:
         str = var.get('val', None)
         if str == None:
-            print >> cfg_file, "#define %s" % key
+            print("#define %s" % key, file=cfg_file)
         else:
-            print >> cfg_file, "#define %s %s" % (key, var['val'])
+            print("#define %s %s" % (key, var['val']), file=cfg_file)
     else:
-        print >> cfg_file, "/* #undef %s */" % key
+        print("/* #undef %s */" % key, file=cfg_file)
 
 GenFunctionMap = {}
 
@@ -495,7 +495,7 @@
             res = True
         elif not IsReenter(IsToBuildQuick):
             # warn once only
-            print 'BUILD_QUICK=true is not supported for current compiler(%s)!' % Cc
+            print('BUILD_QUICK=true is not supported for current compiler(%s)!' % Cc)
 
     return res
 
@@ -504,7 +504,7 @@
 
 def CreateEnvVersion2(**kw):
     tools = ['default', 'AuxTools']
-    if kw.has_key('tools'):
+    if 'tools' in kw:
         tools += kw['tools']
     kw['tools'] = tools
 
diff -Naur bombono-dvd-1.2.4/tools/scripts/copy_boost.py bombono-dvd-1.2.4.patched/tools/scripts/copy_boost.py
--- bombono-dvd-1.2.4/tools/scripts/copy_boost.py	2016-04-10 06:45:39.000000000 -0400
+++ bombono-dvd-1.2.4.patched/tools/scripts/copy_boost.py	2022-02-15 13:47:04.029766851 -0500
@@ -26,7 +26,7 @@
         for fname in os.listdir(boost_dst):
             if not fname in lst:
                 fpath = os.path.join(boost_dst, fname)
-                print 'rm', fpath
+                #print 'rm', fpath
                 o_p.del_any_fpath(fpath)
     
     cmd = '''%(bcp)s --boost=%(boost_src)s boost/smart_ptr.hpp boost/test boost/function.hpp boost/lambda boost/bind \
diff -Naur bombono-dvd-1.2.4/tools/scripts/gch.py bombono-dvd-1.2.4.patched/tools/scripts/gch.py
--- bombono-dvd-1.2.4/tools/scripts/gch.py	2016-04-10 06:45:39.000000000 -0400
+++ bombono-dvd-1.2.4.patched/tools/scripts/gch.py	2022-02-15 13:47:04.029766851 -0500
@@ -78,10 +78,10 @@
 
 
 def SetPCHDependencies(target, source, env, gch_key):
-    if env.has_key(gch_key) and env[gch_key]:
+    if gch_key in env and env[gch_key]:
         gch_node = env[gch_key]
         # Murav'jov - alternative variant
-        if env.has_key('DepGch') and env['DepGch']:
+        if 'DepGch' in env and env['DepGch']:
             env.Depends(target, gch_node)
         else:
             scanner = GetCScannerFunc()