From ba7835912916112c03519a64ddd0270c6d7f586c Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 28 Feb 2016 21:16:44 +0100 Subject: [PATCH] prepare for update to waf 1.8 uselib is no longer implicit (inherited by .use). This is still incomplete, some uselibs for non-linux variants may be missing. bld.is_defined("HAVE_XXX") also no longer works and will have to be changed (I think to bld.env["HAVE_XXX"]) in countless places. --- cfgtool/wscript | 4 +- gtk2_ardour/wscript | 2 +- headless/wscript | 2 +- libs/ardour/wscript | 3 +- libs/ardouralsautil/wscript | 2 +- libs/audiographer/wscript | 2 +- libs/backends/alsa/wscript | 2 +- libs/backends/coreaudio/wscript | 1 + libs/backends/dummy/wscript | 1 + libs/backends/jack/wscript | 2 + libs/backends/portaudio/wscript | 2 +- libs/canvas/wscript | 58 +++++++++++++------------- libs/evoral/wscript | 4 +- libs/gtkmm2ext/wscript | 2 +- libs/panners/1in2out/wscript | 1 + libs/panners/2in2out/wscript | 1 + libs/panners/stereobalance/wscript | 1 + libs/panners/vbap/wscript | 1 + libs/surfaces/control_protocol/wscript | 1 + libs/surfaces/faderport/wscript | 2 +- libs/surfaces/generic_midi/wscript | 2 +- libs/surfaces/mackie/wscript | 2 +- libs/vamp-plugins/wscript | 5 ++- session_utils/wscript | 2 +- tools/luadevel/wscript | 2 +- 25 files changed, 60 insertions(+), 47 deletions(-) diff --git a/cfgtool/wscript b/cfgtool/wscript index 04dda4f183..6f594ca792 100644 --- a/cfgtool/wscript +++ b/cfgtool/wscript @@ -19,6 +19,6 @@ def build(bld): obj = bld (features = 'cxx c cxxprogram') obj.source = 'cfgtool.cc' obj.target = 'cfgtool' - obj.use = [ 'libpbd', 'libardour', ] - obj.use = [ 'libpbd', 'libardour', ] + obj.use = [ 'libpbd', 'libardour' ] + obj.uselib = [ 'GLIBMM', 'XML' ] obj.install_path = None diff --git a/gtk2_ardour/wscript b/gtk2_ardour/wscript index 4faee4f944..e881f752c5 100644 --- a/gtk2_ardour/wscript +++ b/gtk2_ardour/wscript @@ -479,7 +479,7 @@ def build(bld): ] obj.install_path = bld.env['DLLDIR'] obj.linkflags = '' - obj.uselib = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD GTK OGG CURL DL GTKMM CANVAS FFTW3F LO TAGLIB ' + obj.uselib = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD GTK OGG CURL DL GTKMM CANVAS FFTW3F LO TAGLIB XML ' if sys.platform == 'darwin': obj.uselib += ' AUDIOUNITS OSX ' diff --git a/headless/wscript b/headless/wscript index 31a111bc80..675c76bbf8 100644 --- a/headless/wscript +++ b/headless/wscript @@ -58,7 +58,7 @@ def build(bld): 'LOCALEDIR="' + os.path.join(os.path.normpath(bld.env['DATADIR']), 'locale') + '"', ] obj.install_path = bld.env['LIBDIR'] - obj.uselib = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD OGG CURL DL' + obj.uselib = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD OGG CURL DL XML' obj.uselib += ' FFTW3F' obj.uselib += ' AUDIOUNITS OSX LO ' obj.uselib += ' TAGLIB ' diff --git a/libs/ardour/wscript b/libs/ardour/wscript index bb4dbf205d..ec404e6463 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -362,7 +362,7 @@ def build(bld): obj.name = 'libardour' obj.target = 'ardour' obj.uselib = ['GLIBMM','GTHREAD','AUBIO','SIGCPP','XML','UUID', - 'SNDFILE','SAMPLERATE','LRDF','AUDIOUNITS', + 'SNDFILE','SAMPLERATE','LRDF','AUDIOUNITS', 'GIOMM', 'OSX','BOOST','CURL','TAGLIB','VAMPSDK','VAMPHOSTSDK','RUBBERBAND'] obj.use = ['libpbd','libmidipp','libevoral', 'libaudiographer', @@ -448,6 +448,7 @@ def build(bld): cxxflags = avx_cxxflags, includes = [ '.' ], use = [ 'libtimecode', 'libpbd', 'libevoral', 'liblua' ], + uselib = [ 'GLIBMM', 'XML' ], target = 'sse_avx_functions') obj.use += ['sse_avx_functions' ] diff --git a/libs/ardouralsautil/wscript b/libs/ardouralsautil/wscript index 60be05240d..fe53ddbfa5 100644 --- a/libs/ardouralsautil/wscript +++ b/libs/ardouralsautil/wscript @@ -34,7 +34,7 @@ def build(bld): obj.name = 'ardouralsautil' obj.target = 'ardouralsautil' obj.use = 'libpbd' - obj.uselib = [ 'ALSA' ] + obj.uselib = [ 'ALSA', 'GLIBMM' ] obj.vnum = '0.0.1' obj.install_path = os.path.join(bld.env['LIBDIR']) diff --git a/libs/audiographer/wscript b/libs/audiographer/wscript index 17e7482f3f..d1863cf49b 100644 --- a/libs/audiographer/wscript +++ b/libs/audiographer/wscript @@ -85,7 +85,7 @@ def build(bld): audiographer.target = 'audiographer' audiographer.export_includes = ['.', './src'] audiographer.includes = ['.', './src','../ardour','../timecode','../evoral'] - audiographer.uselib = 'GLIB GLIBMM GTHREAD SAMPLERATE SNDFILE FFTW3F VAMPSDK VAMPHOSTSDK' + audiographer.uselib = 'GLIB GLIBMM GTHREAD SAMPLERATE SNDFILE FFTW3F VAMPSDK VAMPHOSTSDK XML' audiographer.use = 'libpbd' audiographer.vnum = AUDIOGRAPHER_LIB_VERSION audiographer.install_path = bld.env['LIBDIR'] diff --git a/libs/backends/alsa/wscript b/libs/backends/alsa/wscript index 7a4649f779..465260d265 100644 --- a/libs/backends/alsa/wscript +++ b/libs/backends/alsa/wscript @@ -29,7 +29,7 @@ def build(bld): obj.name = 'alsa_audiobackend' obj.target = 'alsa_audiobackend' obj.use = 'libardour libpbd ardouralsautil' - obj.uselib = 'ALSA' + obj.uselib = 'ALSA GLIBMM XML' obj.install_path = os.path.join(bld.env['LIBDIR'], 'backends') obj.defines = ['PACKAGE="' + I18N_PACKAGE + '"', 'ARDOURBACKEND_DLL_EXPORTS' diff --git a/libs/backends/coreaudio/wscript b/libs/backends/coreaudio/wscript index 9aad9cde4f..8030af2be8 100644 --- a/libs/backends/coreaudio/wscript +++ b/libs/backends/coreaudio/wscript @@ -29,6 +29,7 @@ def build(bld): obj.name = 'coreaudio_backend' obj.target = 'coreaudio_backend' obj.use = 'libardour libpbd' + obj.uselib = 'GLIBMM XML' obj.framework = [ 'CoreAudio', 'AudioToolbox', 'CoreServices' ] if bld.env['build_target'] not in [ 'lion' ] and (not bld.env['build_arch'] == "ppc"): obj.framework += [ 'CoreMidi' ] diff --git a/libs/backends/dummy/wscript b/libs/backends/dummy/wscript index e1a598525c..e674d3579b 100644 --- a/libs/backends/dummy/wscript +++ b/libs/backends/dummy/wscript @@ -25,6 +25,7 @@ def build(bld): obj.name = 'dummy_audiobackend' obj.target = 'dummy_audiobackend' obj.use = 'libardour libpbd' + obj.uselib = 'GLIBMM XML' obj.install_path = os.path.join(bld.env['LIBDIR'], 'backends') obj.defines = ['PACKAGE="' + I18N_PACKAGE + '"', 'ARDOURBACKEND_DLL_EXPORTS' diff --git a/libs/backends/jack/wscript b/libs/backends/jack/wscript index 17b4d160dc..d9dbbb785f 100644 --- a/libs/backends/jack/wscript +++ b/libs/backends/jack/wscript @@ -108,6 +108,8 @@ def build(bld): obj.defines += [ 'USE_WEAK_JACK', 'HAVE_JACK_PORT_RENAME' ] obj.deps = [ 'weak_libjack.def' ] + obj.uselib += [ 'GLIBMM', 'XML' ]; + # # device discovery code in the jack backend needs ALSA # on Linux. diff --git a/libs/backends/portaudio/wscript b/libs/backends/portaudio/wscript index 1c6af9fea7..150b176d00 100644 --- a/libs/backends/portaudio/wscript +++ b/libs/backends/portaudio/wscript @@ -32,7 +32,7 @@ def build_portaudio (bld, name, defines): obj.name = name obj.target = name obj.use = 'libardour libpbd' - obj.uselib = ['PORTAUDIO'] + obj.uselib = 'PORTAUDIO GLIBMM XML' obj.install_path = os.path.join(bld.env['LIBDIR'], 'backends') obj.defines = ['PACKAGE="' + I18N_PACKAGE + '"', 'ARDOURBACKEND_DLL_EXPORTS', diff --git a/libs/canvas/wscript b/libs/canvas/wscript index 2a4cc0bf3a..63bccec166 100644 --- a/libs/canvas/wscript +++ b/libs/canvas/wscript @@ -84,7 +84,7 @@ def build(bld): obj.export_includes = ['.'] obj.includes = ['.'] - obj.uselib = 'SIGCPP CAIROMM GTKMM BOOST' + obj.uselib = 'SIGCPP CAIROMM GTKMM BOOST XML' obj.use = [ 'libpbd', 'libevoral', 'libardour', 'libgtkmm2ext', 'libevoral' ] obj.name = 'libcanvas' obj.target = 'canvas' @@ -92,7 +92,32 @@ def build(bld): obj.install_path = bld.env['LIBDIR'] obj.defines += [ 'PACKAGE="' + I18N_PACKAGE + '"' ] - if bld.env['BUILD_TESTS'] and bld.env['HAVE_CPPUNIT']: + # canvas unit-tests are outdated + if False and bld.env['BUILD_TESTS'] and bld.is_defined('HAVE_CPPUNIT'): + unit_testobj = bld(features = 'cxx cxxprogram') + unit_testobj.source = ''' + test/group.cc + test/arrow.cc + test/optimizing_lookup_table.cc + test/polygon.cc + test/types.cc + test/render.cc + test/xml.cc + test/wave_view.cc + test/item.cc + test/testrunner.cpp + '''.split() + + unit_testobj.includes = obj.includes + ['test', '../pbd'] + unit_testobj.uselib = 'CPPUNIT SIGCPP CAIROMM GTKMM' + unit_testobj.uselib_local = 'libcanvas libevoral libardour libgtkmm2ext' + unit_testobj.name = 'libcanvas-unit-tests' + unit_testobj.target = 'run-tests' + unit_testobj.install_path = '' + unit_testobj.cxxflags = ['-DPACKAGE="libcanvastest"'] + unit_testobj.cxxflags += ['-DDATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"'] + unit_testobj.cxxflags += ['-DCONFIG_DIR="' + os.path.normpath(bld.env['CONFDIR']) + '"'] + unit_testobj.cxxflags += ['-DMODULE_DIR="' + os.path.normpath(bld.env['LIBDIR']) + '"'] manual_tests = ''' test/hello_world.cc @@ -106,7 +131,7 @@ def build(bld): for t in manual_tests: target = t[:-3] name = t[t.find('/')+1:-3] - manual_testobj = bld.new_task_gen('cxx', 'program') + manual_testobj = bld(features = 'cxx cxxprogram') manual_testobj.source = t manual_testobj.includes = obj.includes + ['test', '../pbd'] manual_testobj.uselib = 'CPPUNIT SIGCPP CAIROMM GTKMM' @@ -115,31 +140,6 @@ def build(bld): manual_testobj.target = target manual_testobj.install_path = '' - unit_testobj = bld.new_task_gen('cxx', 'program') - unit_testobj.source = ''' - test/group.cc - test/arrow.cc - test/optimizing_lookup_table.cc - test/polygon.cc - test/types.cc - test/render.cc - test/xml.cc - test/wave_view.cc - test/item.cc - test/testrunner.cpp - '''.split() - - unit_testobj.includes = obj.includes + ['test', '../pbd'] - unit_testobj.uselib = 'CPPUNIT SIGCPP CAIROMM GTKMM' - unit_testobj.uselib_local = 'libcanvas libevoral libardour libgtkmm2ext' - unit_testobj.name = 'libcanvas-unit-tests' - unit_testobj.target = 'run-tests' - unit_testobj.install_path = '' - unit_testobj.cxxflags = ['-DPACKAGE="libcanvastest"'] - unit_testobj.cxxflags += ['-DDATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"'] - unit_testobj.cxxflags += ['-DCONFIG_DIR="' + os.path.normpath(bld.env['CONFIGDIR']) + '"'] - unit_testobj.cxxflags += ['-DMODULE_DIR="' + os.path.normpath(bld.env['LIBDIR']) + '"'] - benchmarks = ''' benchmark/items_at_point.cc benchmark/render_parts.cc @@ -150,7 +150,7 @@ def build(bld): for t in benchmarks: target = t[:-3] name = t[t.find('/')+1:-3] - manual_testobj = bld.new_task_gen('cxx', 'program') + manual_testobj = bld(features = 'cxx cxxprogram') manual_testobj.source = [ t, 'benchmark/benchmark.cc' ] manual_testobj.includes = obj.includes + ['test', '../pbd'] manual_testobj.uselib = 'CPPUNIT SIGCPP CAIROMM GTKMM' diff --git a/libs/evoral/wscript b/libs/evoral/wscript index 12ebffe1d2..82534f5d92 100644 --- a/libs/evoral/wscript +++ b/libs/evoral/wscript @@ -107,7 +107,7 @@ def build(bld): obj.includes = ['.', './src'] obj.name = 'libevoral' obj.target = 'evoral' - obj.uselib = 'GLIBMM GTHREAD SMF' + obj.uselib = 'GLIBMM GTHREAD SMF XML' obj.use = 'libsmf libpbd' obj.vnum = EVORAL_LIB_VERSION obj.install_path = bld.env['LIBDIR'] @@ -122,7 +122,7 @@ def build(bld): obj.includes = ['.', './src'] obj.name = 'libevoral_static' obj.target = 'evoral_static' - obj.uselib = 'GLIBMM GTHREAD SMF' + obj.uselib = 'GLIBMM GTHREAD SMF XML' obj.use = 'libsmf libpbd' obj.vnum = EVORAL_LIB_VERSION obj.install_path = '' diff --git a/libs/gtkmm2ext/wscript b/libs/gtkmm2ext/wscript index 1afaca455e..0c8f454128 100644 --- a/libs/gtkmm2ext/wscript +++ b/libs/gtkmm2ext/wscript @@ -107,7 +107,7 @@ def build(bld): obj.includes = ['.'] obj.name = 'libgtkmm2ext' obj.target = 'gtkmm2ext' - obj.uselib = 'GTKMM GTK' + obj.uselib = 'GTKMM GTK XML' obj.use = [ 'libpbd', 'libardour' ] obj.vnum = GTKMM2EXT_LIB_VERSION obj.install_path = bld.env['LIBDIR'] diff --git a/libs/panners/1in2out/wscript b/libs/panners/1in2out/wscript index 2c1d9f1293..b28c95df78 100644 --- a/libs/panners/1in2out/wscript +++ b/libs/panners/1in2out/wscript @@ -22,6 +22,7 @@ def build(bld): obj.name = 'libardour_pan1in2out' obj.target = 'pan1in2out' obj.use = 'libardour libardour_cp libpbd' + obj.uselib = 'GLIBMM XML' obj.install_path = os.path.join(bld.env['LIBDIR'], 'panners') def shutdown(): diff --git a/libs/panners/2in2out/wscript b/libs/panners/2in2out/wscript index bd82526801..f49f1cde2a 100644 --- a/libs/panners/2in2out/wscript +++ b/libs/panners/2in2out/wscript @@ -22,6 +22,7 @@ def build(bld): obj.name = 'libardour_pan2in2out' obj.target = 'pan2in2out' obj.use = 'libardour libardour_cp libpbd' + obj.uselib = 'GLIBMM XML' obj.install_path = os.path.join(bld.env['LIBDIR'], 'panners') def shutdown(): diff --git a/libs/panners/stereobalance/wscript b/libs/panners/stereobalance/wscript index 72b7c46f58..16d69d907b 100644 --- a/libs/panners/stereobalance/wscript +++ b/libs/panners/stereobalance/wscript @@ -22,6 +22,7 @@ def build(bld): obj.name = 'libardour_panbalance' obj.target = 'panbalance' obj.use = 'libardour libardour_cp libpbd' + obj.uselib = 'GLIBMM XML' obj.install_path = os.path.join(bld.env['LIBDIR'], 'panners') def shutdown(): diff --git a/libs/panners/vbap/wscript b/libs/panners/vbap/wscript index bb2cb5bc39..d8f47b2a40 100644 --- a/libs/panners/vbap/wscript +++ b/libs/panners/vbap/wscript @@ -22,6 +22,7 @@ def build(bld): obj.name = 'libardour_panvbap' obj.target = 'panvbap' obj.use = 'libardour libardour_cp libpbd' + obj.uselib = 'GLIBMM XML' obj.install_path = os.path.join(bld.env['LIBDIR'], 'panners') def shutdown(): diff --git a/libs/surfaces/control_protocol/wscript b/libs/surfaces/control_protocol/wscript index b3fcf236e4..f1036c87a7 100644 --- a/libs/surfaces/control_protocol/wscript +++ b/libs/surfaces/control_protocol/wscript @@ -33,6 +33,7 @@ def build(bld): obj.name = 'libardour_cp' obj.target = 'ardourcp' obj.use = 'libardour' + obj.uselib = 'GLIBMM SIGCPP XML' obj.install_path = bld.env['LIBDIR'] def shutdown(): diff --git a/libs/surfaces/faderport/wscript b/libs/surfaces/faderport/wscript index a0c3a2e160..b13796d793 100644 --- a/libs/surfaces/faderport/wscript +++ b/libs/surfaces/faderport/wscript @@ -26,7 +26,7 @@ def build(bld): obj.includes = [ '.', './faderport'] obj.name = 'libardour_faderport' obj.target = 'ardour_faderport' - obj.uselib = 'GTKMM GTK GDK' + obj.uselib = 'GTKMM GTK GDK XML' obj.use = 'libardour libardour_cp libgtkmm2ext libpbd' obj.install_path = os.path.join(bld.env['LIBDIR'], 'surfaces') diff --git a/libs/surfaces/generic_midi/wscript b/libs/surfaces/generic_midi/wscript index 39a6814c6a..167e1dd03b 100644 --- a/libs/surfaces/generic_midi/wscript +++ b/libs/surfaces/generic_midi/wscript @@ -29,7 +29,7 @@ def build(bld): obj.includes = [ '.', './generic_midi'] obj.name = 'libardour_generic_midi' obj.target = 'ardour_generic_midi' - obj.uselib = 'GTKMM GTK GDK' + obj.uselib = 'GTKMM GTK GDK XML' obj.use = 'libardour libardour_cp libgtkmm2ext libpbd' obj.install_path = os.path.join(bld.env['LIBDIR'], 'surfaces') diff --git a/libs/surfaces/mackie/wscript b/libs/surfaces/mackie/wscript index 7657d76887..b797b4a0b4 100644 --- a/libs/surfaces/mackie/wscript +++ b/libs/surfaces/mackie/wscript @@ -41,7 +41,7 @@ def build(bld): obj.includes = [ '.' ] obj.name = 'libardour_mcp' obj.target = 'ardour_mcp' - obj.uselib = 'GTKMM' + obj.uselib = 'GTKMM XML' obj.use = 'libardour libardour_cp libgtkmm2ext' obj.install_path = os.path.join(bld.env['LIBDIR'], 'surfaces') diff --git a/libs/vamp-plugins/wscript b/libs/vamp-plugins/wscript index 856ffe2658..9f96f6dff9 100644 --- a/libs/vamp-plugins/wscript +++ b/libs/vamp-plugins/wscript @@ -54,7 +54,10 @@ def build(bld): obj.use = 'libvampplugin libqmdsp' obj.defines = [ 'ARDOUR_VAMP_PLUGINS_DLL_EPORTS' ] autowaf.ensure_visible_symbols (obj, True) - if bld.is_defined('HAVE_AUBIO'): + if bld.have_define('HAVE_AUBIO4'): + obj.source += ' Onset.cpp ' + obj.uselib += ' AUBIO4 ' + elif bld.have_define('HAVE_AUBIO'): obj.source += ' Onset.cpp ' obj.uselib += ' AUBIO ' obj.vnum = LIBARDOURVAMPPLUGINS_LIB_VERSION diff --git a/session_utils/wscript b/session_utils/wscript index a001fb9cd7..d53d3ba966 100644 --- a/session_utils/wscript +++ b/session_utils/wscript @@ -54,7 +54,7 @@ def build_ardour_util(bld, util): 'PACKAGE="' + "ARDOURUTILS" + '"', ] obj.install_path = bld.env['LIBDIR'] + '/utils' - obj.uselib = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD OGG CURL DL' + obj.uselib = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD OGG CURL DL XML' obj.uselib += ' FFTW3F' obj.uselib += ' AUDIOUNITS OSX LO ' obj.uselib += ' TAGLIB ' diff --git a/tools/luadevel/wscript b/tools/luadevel/wscript index 730f08a7fd..5f5b46b5d1 100755 --- a/tools/luadevel/wscript +++ b/tools/luadevel/wscript @@ -72,7 +72,7 @@ def build(bld): 'PACKAGE="' + "ARDOURUTILS" + '"', ] - obj.uselib = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD OGG CURL DL' + obj.uselib = 'UUID FLAC FONTCONFIG GLIBMM GTHREAD OGG CURL DL XML' obj.uselib += ' FFTW3F' obj.uselib += ' AUDIOUNITS OSX LO ' obj.uselib += ' TAGLIB '