]> git.pld-linux.org Git - packages/framewave.git/blobdiff - framewave-python-update.patch
- updated patches set for python 3/scons 4
[packages/framewave.git] / framewave-python-update.patch
diff --git a/framewave-python-update.patch b/framewave-python-update.patch
new file mode 100644 (file)
index 0000000..d620e3f
--- /dev/null
@@ -0,0 +1,254 @@
+--- 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
This page took 0.09173 seconds and 4 git commands to generate.