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-sconstruct.patch (2866B)


  1. --- ./SConstruct.orig 2014-08-04 08:43:04.000000000 -0400
  2. +++ ./SConstruct 2017-10-15 11:18:01.792656230 -0400
  3. @@ -92,9 +92,9 @@ elif sys.platform == 'darwin':
  4. for a in env['universal']:
  5. if not sdk_path:
  6. - print 'Building a universal binary require access to an ' + \
  7. + print ('Building a universal binary require access to an ' + \
  8. 'SDK that has universal \nbinary support.If you know ' + \
  9. - 'the location of such an SDK, specify it using the \n"SDK" option'
  10. + 'the location of such an SDK, specify it using the \n"SDK" option')
  11. Exit(1)
  12. env.Append( CCFLAGS = ['-arch', a], LINKFLAGS = ['-arch', a] )
  13. @@ -141,11 +141,11 @@ else:
  14. CC = 'gcc', CXX = 'g++',
  15. options = opts)
  16. # Take environment variables into account
  17. - if os.environ.has_key('CXX'):
  18. + if 'CXX' in os.environ:
  19. env['CXX'] = os.environ['CXX']
  20. - if os.environ.has_key('CXXFLAGS'):
  21. + if 'CXXFLAGS' in os.environ:
  22. env['CXXFLAGS'] += SCons.Util.CLVar(os.environ['CXXFLAGS'])
  23. - if os.environ.has_key('LDFLAGS'):
  24. + if 'LDFLAGS' in os.environ:
  25. env['LINKFLAGS'] += SCons.Util.CLVar(os.environ['LDFLAGS'])
  26. check_headers = ['GL/gl.h', 'SDL2/SDL.h', 'SDL2/SDL_image.h', 'vorbis/vorbisfile.h', 'curl/curl.h', 'bullet/btBulletCollisionCommon.h', 'bullet/btBulletDynamicsCommon.h']
  27. check_libs = []
  28. @@ -232,7 +232,7 @@ def distcopy (target, source, env):
  29. def tarballer (target, source, env):
  30. cmd = 'tar -jcf "%s" -C "%s" .' % ( str(target[0]), str(source[0]) )
  31. #cmd = 'tar -jcf ' + str (target[0]) + ' ' + str(source[0]) + " --exclude '*~' "
  32. - print 'running ', cmd, ' ... '
  33. + print ('running ', cmd, ' ... ')
  34. p = os.popen (cmd)
  35. return p.close ()
  36. @@ -362,11 +362,11 @@ env.ParseConfig('pkg-config bullet --lib
  37. conf = Configure(env)
  38. for header in check_headers:
  39. if not conf.CheckCXXHeader(header):
  40. - print 'You do not have the %s headers installed. Exiting.' % header
  41. + print ('You do not have the %s headers installed. Exiting.' % header)
  42. Exit(1)
  43. for lib in check_libs:
  44. if not conf.CheckLibWithHeader(lib[0], lib[1], 'C', lib[2]):
  45. - print lib[3]
  46. + print (lib[3])
  47. Exit(1)
  48. env = conf.Finish()
  49. @@ -535,4 +535,5 @@ if 'data-package' in COMMAND_LINE_TARGET
  50. if 'autopackage' in COMMAND_LINE_TARGETS:
  51. 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']))
  52. -SConscript('src/SConscript', variant_dir = build_dir, duplicate = 0)
  53. +VariantDir(build_dir, '.', duplicate = 0)
  54. +SConscript('src/SConscript')