patch-SConstruct 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. $OpenBSD: patch-SConstruct,v 1.5 2017/05/25 09:02:05 espie Exp $
  2. Remove custom optimize flags. Add flags after warning flags so we can remove
  3. some warnings
  4. Index: SConstruct
  5. --- SConstruct.orig
  6. +++ SConstruct
  7. @@ -441,7 +441,6 @@ deps = \
  8. 'gtk+-2.0' : '2.8.1',
  9. 'libxml-2.0' : '2.6.0',
  10. 'samplerate' : '0.1.0',
  11. - 'raptor2' : '2.0.0',
  12. 'lrdf' : '0.4.0',
  13. 'jack' : '0.120.0',
  14. 'libgnomecanvas-2.0' : '2.0',
  15. @@ -588,9 +587,6 @@ libraries['lrdf'].ParseConfig('pkg-config --cflags --l
  16. libraries['liblo'] = LibraryInfo()
  17. libraries['liblo'].ParseConfig('pkg-config --cflags --libs liblo')
  18. -libraries['raptor'] = LibraryInfo()
  19. -libraries['raptor'].ParseConfig('pkg-config --cflags --libs raptor2')
  20. -
  21. libraries['sndfile'] = LibraryInfo()
  22. libraries['sndfile'].ParseConfig ('pkg-config --cflags --libs sndfile')
  23. @@ -629,6 +625,9 @@ libraries['midi++2'] = LibraryInfo (LIBS='midi++', LIB
  24. libraries['pbd'] = LibraryInfo (LIBS='pbd', LIBPATH='#libs/pbd', CPPPATH='#libs/pbd')
  25. libraries['gtkmm2ext'] = LibraryInfo (LIBS='gtkmm2ext', LIBPATH='#libs/gtkmm2ext', CPPPATH='#libs/gtkmm2ext')
  26. +libraries['execinfo'] = LibraryInfo (LIBS='execinfo')
  27. +conf = Configure(libraries['execinfo'])
  28. +conf.Finish()
  29. # SCons should really do this for us
  30. @@ -678,6 +677,9 @@ if env['DIST_TARGET'] == 'auto':
  31. else:
  32. env['DIST_TARGET'] = 'leopard'
  33. else:
  34. + if re.search("openbsd", config[config_kernel]):
  35. + if config[config_cpu] == 'amd64':
  36. + config[config_cpu] = 'x86_64'
  37. if re.search ("x86_64", config[config_cpu]) != None:
  38. env['DIST_TARGET'] = 'x86_64'
  39. elif re.search("i[0-5]86", config[config_cpu]) != None:
  40. @@ -698,6 +700,7 @@ if env['DIST_TARGET'] != 'tiger' and env['DIST_TARGET'
  41. env['AUSTATE'] = 0
  42. env['WITH_CARBON'] = 0
  43. +build_host_supports_sse = 0
  44. if config[config_cpu] == 'powerpc' and env['DIST_TARGET'] != 'none':
  45. # Apple/PowerPC optimization options
  46. #
  47. @@ -839,11 +842,6 @@ if env['ARCH'] != '':
  48. #
  49. opt_flags[:0] = [
  50. - "-O3",
  51. - "-fomit-frame-pointer",
  52. - "-ffast-math",
  53. - "-fstrength-reduce",
  54. - "-pipe"
  55. ]
  56. if env['DEBUG'] == 1:
  57. @@ -860,14 +858,15 @@ if env['UNIVERSAL'] == 1:
  58. env.Append(CCFLAGS="-arch i386 -arch ppc")
  59. env.Append(LINKFLAGS="-arch i386 -arch ppc")
  60. -
  61. #
  62. -# warnings flags
  63. +# warnings flags and user
  64. #
  65. -env.Append(CCFLAGS="-Wall")
  66. -env.Append(CXXFLAGS="-Woverloaded-virtual")
  67. +env.Append(CCFLAGS="-Wall ${CFLAGS}")
  68. +env.Append(CXXFLAGS="-Woverloaded-virtual ${CXXFLAGS}")
  69. +env.Append(LINKFLAGS="-Wl,-rpath,${LOCALBASE}/lib/ardour2")
  70. +
  71. if env['EXTRA_WARN']:
  72. env.Append(CCFLAGS="-Wextra -pedantic -ansi")
  73. env.Append(CXXFLAGS="-ansi")
  74. @@ -930,6 +929,7 @@ libraries['vamphost'] = LibraryInfo (LIBS='vamphostsdk
  75. env['RUBBERBAND'] = False
  76. +env.Merge([libraries['fftw3f']])
  77. conf = Configure (env)
  78. if conf.CheckHeader ('fftw3.h'):
  79. @@ -953,8 +953,11 @@ conf.Finish()
  80. #
  81. # Check for libusb
  82. -libraries['usb'] = LibraryInfo ()
  83. +libraries['usb'] = LibraryInfo ( )
  84. prep_libcheck(env, libraries['usb'])
  85. +# I have no idea why this does not work
  86. +libraries['usb'].Append(CPPPATH = [ '${LOCALBASE}/include' ])
  87. +libraries['usb'].Append(LIBPATH = [ '${LOCALBASE}/lib' ])
  88. conf = Configure (libraries['usb'])
  89. if conf.CheckLib ('usb', 'usb_interrupt_write'):
  90. @@ -1062,6 +1065,11 @@ elif conf.CheckCHeader('/System/Library/Frameworks/Cor
  91. env['SYSMIDI'] = 'CoreMIDI'
  92. subst_dict['%MIDITAG%'] = "ardour"
  93. subst_dict['%MIDITYPE%'] = "coremidi"
  94. +elif conf.CheckHeader("sndio.h"):
  95. + libraries['sysmidi'] = LibraryInfo (LIBS='sndio')
  96. + env['SYSMIDI'] = 'SndioMIDI'
  97. + subst_dict['%MIDITAG%'] = "ardour"
  98. + subst_dict['%MIDITYPE%'] = "sndio"
  99. else:
  100. print "It appears you don't have the required MIDI libraries installed. For Linux this means you are missing the development package for ALSA libraries."
  101. sys.exit (1)
  102. @@ -1284,11 +1292,7 @@ subst_dict['%INSTALL_PREFIX%'] = install_prefix;
  103. subst_dict['%FINAL_PREFIX%'] = final_prefix;
  104. subst_dict['%PREFIX%'] = final_prefix;
  105. -if env['PREFIX'] == '/usr':
  106. - final_config_prefix = '/etc'
  107. -else:
  108. - final_config_prefix = env['PREFIX'] + '/etc'
  109. -
  110. +final_config_prefix = '/etc'
  111. config_prefix = '$DESTDIR' + final_config_prefix
  112. #