--- /dev/null
+--- FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwbuild.py.orig 2023-03-14 17:17:16.999765487 +0100
++++ FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwbuild.py 2023-03-14 17:19:47.165472173 +0100
+@@ -46,7 +46,7 @@ class fwBuildRoot:
+ \r
+ \r
+ if self.dctFwVars['thread'] == 'systemboost':\r
+- self.dctFwVars['thread'] = 'boost_thread-mt'\r
++ self.dctFwVars['thread'] = 'boost_thread-mt'\r
+ \r
+ # Set correct default wincrt\r
+ if self.dctFwVars['wincrt'] == '---':\r
+@@ -91,13 +91,13 @@ class fwBuildRoot:
+ curEnviron = createEnviron()\r
+ self.oEnv = Environment( CCFLAGS = self.dctFwVars['CCFLAGS'] , toolpath=buildtoolspath, tools=buildtools, ENV=curEnviron, FWVARS=self.dctFwVars )\r
+ \r
+- # fixup paths back to what they were before scons messed them up [BUGBUG: SCons issue, this is the workaround]\r
++ # fixup paths back to what they were before scons messed them up [BUGBUG: SCons issue, this is the workaround]\r
+ if ((sys.platform=='win32') and (self.dctFwVars['bitness']!='32')):\r
+- self.oEnv['ENV'] = curEnviron\r
++ self.oEnv['ENV'] = curEnviron\r
+ \r
+ def subProject(self, sProjectName, lstDependencies = None, altProjectDir = None, libtypeOverride = None):\r
+- if altProjectDir == None: pthProjectDir = join( self.dctFwVars['pthProjectRoot'], sProjectName )\r
+- else: pthProjectDir = altProjectDir\r
++ if altProjectDir == None: pthProjectDir = join( self.dctFwVars['pthProjectRoot'], sProjectName )\r
++ else: pthProjectDir = altProjectDir\r
+ \r
+ libtype = self.dctFwVars['libtype']\r
+ if libtypeOverride:\r
+@@ -105,20 +105,20 @@ class fwBuildRoot:
+ self.dctFwVars['libtypeOverride'+sProjectName] = libtypeOverride\r
+ \r
+ pthBuildDir = join( self.dctFwVars['pthScratch'], \\r
+- sProjectName + "_" + \\r
+- self.dctFwVars['variant'] + "_" +\\r
+- libtype + "_" + \\r
+- self.dctFwVars['bitness'] )\r
++ sProjectName + "_" + \\r
++ self.dctFwVars['variant'] + "_" +\\r
++ libtype + "_" + \\r
++ self.dctFwVars['bitness'] )\r
+ \r
+ self.dctFwVars[sProjectName+'BuildDir'] = pthBuildDir\r
+ self.oEnv['FWVARS'] = self.dctFwVars # in case of changes to the internal dictionary\r
+- oProject = self.oEnv.SConscript( join( pthProjectDir, sProjectName+'.sconscript' ),\\r
++ oProject = self.oEnv.SConscript( join( pthProjectDir, sProjectName+'.sconscript' ),\\r
+ src_dir = pthProjectDir,\\r
+ variant_dir = pthBuildDir,\\r
+ duplicate = 0 )\r
+- if lstDependencies != None:\r
+- for dep in lstDependencies:\r
+- self.oEnv.Depends( oProject, dep )\r
++ if lstDependencies != None:\r
++ for dep in lstDependencies:\r
++ self.oEnv.Depends( oProject, dep )\r
+ \r
+ return oProject\r
+ \r
+@@ -172,7 +172,7 @@ class fwProject():
+ PROJECTNAMEU = self.dctFwVars['sProjectName'].upper(), \\r
+ BUILDDIR = self.dctFwVars['pthBuildDir'],\\r
+ BITNESS = self.dctFwVars['bitness'],\\r
+- PROJECTDIR = self.dctFwVars['pthProjectDir'])\r
++ PROJECTDIR = self.dctFwVars['pthProjectDir'])\r
+ \r
+ \r
+ def initBuildObjects(self, lstExtraCPPs = None, lstDepends = None, lstDependPaths = None, pthSrcDir=None):\r
+@@ -260,7 +260,7 @@ class fwProject():
+ \r
+ # BUGBUG: <one last hack; can't get rid of this for a bit>\r
+ if (self.dctFwVars['toolset'] == 'suncc') and (self.dctFwVars['sProjectName'] == 'fwImage'):\r
+- pthBuildHFile = appendToFilename(pthBuildHFile, '_sol')\r
++ pthBuildHFile = appendToFilename(pthBuildHFile, '_sol')\r
+ # </one last hack>\r
+ \r
+ dctFunctions = constructMultipassCPP( self.dctFwVars['pthProjectDir'], \\r
+@@ -365,10 +365,10 @@ def createDefFile ( pthDevLabRoot, pthPr
+ #os.system( sCommandStr )\r
+ \r
+ if win_sys == 0 and isfile(exe_name_path):\r
+- os.system('chmod 755 ' + exe_name_path)\r
++ os.system('chmod 755 ' + exe_name_path)\r
+ \r
+ if isfile(exe_name_path):\r
+- os.system( sCommandStr )\r
++ os.system( sCommandStr )\r
+ \r
+ def_file_path = join(pthProjectRoot,sProjectName,sProjectName + '.def')\r
+ if win_sys == 0 and isfile(def_file_path) :\r
+--- FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwutil.py.orig 2009-07-09 11:16:55.000000000 +0200
++++ FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwutil.py 2023-03-14 17:45:45.643343147 +0100
+@@ -71,8 +71,8 @@ def setupIncludePaths ( oEnv, pthStartPa
+ \r
+ def createEnviron ():\r
+ # Do any environment modifications here\r
+- oEnviron = os.environ\r
+- return oEnviron\r
++ oEnviron = os.environ\r
++ return oEnviron\r
+ \r
+ def src2obj( pth ):\r
+ pthRootDir, sRootName = split(pth)\r
+@@ -84,14 +84,14 @@ def src2obj( pth ):
+ \r
+ def buildPath( pthBuildRoot ):\r
+ return join( pthBuildRoot,\\r
+- ARGUMENTS.get('variant','debug') + "_" +\\r
+- ARGUMENTS.get('libtype','shared') + "_" +\\r
+- ARGUMENTS.get('bitness','32') )\r
++ ARGUMENTS.get('variant','debug') + "_" +\\r
++ ARGUMENTS.get('libtype','shared') + "_" +\\r
++ ARGUMENTS.get('bitness','32') )\r
+ \r
+ \r
+ def turnOnZi( oEnv ):\r
+- import SCons.Util\r
+- oEnv['CCPDBFLAGS'] = SCons.Util.CLVar(['${(PDB and "/Gm /ZI /Fd%s" % File(PDB)) or ""}'])\r
++ import SCons.Util\r
++ oEnv['CCPDBFLAGS'] = SCons.Util.CLVar(['${(PDB and "/Gm /ZI /Fd%s" % File(PDB)) or ""}'])\r
+ \r
+ def fixLinuxSharedLib( target = None, source = None, env = None ):\r
+ if target:\r
--- /dev/null
+--- FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwbuild.py.orig 2023-03-14 17:30:38.005654913 +0100
++++ FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwbuild.py 2023-03-14 17:36:21.356773452 +0100
+@@ -7,7 +7,6 @@
+ \r
+ import glob\r
+ import os\r
+-from string import replace\r
+ from os.path import *\r
+ from stat import *\r
+ import sys\r
+@@ -56,7 +56,7 @@ class fwBuildRoot:
+ if self.dctFwVars['toolset'] == '---':\r
+ if sys.platform=='win32':\r
+ self.dctFwVars['toolset'] = 'msvc'\r
+- elif sys.platform=='linux2':\r
++ elif sys.platform.startswith('linux'):\r
+ self.dctFwVars['toolset'] = 'gcc'\r
+ elif sys.platform=='sunos5':\r
+ self.dctFwVars['toolset'] = 'suncc'\r
+@@ -127,7 +127,7 @@ class fwProject():
+ self.dctFwVars = self.oEnv['FWVARS']\r
+ \r
+ # First check for a libtype override before any other setup calls\r
+- if self.dctFwVars.has_key('libtypeOverride'+sProjectName):\r
++ if 'libtypeOverride'+sProjectName in self.dctFwVars:\r
+ self.dctFwVars['libtype'] = self.dctFwVars['libtypeOverride'+sProjectName]\r
+ \r
+ self.dctFwVars['sProjectName'] = sProjectName\r
+@@ -343,7 +343,7 @@ def createDefFile ( pthDevLabRoot, pthPr
+ if sys.platform=='win32':\r
+ exe_name = 'FwHeaderConvert_win.exe'\r
+ win_sys = 1\r
+- elif sys.platform=='linux2':\r
++ elif sys.platform.startswith('linux'):\r
+ exe_name = 'FwHeaderConvert_lin'\r
+ elif sys.platform=='sunos5':\r
+ exe_name = 'FwHeaderConvert_sol'\r
+--- FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwutil.py.orig 2023-03-14 17:45:45.647654147 +0100
++++ FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwutil.py 2023-03-14 17:48:18.679535747 +0100
+@@ -9,7 +9,6 @@ from __future__ import with_statement
+ \r
+ import glob\r
+ import os\r
+-from string import replace\r
+ from os.path import *\r
+ \r
+ import sys\r
+@@ -99,7 +98,7 @@ def fixLinuxSharedLib( target = None, so
+ \r
+ def fixMacSharedLib( target = None, source = None, env = None ):\r
+ if target:\r
+- for t in target: os.rename(t.path, replace(t.path,'.dylib','-1.3.1.dylib'))\r
++ for t in target: os.rename(t.path, t.path.replace('.dylib','-1.3.1.dylib'))\r
+ \r
+ def AddObjsFromLibs( oEnv, LIBS, LIBPATH ):\r
+ # If no libs exist, nothing needs ot be added\r
+@@ -127,8 +127,8 @@ def AddObjsFromLibs( oEnv, LIBS, LIBPATH
+ if 'EXTRALIBOBJS' in oEnv['FWVARS']: oEnv['FWVARS']['EXTRALIBOBJS'] += oExtraObjs\r
+ else: oEnv['FWVARS']['EXTRALIBOBJS'] = oExtraObjs\r
+ else:\r
+- print "Could not find library " + l + ".."\r
+- print LIBPATH\r
++ print("Could not find library " + l + "..")\r
++ print(LIBPATH)\r
+ sys.exit(0)\r
+ \r
+ def removeD( s, isD ):\r
+@@ -164,7 +164,7 @@ def readFile ( sInFile ):
+ with open(sInFile, 'r') as f:\r
+ data = f.read()\r
+ except IOError:\r
+- print "Could not open " + sInFile + "!\n"\r
++ print("Could not open " + sInFile + "!\n")\r
+ return None\r
+ return data\r
+ \r
+@@ -174,7 +174,7 @@ def writeFile ( sOutFile, lstData ):
+ for d in lstData:\r
+ f.write( d )\r
+ except IOError:\r
+- print "Could not open " + sOutFile + "!\n"\r
++ print("Could not open " + sOutFile + "!\n")\r
+ \r
+ def writeLinesToFile ( sOutFile, lstData ):\r
+ try:\r
+@@ -182,7 +182,7 @@ def writeLinesToFile ( sOutFile, lstData
+ for d in lstData:\r
+ f.write( d + '\n')\r
+ except IOError:\r
+- print "Could not open " + sOutFile + "!\n"\r
++ print("Could not open " + sOutFile + "!\n")\r
+ \r
+ def getPaths( sInFile ):\r
+ try:\r
+@@ -185,11 +185,12 @@ def writeLinesToFile ( sOutFile, lstData
+ \r
+ def getPaths( sInFile ):\r
+ try:\r
+- with open(sInFile, 'r') as f:\r
++ with open(sInFile, 'rb') as f:\r
+ f.seek(-200, os.SEEK_END)\r
+ lines = f.readlines()\r
++ lines = [line.decode("utf-8") for line in lines]\r
+ except IOError:\r
+- print "Could not open " + sInFile + "!\n"\r
++ print("Could not open " + sInFile + "!\n")\r
+ return None\r
+ \r
+ lstLines = []\r
+--- FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwparse.py.orig 2009-07-09 11:14:21.000000000 +0200
++++ FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwparse.py 2023-03-14 17:32:26.508376552 +0100
+@@ -13,7 +13,6 @@ import re
+ import fileinput\r
+ \r
+ from os.path import *\r
+-from string import replace\r
+ from fwutil import *\r
+ \r
+ \r
+@@ -89,13 +88,13 @@ def createStub ( sFunctionName, sDecorat
+ def constructMultipassCPP ( pthProjectDir, sProjectName, pthInHeaderFile, pthOutCPPFile, pthVerifyHeader = None ):\r
+ sHeaderData = readFile( join(pthProjectDir, pthInHeaderFile) )\r
+ if not sHeaderData:\r
+- print "Cannot open " + pthInHeaderFile + "! Exiting.."\r
++ print("Cannot open " + pthInHeaderFile + "! Exiting..")\r
+ return None\r
+ \r
+ if pthVerifyHeader:\r
+ sVerifyData = readFile( pthVerifyHeader )\r
+ if not pthVerifyHeader:\r
+- print "Cannot open " + pthVerifyHeader + "! Exiting.."\r
++ print("Cannot open " + pthVerifyHeader + "! Exiting..")\r
+ return None\r
+ \r
+ lstMPFunctions = getMPFuncNames( sHeaderData )\r
+@@ -140,7 +139,7 @@ def findREinFile ( pthInFile, fname ):
+ if line.find(fname) != -1:\r
+ return 1\r
+ except IOError:\r
+- print "Could not open " + pthInFile + "!\n"\r
++ print("5,Could not open " + pthInFile + "!\n")\r
+ return None\r
+ return None\r
+ \r
+--- FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwObject.py.orig 2009-07-09 11:14:21.000000000 +0200
++++ FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwObject.py 2023-03-14 17:34:22.361075427 +0100
+@@ -7,7 +7,6 @@
+ \r
+ import glob\r
+ import os\r
+-from string import replace\r
+ from os.path import *\r
+ \r
+ import sys\r
+@@ -51,7 +51,7 @@ class fwObject:
+ # Since there is no cross building yet\r
+ # we can assume that the platform we're\r
+ # building on is also the target platform\r
+- platform = sys.platform\r
++ platform = sys.platform.replace('linux2', 'linux')\r
+ \r
+ # Get toolset name\r
+ toolset = oFWVARS['toolset']\r
+@@ -73,7 +73,7 @@ class fwObject:
+ oExceptFlags = None\r
+ toolset = oEnv['FWVARS']['toolset']\r
+ # Check if there is any special handling for this object\r
+- if dctGlobalExceptionsList.has_key(toolset):\r
++ if toolset in dctGlobalExceptionsList:\r
+ for r in dctGlobalExceptionsList[toolset]:\r
+ if allInList(r[0], lstBuildFactors):\r
+ oExceptFlags = r[1]\r
+--- FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwbuildexceptions.py.orig 2009-07-09 11:14:21.000000000 +0200
++++ FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwbuildexceptions.py 2023-03-14 17:38:25.859760232 +0100
+@@ -5,7 +5,6 @@
+ \r
+ # Exceptions list module for Framewave's SCons scripts\r
+ import os\r
+-from string import replace\r
+ from os.path import *\r
+ \r
+ import sys\r
+--- FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwbuildexceptionshandlers.py.orig 2009-07-09 11:14:21.000000000 +0200
++++ FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwbuildexceptionshandlers.py 2023-03-14 17:40:14.403567057 +0100
+@@ -52,7 +52,7 @@ class fwFlags_gcc_AddSubFix(fwFlagsBase)
+ # Select flags to setup based on what kind of\r
+ # build object are we setting up flags for\r
+ if sObjectType=='library':\r
+- raise exception, "Error: This rule is meant to apply only on object files!"\r
++ raise Exception("Error: This rule is meant to apply only on object files!")\r
+ else:\r
+ self.lstCCFlags = self.determineFlags(lstBuildFactors, dctCCFlags)\r
+ self.lstCCFlags = self.translateFlags(self.lstCCFlags)\r
+--- FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwLibrary.py.orig 2009-07-09 11:14:21.000000000 +0200
++++ FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwLibrary.py 2023-03-14 17:49:41.047343791 +0100
+@@ -7,7 +7,6 @@
+ \r
+ import glob\r
+ import os\r
+-from string import replace\r
+ from os.path import *\r
+ \r
+ import sys\r
+@@ -45,7 +45,7 @@ class fwLibrary:
+ # Since there is no cross building yet\r
+ # we can assume that the platform we're\r
+ # building on is also the target platform\r
+- platform = sys.platform\r
++ platform = sys.platform.replace('linux2', 'linux')\r
+ \r
+ # Get toolset name\r
+ toolset = oFWVARS['toolset']\r
+@@ -62,7 +62,7 @@ class fwLibrary:
+ oExceptFlags = None\r
+ toolset = oEnv['FWVARS']['toolset']\r
+ # Check if there is any special handling for this object\r
+- if dctGlobalExceptionsList.has_key(toolset):\r
++ if toolset in dctGlobalExceptionsList:\r
+ for r in dctGlobalExceptionsList[toolset]:\r
+ if allInList(r[0], lstBuildFactors):\r
+ oExceptFlags = r[1]\r
+--- FRAMEWAVE_1.3.1_SRC/BuildTools/util/FwHeaderConvert/FwHeaderConvert.sconscript.orig 2009-07-09 11:14:25.000000000 +0200
++++ FRAMEWAVE_1.3.1_SRC/BuildTools/util/FwHeaderConvert/FwHeaderConvert.sconscript 2023-03-14 19:52:26.932017149 +0100
+@@ -17,7 +17,7 @@ from fwbuild import *
+ \r
+ if sys.platform=='win32':\r
+ exe_name = 'FwHeaderConvert_win'\r
+-elif sys.platform=='linux2':\r
++elif sys.platform.startswith('linux'):\r
+ exe_name = 'FwHeaderConvert_lin'\r
+ elif sys.platform=='sunos5':\r
+ exe_name = 'FwHeaderConvert_sol'\r
+--- FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwflagsbase.py.orig 2009-07-09 11:14:21.000000000 +0200
++++ FRAMEWAVE_1.3.1_SRC/BuildTools/buildscripts/fwflagsbase.py 2023-03-14 20:02:03.352227746 +0100
+@@ -23,7 +23,7 @@ shr = 'shared'
+ stc = 'static'\r
+ exe = 'exe'\r
+ \r
+-lin = 'linux2'\r
++lin = 'linux'\r
+ win = 'win32'\r
+ sol = 'sunos5'\r
+ mac = 'darwin'\r
+--- FRAMEWAVE_1.3.1_SRC/Framewave/SConstruct.orig 2009-07-09 11:15:44.000000000 +0200
++++ FRAMEWAVE_1.3.1_SRC/Framewave/SConstruct 2023-03-14 21:34:55.725372945 +0100
+@@ -39,7 +39,7 @@ if (str(COMMAND_LINE_TARGETS)=='') or \
+ (COMMAND_LINE_TARGETS==[]) or \\r
+ (COMMAND_LINE_TARGETS==['']): chkCommandLine = 1\r
+ \r
+-if ( (sys.platform == 'linux2' or sys.platform == 'sunos5') and ARGUMENTS.get('libtype', 'shared')=='shared'):\r
++if ( (sys.platform.startswith('linux') or sys.platform == 'sunos5') and ARGUMENTS.get('libtype', 'shared')=='shared'):\r
+ postAction = fixLinuxSharedLib\r
+ elif ((sys.platform == 'darwin') and ARGUMENTS.get('libtype', 'shared')=='shared'):\r
+ postAction = fixMacSharedLib\r