1 --- FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwbuild.py.orig 2023-03-14 17:30:38.005654913 +0100
2 +++ FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwbuild.py 2023-03-14 17:36:21.356773452 +0100
7 -from string import replace
\r
8 from os.path import *
\r
11 @@ -56,7 +56,7 @@ class fwBuildRoot:
12 if self.dctFwVars['toolset'] == '---':
\r
13 if sys.platform=='win32':
\r
14 self.dctFwVars['toolset'] = 'msvc'
\r
15 - elif sys.platform=='linux2':
\r
16 + elif sys.platform.startswith('linux'):
\r
17 self.dctFwVars['toolset'] = 'gcc'
\r
18 elif sys.platform=='sunos5':
\r
19 self.dctFwVars['toolset'] = 'suncc'
\r
20 @@ -127,7 +127,7 @@ class fwProject():
21 self.dctFwVars = self.oEnv['FWVARS']
\r
23 # First check for a libtype override before any other setup calls
\r
24 - if self.dctFwVars.has_key('libtypeOverride'+sProjectName):
\r
25 + if 'libtypeOverride'+sProjectName in self.dctFwVars:
\r
26 self.dctFwVars['libtype'] = self.dctFwVars['libtypeOverride'+sProjectName]
\r
28 self.dctFwVars['sProjectName'] = sProjectName
\r
29 @@ -343,7 +343,7 @@ def createDefFile ( pthDevLabRoot, pthPr
30 if sys.platform=='win32':
\r
31 exe_name = 'FwHeaderConvert_win.exe'
\r
33 - elif sys.platform=='linux2':
\r
34 + elif sys.platform.startswith('linux'):
\r
35 exe_name = 'FwHeaderConvert_lin'
\r
36 elif sys.platform=='sunos5':
\r
37 exe_name = 'FwHeaderConvert_sol'
\r
38 --- FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwutil.py.orig 2023-03-14 17:45:45.647654147 +0100
39 +++ FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwutil.py 2023-03-14 17:48:18.679535747 +0100
40 @@ -9,7 +9,6 @@ from __future__ import with_statement
44 -from string import replace
\r
45 from os.path import *
\r
48 @@ -99,7 +98,7 @@ def fixLinuxSharedLib( target = None, so
50 def fixMacSharedLib( target = None, source = None, env = None ):
\r
52 - for t in target: os.rename(t.path, replace(t.path,'.dylib','-1.3.1.dylib'))
\r
53 + for t in target: os.rename(t.path, t.path.replace('.dylib','-1.3.1.dylib'))
\r
55 def AddObjsFromLibs( oEnv, LIBS, LIBPATH ):
\r
56 # If no libs exist, nothing needs ot be added
\r
57 @@ -127,8 +127,8 @@ def AddObjsFromLibs( oEnv, LIBS, LIBPATH
58 if 'EXTRALIBOBJS' in oEnv['FWVARS']: oEnv['FWVARS']['EXTRALIBOBJS'] += oExtraObjs
\r
59 else: oEnv['FWVARS']['EXTRALIBOBJS'] = oExtraObjs
\r
61 - print "Could not find library " + l + ".."
\r
63 + print("Could not find library " + l + "..")
\r
67 def removeD( s, isD ):
\r
68 @@ -164,7 +164,7 @@ def readFile ( sInFile ):
69 with open(sInFile, 'r') as f:
\r
72 - print "Could not open " + sInFile + "!\n"
\r
73 + print("Could not open " + sInFile + "!\n")
\r
77 @@ -174,7 +174,7 @@ def writeFile ( sOutFile, lstData ):
81 - print "Could not open " + sOutFile + "!\n"
\r
82 + print("Could not open " + sOutFile + "!\n")
\r
84 def writeLinesToFile ( sOutFile, lstData ):
\r
86 @@ -182,7 +182,7 @@ def writeLinesToFile ( sOutFile, lstData
90 - print "Could not open " + sOutFile + "!\n"
\r
91 + print("Could not open " + sOutFile + "!\n")
\r
93 def getPaths( sInFile ):
\r
95 @@ -185,11 +185,12 @@ def writeLinesToFile ( sOutFile, lstData
97 def getPaths( sInFile ):
\r
99 - with open(sInFile, 'r') as f:
\r
100 + with open(sInFile, 'rb') as f:
\r
101 f.seek(-200, os.SEEK_END)
\r
102 lines = f.readlines()
\r
103 + lines = [line.decode("utf-8") for line in lines]
\r
105 - print "Could not open " + sInFile + "!\n"
\r
106 + print("Could not open " + sInFile + "!\n")
\r
110 --- FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwparse.py.orig 2009-07-09 11:14:21.000000000 +0200
111 +++ FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwparse.py 2023-03-14 17:32:26.508376552 +0100
112 @@ -13,7 +13,6 @@ import re
115 from os.path import *
\r
116 -from string import replace
\r
117 from fwutil import *
\r
120 @@ -89,13 +88,13 @@ def createStub ( sFunctionName, sDecorat
121 def constructMultipassCPP ( pthProjectDir, sProjectName, pthInHeaderFile, pthOutCPPFile, pthVerifyHeader = None ):
\r
122 sHeaderData = readFile( join(pthProjectDir, pthInHeaderFile) )
\r
123 if not sHeaderData:
\r
124 - print "Cannot open " + pthInHeaderFile + "! Exiting.."
\r
125 + print("Cannot open " + pthInHeaderFile + "! Exiting..")
\r
128 if pthVerifyHeader:
\r
129 sVerifyData = readFile( pthVerifyHeader )
\r
130 if not pthVerifyHeader:
\r
131 - print "Cannot open " + pthVerifyHeader + "! Exiting.."
\r
132 + print("Cannot open " + pthVerifyHeader + "! Exiting..")
\r
135 lstMPFunctions = getMPFuncNames( sHeaderData )
\r
136 @@ -140,7 +139,7 @@ def findREinFile ( pthInFile, fname ):
137 if line.find(fname) != -1:
\r
140 - print "Could not open " + pthInFile + "!\n"
\r
141 + print("5,Could not open " + pthInFile + "!\n")
\r
145 --- FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwObject.py.orig 2009-07-09 11:14:21.000000000 +0200
146 +++ FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwObject.py 2023-03-14 17:34:22.361075427 +0100
151 -from string import replace
\r
152 from os.path import *
\r
155 @@ -51,7 +51,7 @@ class fwObject:
156 # Since there is no cross building yet
\r
157 # we can assume that the platform we're
\r
158 # building on is also the target platform
\r
159 - platform = sys.platform
\r
160 + platform = sys.platform.replace('linux2', 'linux')
\r
163 toolset = oFWVARS['toolset']
\r
164 @@ -73,7 +73,7 @@ class fwObject:
165 oExceptFlags = None
\r
166 toolset = oEnv['FWVARS']['toolset']
\r
167 # Check if there is any special handling for this object
\r
168 - if dctGlobalExceptionsList.has_key(toolset):
\r
169 + if toolset in dctGlobalExceptionsList:
\r
170 for r in dctGlobalExceptionsList[toolset]:
\r
171 if allInList(r[0], lstBuildFactors):
\r
172 oExceptFlags = r[1]
\r
173 --- FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwbuildexceptions.py.orig 2009-07-09 11:14:21.000000000 +0200
174 +++ FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwbuildexceptions.py 2023-03-14 17:38:25.859760232 +0100
177 # Exceptions list module for Framewave's SCons scripts
\r
179 -from string import replace
\r
180 from os.path import *
\r
183 --- FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwbuildexceptionshandlers.py.orig 2009-07-09 11:14:21.000000000 +0200
184 +++ FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwbuildexceptionshandlers.py 2023-03-14 17:40:14.403567057 +0100
185 @@ -52,7 +52,7 @@ class fwFlags_gcc_AddSubFix(fwFlagsBase)
186 # Select flags to setup based on what kind of
\r
187 # build object are we setting up flags for
\r
188 if sObjectType=='library':
\r
189 - raise exception, "Error: This rule is meant to apply only on object files!"
\r
190 + raise Exception("Error: This rule is meant to apply only on object files!")
\r
192 self.lstCCFlags = self.determineFlags(lstBuildFactors, dctCCFlags)
\r
193 self.lstCCFlags = self.translateFlags(self.lstCCFlags)
\r
194 --- FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwLibrary.py.orig 2009-07-09 11:14:21.000000000 +0200
195 +++ FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwLibrary.py 2023-03-14 17:49:41.047343791 +0100
200 -from string import replace
\r
201 from os.path import *
\r
204 @@ -45,7 +45,7 @@ class fwLibrary:
205 # Since there is no cross building yet
\r
206 # we can assume that the platform we're
\r
207 # building on is also the target platform
\r
208 - platform = sys.platform
\r
209 + platform = sys.platform.replace('linux2', 'linux')
\r
212 toolset = oFWVARS['toolset']
\r
213 @@ -62,7 +62,7 @@ class fwLibrary:
214 oExceptFlags = None
\r
215 toolset = oEnv['FWVARS']['toolset']
\r
216 # Check if there is any special handling for this object
\r
217 - if dctGlobalExceptionsList.has_key(toolset):
\r
218 + if toolset in dctGlobalExceptionsList:
\r
219 for r in dctGlobalExceptionsList[toolset]:
\r
220 if allInList(r[0], lstBuildFactors):
\r
221 oExceptFlags = r[1]
\r
222 --- FRAMEWAVE_1.3.1_SRC/BuildTools/util/FwHeaderConvert/FwHeaderConvert.sconscript.orig 2009-07-09 11:14:25.000000000 +0200
223 +++ FRAMEWAVE_1.3.1_SRC/BuildTools/util/FwHeaderConvert/FwHeaderConvert.sconscript 2023-03-14 19:52:26.932017149 +0100
224 @@ -17,7 +17,7 @@ from fwbuild import *
226 if sys.platform=='win32':
\r
227 exe_name = 'FwHeaderConvert_win'
\r
228 -elif sys.platform=='linux2':
\r
229 +elif sys.platform.startswith('linux'):
\r
230 exe_name = 'FwHeaderConvert_lin'
\r
231 elif sys.platform=='sunos5':
\r
232 exe_name = 'FwHeaderConvert_sol'
\r
233 --- FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwflagsbase.py.orig 2009-07-09 11:14:21.000000000 +0200
234 +++ FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwflagsbase.py 2023-03-14 20:02:03.352227746 +0100
235 @@ -23,7 +23,7 @@ shr = 'shared'
244 --- FRAMEWAVE_1.3.1_SRC/Framewave/SConstruct.orig 2009-07-09 11:15:44.000000000 +0200
245 +++ FRAMEWAVE_1.3.1_SRC/Framewave/SConstruct 2023-03-14 21:34:55.725372945 +0100
246 @@ -39,7 +39,7 @@ if (str(COMMAND_LINE_TARGETS)=='') or \
247 (COMMAND_LINE_TARGETS==[]) or \
\r
248 (COMMAND_LINE_TARGETS==['']): chkCommandLine = 1
\r
250 -if ( (sys.platform == 'linux2' or sys.platform == 'sunos5') and ARGUMENTS.get('libtype', 'shared')=='shared'):
\r
251 +if ( (sys.platform.startswith('linux') or sys.platform == 'sunos5') and ARGUMENTS.get('libtype', 'shared')=='shared'):
\r
252 postAction = fixLinuxSharedLib
\r
253 elif ((sys.platform == 'darwin') and ARGUMENTS.get('libtype', 'shared')=='shared'):
\r
254 postAction = fixMacSharedLib
\r