logo

overlay

My own overlay for experimentations, use with caution, no support is provided git clone https://hacktivis.me/git/overlay.git

vdrift-2014.10.20-scons-python3.patch (3207B)


  1. --- ./src/SConscript.orig 2014-09-04 16:06:21.000000000 -0400
  2. +++ ./src/SConscript 2017-10-15 11:22:06.536446627 -0400
  3. @@ -151,7 +151,7 @@ src = Split("""
  4. utils.cpp
  5. window.cpp""")
  6. -src.sort(lambda x, y: cmp(x.lower(),y.lower()))
  7. +src.sort(key=lambda x: x.lower())
  8. #------------------------#
  9. # Copy Build Environment #
  10. --- ./SConstruct.orig 2014-08-04 08:43:04.000000000 -0400
  11. +++ ./SConstruct 2017-10-15 11:18:01.792656230 -0400
  12. @@ -92,9 +92,9 @@ elif sys.platform == 'darwin':
  13. for a in env['universal']:
  14. if not sdk_path:
  15. - print 'Building a universal binary require access to an ' + \
  16. + print ('Building a universal binary require access to an ' + \
  17. 'SDK that has universal \nbinary support.If you know ' + \
  18. - 'the location of such an SDK, specify it using the \n"SDK" option'
  19. + 'the location of such an SDK, specify it using the \n"SDK" option')
  20. Exit(1)
  21. env.Append( CCFLAGS = ['-arch', a], LINKFLAGS = ['-arch', a] )
  22. @@ -141,11 +141,11 @@ else:
  23. CC = 'gcc', CXX = 'g++',
  24. options = opts)
  25. # Take environment variables into account
  26. - if os.environ.has_key('CXX'):
  27. + if 'CXX' in os.environ:
  28. env['CXX'] = os.environ['CXX']
  29. - if os.environ.has_key('CXXFLAGS'):
  30. + if 'CXXFLAGS' in os.environ:
  31. env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS'])
  32. - if os.environ.has_key('LDFLAGS'):
  33. + if 'LDFLAGS' in os.environ:
  34. env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
  35. check_headers = ['GL/gl.h', 'SDL2/SDL.h', 'SDL2/SDL_image.h', 'vorbis/vorbisfile.h', 'curl/curl.h', 'bullet/btBulletCollisionCommon.h', 'bullet/btBulletDynamicsCommon.h']
  36. check_libs = []
  37. @@ -232,7 +232,7 @@ def distcopy (target, source, env):
  38. def tarballer (target, source, env):
  39. cmd = 'tar -jcf "%s" -C "%s" .' % ( str(target[0]), str(source[0]) )
  40. #cmd = 'tar -jcf ' + str (target[0]) + ' ' + str(source[0]) + " --exclude '*~' "
  41. - print 'running ', cmd, ' ... '
  42. + print ('running ', cmd, ' ... ')
  43. p = os.popen (cmd)
  44. return p.close ()
  45. @@ -362,11 +362,11 @@ env.ParseConfig('pkg-config bullet --lib
  46. conf = Configure(env)
  47. for header in check_headers:
  48. if not conf.CheckCXXHeader(header):
  49. - print 'You do not have the %s headers installed. Exiting.' % header
  50. + print ('You do not have the %s headers installed. Exiting.' % header)
  51. Exit(1)
  52. for lib in check_libs:
  53. if not conf.CheckLibWithHeader(lib[0], lib[1], 'C', lib[2]):
  54. - print lib[3]
  55. + print (lib[3])
  56. Exit(1)
  57. env = conf.Finish()
  58. @@ -535,4 +535,5 @@ if 'data-package' in COMMAND_LINE_TARGET
  59. if 'autopackage' in COMMAND_LINE_TARGETS:
  60. os.system("CXX1=g++-3.4 CXX2=g++-4.1 APBUILD_CXX1=g++-3.4 APBUILD_NO_STATIC_X=1 VDRIFT_VERSION=%s VDRIFT_MINIMAL=%d VDRIFT_RELEASE=%d makepackage tools/autopackage/vdrift.apspec" % (version, env['minimal'], env['release']))
  61. -SConscript('src/SConscript', variant_dir = build_dir, duplicate = 0)
  62. +VariantDir(build_dir, '.', duplicate = 0)
  63. +SConscript('src/SConscript')