Ticket #21538: patch-Sconstruct.diff

File patch-Sconstruct.diff, 2.7 KB (added by xenith (Justin Seabrook-Rocha), 15 years ago)

New Sconstruct patchfile.

  • Sconstruct

    old new  
    4141
    4242
    4343def get_platform_flags( opts ):
    44         includes = []
     44        includes = [ '@PREFIX@/include' ]
    4545        cppflags = []
    46         ldflags = []
     46        ldflags = [ '@LDFLAGS@' ]
    4747
    4848        env = Environment( options = opts )
    4949
     
    7070                if str(env['flac']) == "1": cppflags.append('-DFLAC_SUPPORT')
    7171               
    7272                if sys.platform == "darwin" and str(env['coreaudio']) == "1": cppflags.append('-DCOREAUDIO_SUPPORT')
     73                if sys.platform == "darwin" and str(env['coremidi']) == "1": cppflags.append('-DCOREMIDI_SUPPORT')
    7374
    7475                cppflags.append('-DLADSPA_SUPPORT')
    7576               
     
    8384
    8485        if sys.platform == "darwin":
    8586                ldflags.append( '-L/opt/local/lib' )
     87                includes.append( '/opt/local/include' )
    8688
    87         if sys.platform == 'linux2':
     89        elif sys.platform == 'linux2':
    8890                ldflags.append('-lasound')
    8991
    9092        elif sys.platform == "win32":
     
    275277        if sys.platform == "darwin" and str(env['coreaudio']) == "1":
    276278                env.Append( LINKFLAGS = ['-framework','ApplicationServices'])
    277279                env.Append( LINKFLAGS = ['-framework','AudioUnit'])
    278                 env.Append( LINKFLAGS = ['-framework','Coreaudio'])
     280                env.Append( LINKFLAGS = ['-framework','CoreAudio'])
    279281
     282        if sys.platform == "darwin" and str(env['coremidi']) == "1":
     283                env.Append( LINKFLAGS = ['-framework','CoreMIDI'])
    280284
    281285
    282286        app = env.Program(target = 'hydrogen', source = src )
     
    318322        rv = "-DJACK_NO_BBT_OFFSET"
    319323    xenv.MergeFlags(rv)
    320324
    321 opts = Options('scache.conf')
     325opts = Variables('scache.conf')
    322326
    323327#platform independent settings
    324328opts.Add('debug', 'Set to 1 to build with debug informations', 0)
     
    329333
    330334#platform dependent settings
    331335if sys.platform == "darwin":
    332         opts.Add('coreaudio', 'Set to 1 to enable Coreaudio',1)
     336        opts.Add('coreaudio', 'Set to 1 to enable CoreAudio',1)
     337        opts.Add('coremidi', 'Set to 1 to enable CoreMIDI',1)
     338        opts.Add('portmidi', 'Set to 1 to enable portmidi',0)
     339        opts.Add('portaudio', 'Set to 1 to enable portaudio',0)
     340        opts.Add('oss', 'Set to 1 to enable oss',0)
     341        opts.Add('alsa', 'Set to 1 to enable alsa',0)
     342        opts.Add('jack', 'Set to 1 to enable jack',0)
     343        opts.Add('flac', 'Set to 1 to enable flac',1)
     344        opts.Add('lash', 'Set to 1 to enable lash',0)
     345        opts.Add('lrdf', 'Set to 1 to enable lrdf',0)
    333346
    334 if sys.platform != "win32":
     347elif sys.platform != "win32":
    335348        opts.Add('oss', 'Set to 1 to enable oss',1)
    336349
    337350        opts.Add('portmidi', 'Set to 1 to enable portmidi',0)
     
    482495print "  portmidi: " + printStatus( env["portmidi"] )
    483496if sys.platform == "darwin":
    484497        print " coreaudio: " + printStatus( env["coreaudio"] )
     498        print " coremidi: " + printStatus( env["coremidi"] )
    485499
    486500print "\n================================================================="
    487501print ""