summaryrefslogtreecommitdiffstats
path: root/multimedia/bombono-dvd/patches/scons.diff
blob: d45d1d4d1fb589a26d743da2908a7a7ec773ffc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
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()