summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-09-29 19:17:54 +0000
committerDavid Robillard <d@drobilla.net>2011-09-29 19:17:54 +0000
commit723ab60b39aed9a9190e047fc5803c1f4e1adac3 (patch)
treeadc9e942f41ef0bab10a89ede541fcc2023faae5 /libs
parent426d3d8207881b3e84ea8e770ec7118f04c57771 (diff)
Upgrade to waf 1.6.7 and autowaf r52.
git-svn-id: svn://localhost/ardour2/branches/3.0@10162 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/appleutility/wscript9
-rw-r--r--libs/ardour/wscript39
-rw-r--r--libs/audiographer/autowaf.py439
-rw-r--r--libs/audiographer/wscript22
-rw-r--r--libs/clearlooks-newer/wscript12
-rw-r--r--libs/evoral/wscript36
-rw-r--r--libs/gnomecanvas/wscript12
-rw-r--r--libs/gtkmm2ext/wscript19
-rw-r--r--libs/midi++2/wscript18
-rw-r--r--libs/panners/1in2out/wscript14
-rw-r--r--libs/panners/2in2out/wscript14
-rw-r--r--libs/panners/vbap/wscript14
-rw-r--r--libs/panners/wscript8
-rw-r--r--libs/pbd/wscript26
-rw-r--r--libs/qm-dsp/wscript12
-rw-r--r--libs/rubberband/wscript16
-rw-r--r--libs/surfaces/control_protocol/wscript14
-rw-r--r--libs/surfaces/frontier/wscript14
-rw-r--r--libs/surfaces/generic_midi/wscript14
-rw-r--r--libs/surfaces/mackie/wscript14
-rw-r--r--libs/surfaces/osc/wscript14
-rw-r--r--libs/surfaces/powermate/wscript14
-rw-r--r--libs/surfaces/tranzport/wscript14
-rw-r--r--libs/surfaces/wiimote/wscript14
-rw-r--r--libs/surfaces/wscript14
-rw-r--r--libs/taglib/wscript48
-rw-r--r--libs/timecode/wscript12
-rw-r--r--libs/vamp-plugins/wscript16
-rw-r--r--libs/vamp-sdk/wscript16
29 files changed, 244 insertions, 684 deletions
diff --git a/libs/appleutility/wscript b/libs/appleutility/wscript
index 50e7e0200f..e9968f80e8 100644
--- a/libs/appleutility/wscript
+++ b/libs/appleutility/wscript
@@ -1,4 +1,5 @@
-import autowaf
+#!/usr/bin/env python
+from waflib.extras import autowaf as autowaf
import os
libappleutility_sources = [
@@ -20,17 +21,17 @@ libappleutility_sources = [
'CAXException.cpp'
]
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
autowaf.configure(conf)
def build(bld):
- obj = bld.new_task_gen('cxx', 'shlib')
+ obj = bld(features = 'cxx cxxshlib')
obj.uselib = 'AUDIOUNITS OSX'
obj.source = libappleutility_sources
- obj.export_incdirs = ['.']
+ obj.export_includes = ['.']
obj.includes = ['.']
obj.name = 'libappleutility'
obj.target = 'appleutility'
diff --git a/libs/ardour/wscript b/libs/ardour/wscript
index 1b71f58298..45ef1a5ff8 100644
--- a/libs/ardour/wscript
+++ b/libs/ardour/wscript
@@ -1,7 +1,6 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import os
-import glob
import Options
import re
import subprocess
@@ -26,8 +25,8 @@ APPNAME = 'libardour'
VERSION = LIBARDOUR_VERSION
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
path_prefix = 'libs/ardour/'
@@ -233,7 +232,7 @@ def ogg_supported():
out = cmd.communicate()[0].decode('utf-8');
return re.search ('unknown format', out) == None
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
@@ -292,7 +291,7 @@ def configure(conf):
conf.check_cc(fragment = '''
#include <jack/jack.h>
-void callback(int code, const char* reason, void* arg) { return; }
+void callback(jack_status_t code, const char* reason, void* arg) { return; }
int main(int argc, char **argv) {
jack_client_t* c;
jack_on_info_shutdown(c, callback, (void*) 0);
@@ -341,27 +340,27 @@ int main(int argc, char **argv) {
if conf.env['HAVE_LILV'] or conf.env['HAVE_SLV2']:
conf.define ('LV2_SUPPORT', 1)
- conf.write_config_header('libardour-config.h')
+ conf.write_config_header('libardour-config.h', remove=False)
# Boost headers
- autowaf.check_header(conf, 'boost/shared_ptr.hpp')
- autowaf.check_header(conf, 'boost/weak_ptr.hpp')
- autowaf.check_header(conf, 'boost/scoped_ptr.hpp')
- autowaf.check_header(conf, 'boost/ptr_container/ptr_list.hpp')
+ autowaf.check_header(conf, 'cxx', 'boost/shared_ptr.hpp')
+ autowaf.check_header(conf, 'cxx', 'boost/weak_ptr.hpp')
+ autowaf.check_header(conf, 'cxx', 'boost/scoped_ptr.hpp')
+ autowaf.check_header(conf, 'cxx', 'boost/ptr_container/ptr_list.hpp')
def build(bld):
# Library
- obj = bld.new_task_gen('cxx', 'shlib')
+ obj = bld(features = 'c cxx cshlib cxxshlib')
obj.source = libardour_sources
- obj.export_incdirs = ['.']
+ obj.export_includes = ['.']
obj.includes = ['.', '../surfaces/control_protocol', '..']
obj.name = 'libardour'
obj.target = 'ardour'
obj.uselib = ['GLIBMM','GTHREAD','AUBIO','SIGCPP','XML','UUID',
'JACK','SNDFILE','SAMPLERATE','LRDF','AUDIOUNIT',
'OSX','BOOST','CURL','DL']
- obj.uselib_local = ['libpbd','libmidipp','libevoral','libvamphost',
+ obj.use = ['libpbd','libmidipp','libevoral','libvamphost',
'libvampplugin','libtaglib','librubberband',
'libaudiographer']
obj.vnum = LIBARDOUR_LIB_VERSION
@@ -369,7 +368,7 @@ def build(bld):
obj.defines = [
'PACKAGE="libardour3"',
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
- 'CONFIG_DIR="' + os.path.normpath(bld.env['CONFIGDIR']) + '"',
+ 'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
'MODULE_DIR="' + os.path.normpath(bld.env['LIBDIR']) + '"',
'LOCALEDIR="' + os.path.join(
os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
@@ -405,7 +404,7 @@ def build(bld):
if bld.env['COREAUDIO']:
obj.source += [ 'coreaudiosource.cc', 'caimportable.cc' ]
- obj.uselib_local += ['libappleutility']
+ obj.use += ['libappleutility']
obj.source += [ 'audio_unit.cc' ]
if bld.env['FPU_OPTIMIZATION']:
@@ -417,7 +416,7 @@ def build(bld):
# i18n
if bld.env['ENABLE_NLS']:
- mo_files = glob.glob(os.path.join(bld.get_curdir(), 'po/*.mo'))
+ mo_files = bld.path.ant_glob('po/*.mo')
for mo in mo_files:
lang = os.path.basename(mo).replace('.mo', '')
bld.install_as(os.path.join(bld.env['PREFIX'], 'share', 'locale',
@@ -426,7 +425,7 @@ def build(bld):
if bld.env['BUILD_TESTS'] and bld.env['HAVE_CPPUNIT']:
# Unit tests
- testobj = bld.new_task_gen('cxx', 'program')
+ testobj = bld(features = 'cxx cxxprogram')
testobj.source = '''
test/bbt_test.cpp
test/interpolation_test.cpp
@@ -438,14 +437,14 @@ def build(bld):
testobj.includes = obj.includes + ['test', '../pbd']
testobj.uselib = ['CPPUNIT','SIGCPP','JACK','GLIBMM','GTHREAD',
'SAMPLERATE','XML','LRDF','COREAUDIO']
- testobj.uselib_local = ['libpbd','libmidipp','libardour']
+ testobj.use = ['libpbd','libmidipp','libardour']
testobj.name = 'libardour-tests'
testobj.target = 'run-tests'
testobj.install_path = ''
testobj.defines = [
'PACKAGE="libardour3test"',
'DATA_DIR="' + os.path.normpath(bld.env['DATADIR']) + '"',
- 'CONFIG_DIR="' + os.path.normpath(bld.env['CONFIGDIR']) + '"',
+ 'CONFIG_DIR="' + os.path.normpath(bld.env['SYSCONFDIR']) + '"',
'MODULE_DIR="' + os.path.normpath(bld.env['LIBDIR']) + '"',
'LOCALEDIR="' + os.path.join(
os.path.normpath(bld.env['DATADIR']), 'locale') + '"',
diff --git a/libs/audiographer/autowaf.py b/libs/audiographer/autowaf.py
deleted file mode 100644
index cee80a587b..0000000000
--- a/libs/audiographer/autowaf.py
+++ /dev/null
@@ -1,439 +0,0 @@
-#!/usr/bin/env python
-# Waf utilities for easily building standard unixey packages/libraries
-# Licensed under the GNU GPL v2 or later, see COPYING file for details.
-# Copyright (C) 2008 David Robillard
-# Copyright (C) 2008 Nedko Arnaudov
-
-import Configure
-import Options
-import Utils
-import misc
-import os
-import subprocess
-import sys
-from TaskGen import feature, before, after
-
-global g_is_child
-g_is_child = False
-
-# Only run autowaf hooks once (even if sub projects call several times)
-global g_step
-g_step = 0
-
-# Compute dependencies globally
-#import preproc
-#preproc.go_absolute = True
-
-@feature('cc', 'cxx')
-@after('apply_lib_vars')
-@before('apply_obj_vars_cc', 'apply_obj_vars_cxx')
-def include_config_h(self):
- self.env.append_value('INC_PATHS', self.bld.srcnode)
-
-def set_options(opt):
- "Add standard autowaf options if they havn't been added yet"
- global g_step
- if g_step > 0:
- return
- opt.tool_options('compiler_cc')
- opt.tool_options('compiler_cxx')
- opt.add_option('--debug', action='store_true', default=False, dest='debug',
- help="Build debuggable binaries [Default: False]")
- opt.add_option('--strict', action='store_true', default=False, dest='strict',
- help="Use strict compiler flags and show all warnings [Default: False]")
- opt.add_option('--docs', action='store_true', default=False, dest='docs',
- help="Build documentation - requires doxygen [Default: False]")
- opt.add_option('--bundle', action='store_true', default=False,
- help="Build a self-contained bundle [Default: False]")
- opt.add_option('--bindir', type='string',
- help="Executable programs [Default: PREFIX/bin]")
- opt.add_option('--libdir', type='string',
- help="Libraries [Default: PREFIX/lib]")
- opt.add_option('--includedir', type='string',
- help="Header files [Default: PREFIX/include]")
- opt.add_option('--datadir', type='string',
- help="Shared data [Default: PREFIX/share]")
- opt.add_option('--configdir', type='string',
- help="Configuration data [Default: PREFIX/etc]")
- opt.add_option('--mandir', type='string',
- help="Manual pages [Default: DATADIR/man]")
- opt.add_option('--htmldir', type='string',
- help="HTML documentation [Default: DATADIR/doc/PACKAGE]")
- opt.add_option('--lv2-user', action='store_true', default=False, dest='lv2_user',
- help="Install LV2 bundles to user-local location [Default: False]")
- if sys.platform == "darwin":
- opt.add_option('--lv2dir', type='string',
- help="LV2 bundles [Default: /Library/Audio/Plug-Ins/LV2]")
- else:
- opt.add_option('--lv2dir', type='string',
- help="LV2 bundles [Default: LIBDIR/lv2]")
- g_step = 1
-
-def check_header(conf, name, define='', mandatory=False):
- "Check for a header iff it hasn't been checked for yet"
- if type(conf.env['AUTOWAF_HEADERS']) != dict:
- conf.env['AUTOWAF_HEADERS'] = {}
-
- checked = conf.env['AUTOWAF_HEADERS']
- if not name in checked:
- checked[name] = True
- includes = '' # search default system include paths
- if sys.platform == "darwin":
- includes = '/opt/local/include'
- if define != '':
- conf.check(header_name=name, includes=includes, define_name=define, mandatory=mandatory)
- else:
- conf.check(header_name=name, includes=includes, mandatory=mandatory)
-
-def nameify(name):
- return name.replace('/', '_').replace('++', 'PP').replace('-', '_').replace('.', '_')
-
-def check_pkg(conf, name, **args):
- if not 'mandatory' in args:
- args['mandatory'] = True
- "Check for a package iff it hasn't been checked for yet"
- var_name = 'HAVE_' + nameify(args['uselib_store'])
- check = not var_name in conf.env
- if not check and 'atleast_version' in args:
- # Re-check if version is newer than previous check
- checked_version = conf.env['VERSION_' + name]
- if checked_version and checked_version < args['atleast_version']:
- check = True;
- if check:
- conf.check_cfg(package=name, args="--cflags --libs", **args)
- found = bool(conf.env[var_name])
- if found:
- conf.define(var_name, int(found))
- if 'atleast_version' in args:
- conf.env['VERSION_' + name] = args['atleast_version']
- else:
- conf.undefine(var_name)
- if args['mandatory'] == True:
- conf.fatal("Required package " + name + " not found")
-
-def configure(conf):
- global g_step
- if g_step > 1:
- return
- def append_cxx_flags(vals):
- conf.env.append_value('CCFLAGS', vals.split())
- conf.env.append_value('CXXFLAGS', vals.split())
- conf.line_just = 43
- display_header('Global Configuration')
- conf.check_tool('misc')
- conf.check_tool('compiler_cc')
- conf.check_tool('compiler_cxx')
- conf.env['DOCS'] = Options.options.docs
- conf.env['DEBUG'] = Options.options.debug
- conf.env['STRICT'] = Options.options.strict
- conf.env['PREFIX'] = os.path.abspath(os.path.expanduser(os.path.normpath(conf.env['PREFIX'])))
- if Options.options.bundle:
- conf.env['BUNDLE'] = True
- conf.define('BUNDLE', 1)
- conf.env['BINDIR'] = conf.env['PREFIX']
- conf.env['INCLUDEDIR'] = os.path.join(conf.env['PREFIX'], 'Headers')
- conf.env['LIBDIR'] = os.path.join(conf.env['PREFIX'], 'Libraries')
- conf.env['DATADIR'] = os.path.join(conf.env['PREFIX'], 'Resources')
- conf.env['HTMLDIR'] = os.path.join(conf.env['PREFIX'], 'Resources/Documentation')
- conf.env['MANDIR'] = os.path.join(conf.env['PREFIX'], 'Resources/Man')
- conf.env['LV2DIR'] = os.path.join(conf.env['PREFIX'], 'PlugIns')
- else:
- conf.env['BUNDLE'] = False
- if Options.options.bindir:
- conf.env['BINDIR'] = Options.options.bindir
- else:
- conf.env['BINDIR'] = os.path.join(conf.env['PREFIX'], 'bin')
- if Options.options.includedir:
- conf.env['INCLUDEDIR'] = Options.options.includedir
- else:
- conf.env['INCLUDEDIR'] = os.path.join(conf.env['PREFIX'], 'include')
- if Options.options.libdir:
- conf.env['LIBDIR'] = Options.options.libdir
- else:
- conf.env['LIBDIR'] = os.path.join(conf.env['PREFIX'], 'lib')
- if Options.options.datadir:
- conf.env['DATADIR'] = Options.options.datadir
- else:
- conf.env['DATADIR'] = os.path.join(conf.env['PREFIX'], 'share')
- if Options.options.configdir:
- conf.env['CONFIGDIR'] = Options.options.configdir
- else:
- conf.env['CONFIGDIR'] = os.path.join(conf.env['PREFIX'], 'etc')
- if Options.options.htmldir:
- conf.env['HTMLDIR'] = Options.options.htmldir
- else:
- conf.env['HTMLDIR'] = os.path.join(conf.env['DATADIR'], 'doc', Utils.g_module.APPNAME)
- if Options.options.mandir:
- conf.env['MANDIR'] = Options.options.mandir
- else:
- conf.env['MANDIR'] = os.path.join(conf.env['DATADIR'], 'man')
- if Options.options.lv2dir:
- conf.env['LV2DIR'] = Options.options.lv2dir
- else:
- if Options.options.lv2_user:
- if sys.platform == "darwin":
- conf.env['LV2DIR'] = os.path.join(os.getenv('HOME'), 'Library/Audio/Plug-Ins/LV2')
- else:
- conf.env['LV2DIR'] = os.path.join(os.getenv('HOME'), '.lv2')
- else:
- if sys.platform == "darwin":
- conf.env['LV2DIR'] = '/Library/Audio/Plug-Ins/LV2'
- else:
- conf.env['LV2DIR'] = os.path.join(conf.env['LIBDIR'], 'lv2')
-
- conf.env['BINDIRNAME'] = os.path.basename(conf.env['BINDIR'])
- conf.env['LIBDIRNAME'] = os.path.basename(conf.env['LIBDIR'])
- conf.env['DATADIRNAME'] = os.path.basename(conf.env['DATADIR'])
- conf.env['CONFIGDIRNAME'] = os.path.basename(conf.env['CONFIGDIR'])
- conf.env['LV2DIRNAME'] = os.path.basename(conf.env['LV2DIR'])
-
- if Options.options.docs:
- doxygen = conf.find_program('doxygen')
- if not doxygen:
- conf.fatal("Doxygen is required to build documentation, configure without --docs")
-
- dot = conf.find_program('dot')
- if not dot:
- conf.fatal("Graphviz (dot) is required to build documentation, configure without --docs")
-
- if Options.options.debug:
- conf.env['CCFLAGS'] = [ '-O0', '-g' ]
- conf.env['CXXFLAGS'] = [ '-O0', '-g' ]
- else:
- append_cxx_flags('-DNDEBUG')
-
- if Options.options.strict:
- conf.env.append_value('CCFLAGS', [ '-std=c99', '-pedantic' ])
- conf.env.append_value('CXXFLAGS', [ '-ansi', '-Woverloaded-virtual', '-Wnon-virtual-dtor'])
- append_cxx_flags('-Wall -Wextra -Wno-unused-parameter')
-
- append_cxx_flags('-fPIC -DPIC -fshow-column')
-
- display_msg(conf, "Install prefix", conf.env['PREFIX'])
- display_msg(conf, "Debuggable build", str(conf.env['DEBUG']))
- display_msg(conf, "Strict compiler flags", str(conf.env['STRICT']))
- display_msg(conf, "Build documentation", str(conf.env['DOCS']))
- print
-
- g_step = 2
-
-def set_local_lib(conf, name, has_objects):
- conf.define('HAVE_' + nameify(name.upper()), 1)
- if has_objects:
- if type(conf.env['AUTOWAF_LOCAL_LIBS']) != dict:
- conf.env['AUTOWAF_LOCAL_LIBS'] = {}
- conf.env['AUTOWAF_LOCAL_LIBS'][name.lower()] = True
- else:
- if type(conf.env['AUTOWAF_LOCAL_HEADERS']) != dict:
- conf.env['AUTOWAF_LOCAL_HEADERS'] = {}
- conf.env['AUTOWAF_LOCAL_HEADERS'][name.lower()] = True
-
-def use_lib(bld, obj, libs):
- abssrcdir = os.path.abspath('.')
- libs_list = libs.split()
- for l in libs_list:
- in_headers = l.lower() in bld.env['AUTOWAF_LOCAL_HEADERS']
- in_libs = l.lower() in bld.env['AUTOWAF_LOCAL_LIBS']
- if in_libs:
- if hasattr(obj, 'uselib_local'):
- obj.uselib_local += ' lib' + l.lower() + ' '
- else:
- obj.uselib_local = 'lib' + l.lower() + ' '
-
- if in_headers or in_libs:
- inc_flag = '-iquote ' + os.path.join(abssrcdir, l.lower())
- for f in ['CCFLAGS', 'CXXFLAGS']:
- if not inc_flag in bld.env[f]:
- bld.env.append_value(f, inc_flag)
- else:
- if hasattr(obj, 'uselib'):
- obj.uselib += ' ' + l
- else:
- obj.uselib = l
-
-
-def display_header(title):
- Utils.pprint('BOLD', title)
-
-def display_msg(conf, msg, status = None, color = None):
- color = 'CYAN'
- if type(status) == bool and status or status == "True":
- color = 'GREEN'
- elif type(status) == bool and not status or status == "False":
- color = 'YELLOW'
- Utils.pprint('BOLD', "%s :" % msg.ljust(conf.line_just), sep='')
- Utils.pprint(color, status)
-
-def link_flags(env, lib):
- return ' '.join(map(lambda x: env['LIB_ST'] % x, env['LIB_' + lib]))
-
-def compile_flags(env, lib):
- return ' '.join(map(lambda x: env['CPPPATH_ST'] % x, env['CPPPATH_' + lib]))
-
-def set_recursive():
- global g_is_child
- g_is_child = True
-
-def is_child():
- global g_is_child
- return g_is_child
-
-# Pkg-config file
-def build_pc(bld, name, version, libs):
- '''Build a pkg-config file for a library.
- name -- uppercase variable name (e.g. 'SOMENAME')
- version -- version string (e.g. '1.2.3')
- libs -- string/list of dependencies (e.g. 'LIBFOO GLIB')
- '''
-
- obj = bld.new_task_gen('subst')
- obj.source = name.lower() + '.pc.in'
- obj.target = name.lower() + '.pc'
- obj.install_path = '${PREFIX}/${LIBDIRNAME}/pkgconfig'
- pkg_prefix = bld.env['PREFIX']
- if pkg_prefix[-1] == '/':
- pkg_prefix = pkg_prefix[:-1]
- obj.dict = {
- 'prefix' : pkg_prefix,
- 'exec_prefix' : '${prefix}',
- 'libdir' : '${prefix}/' + bld.env['LIBDIRNAME'],
- 'includedir' : '${prefix}/include',
- name + '_VERSION' : version,
- }
- if type(libs) != list:
- libs = libs.split()
- for i in libs:
- obj.dict[i + '_LIBS'] = link_flags(bld.env, i)
- obj.dict[i + '_CFLAGS'] = compile_flags(bld.env, i)
-
-# Doxygen API documentation
-def build_dox(bld, name, version, srcdir, blddir):
- if not bld.env['DOCS']:
- return
- obj = bld.new_task_gen('subst')
- obj.source = 'doc/reference.doxygen.in'
- obj.target = 'doc/reference.doxygen'
- if is_child():
- src_dir = os.path.join(srcdir, name.lower())
- doc_dir = os.path.join(blddir, 'default', name.lower(), 'doc')
- else:
- src_dir = srcdir
- doc_dir = os.path.join(blddir, 'default', 'doc')
- obj.dict = {
- name + '_VERSION' : version,
- name + '_SRCDIR' : os.path.abspath(src_dir),
- name + '_DOC_DIR' : os.path.abspath(doc_dir)
- }
- obj.install_path = ''
- out1 = bld.new_task_gen('command-output')
- out1.dependencies = [obj]
- out1.stdout = '/doc/doxygen.out'
- out1.stdin = '/doc/reference.doxygen' # whatever..
- out1.command = 'doxygen'
- out1.argv = [os.path.abspath(doc_dir) + '/reference.doxygen']
- out1.command_is_external = True
-
-# Version code file generation
-def build_version_files(header_path, source_path, domain, major, minor, micro):
- header_path = os.path.abspath(header_path)
- source_path = os.path.abspath(source_path)
- text = "int " + domain + "_major_version = " + str(major) + ";\n"
- text += "int " + domain + "_minor_version = " + str(minor) + ";\n"
- text += "int " + domain + "_micro_version = " + str(micro) + ";\n"
- try:
- o = file(source_path, 'w')
- o.write(text)
- o.close()
- except IOError:
- print "Could not open", source_path, " for writing\n"
- sys.exit(-1)
-
- text = "#ifndef __" + domain + "_version_h__\n"
- text += "#define __" + domain + "_version_h__\n"
- text += "extern const char* " + domain + "_revision;\n"
- text += "extern int " + domain + "_major_version;\n"
- text += "extern int " + domain + "_minor_version;\n"
- text += "extern int " + domain + "_micro_version;\n"
- text += "#endif /* __" + domain + "_version_h__ */\n"
- try:
- o = file(header_path, 'w')
- o.write(text)
- o.close()
- except IOError:
- print "Could not open", header_path, " for writing\n"
- sys.exit(-1)
-
- return None
-
-def run_tests(ctx, appname, tests):
- orig_dir = os.path.abspath(os.curdir)
- failures = 0
- base = '..'
-
- top_level = os.path.abspath(ctx.curdir) != os.path.abspath(os.curdir)
- if top_level:
- os.chdir('./build/default/' + appname)
- base = '../..'
- else:
- os.chdir('./build/default')
-
- lcov = True
- lcov_log = open('lcov.log', 'w')
- try:
- # Clear coverage data
- subprocess.call('lcov -d ./src -z'.split(),
- stdout=lcov_log, stderr=lcov_log)
- except:
- lcov = False
- print "Failed to run lcov, no coverage report will be generated"
-
-
- # Run all tests
- for i in tests:
- print
- Utils.pprint('BOLD', 'Running %s test %s' % (appname, i))
- if subprocess.call(i) == 0:
- Utils.pprint('GREEN', 'Passed %s %s' % (appname, i))
- else:
- failures += 1
- Utils.pprint('RED', 'Failed %s %s' % (appname, i))
-
- if lcov:
- # Generate coverage data
- coverage_lcov = open('coverage.lcov', 'w')
- subprocess.call(('lcov -c -d ./src -d ./test -b ' + base).split(),
- stdout=coverage_lcov, stderr=lcov_log)
- coverage_lcov.close()
-
- # Strip out unwanted stuff
- coverage_stripped_lcov = open('coverage-stripped.lcov', 'w')
- subprocess.call('lcov --remove coverage.lcov *boost* c++*'.split(),
- stdout=coverage_stripped_lcov, stderr=lcov_log)
- coverage_stripped_lcov.close()
-
- # Generate HTML coverage output
- if not os.path.isdir('./coverage'):
- os.makedirs('./coverage')
- subprocess.call('genhtml -o coverage coverage-stripped.lcov'.split(),
- stdout=lcov_log, stderr=lcov_log)
-
- lcov_log.close()
-
- print
- Utils.pprint('BOLD', 'Summary:', sep=''),
- if failures == 0:
- Utils.pprint('GREEN', 'All ' + appname + ' tests passed')
- else:
- Utils.pprint('RED', str(failures) + ' ' + appname + ' test(s) failed')
-
- Utils.pprint('BOLD', 'Coverage:', sep='')
- print os.path.abspath('coverage/index.html')
-
- os.chdir(orig_dir)
-
-def shutdown():
- # This isn't really correct (for packaging), but people asking is annoying
- if Options.commands['install']:
- try: os.popen("/sbin/ldconfig")
- except: pass
-
diff --git a/libs/audiographer/wscript b/libs/audiographer/wscript
index 31103b3095..1c651e834a 100644
--- a/libs/audiographer/wscript
+++ b/libs/audiographer/wscript
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-import autowaf
+from waflib.extras import autowaf as autowaf
import os
# Version of this package (even if built as a child)
@@ -19,10 +19,10 @@ APPNAME = 'audiographer'
VERSION = AUDIOGRAPHER_VERSION
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
@@ -39,8 +39,8 @@ def configure(conf):
autowaf.check_pkg(conf, 'sndfile', uselib_store='SNDFILE', atleast_version='1.0.18', mandatory=False)
# Boost headers
- autowaf.check_header(conf, 'boost/shared_ptr.hpp')
- autowaf.check_header(conf, 'boost/format.hpp')
+ autowaf.check_header(conf, 'cxx', 'boost/shared_ptr.hpp')
+ autowaf.check_header(conf, 'cxx', 'boost/format.hpp')
def build(bld):
@@ -53,7 +53,7 @@ def build(bld):
#bld.env['BUILD_TESTS'] = True
bld.env['HAVE_ALL_GTHREAD'] = bld.env['HAVE_GLIB'] and bld.env['HAVE_GLIBMM'] and bld.env['HAVE_GTHREAD']
- audiographer = bld.new_task_gen('cxx', 'shlib')
+ audiographer = bld(features = 'cxx cxxshlib')
audiographer.source = '''
private/gdither/gdither.cc
src/general/sample_format_converter.cc
@@ -69,17 +69,17 @@ def build(bld):
audiographer.name = 'libaudiographer'
audiographer.target = 'audiographer'
- audiographer.export_incdirs = ['.', './src']
+ audiographer.export_includes = ['.', './src']
audiographer.includes = ['.', './src']
audiographer.uselib = 'GLIB GLIBMM GTHREAD SAMPLERATE SNDFILE'
- audiographer.uselib_local = 'libpbd'
+ audiographer.use = 'libpbd'
audiographer.vnum = AUDIOGRAPHER_LIB_VERSION
audiographer.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
if bld.env['BUILD_TESTS'] and bld.env['HAVE_CPPUNIT']:
# Unit tests
- obj = bld.new_task_gen('cxx', 'program')
+ obj = bld(features = 'cxx cxxprogram')
obj.source = '''
tests/test_runner.cc
tests/type_utils_test.cc
@@ -109,7 +109,7 @@ def build(bld):
tests/general/sr_converter_test.cc
'''
- obj.uselib_local = 'libaudiographer'
+ obj.use = 'libaudiographer'
obj.uselib = 'CPPUNIT GLIBMM'
obj.target = 'run-tests'
obj.install_path = ''
diff --git a/libs/clearlooks-newer/wscript b/libs/clearlooks-newer/wscript
index b3ba10c5e2..d446275d49 100644
--- a/libs/clearlooks-newer/wscript
+++ b/libs/clearlooks-newer/wscript
@@ -1,14 +1,14 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import os
import sys
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
path_prefix = 'libs/clearlooks-newer'
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
@@ -16,7 +16,7 @@ def configure(conf):
conf.check_tool('compiler_cc')
def build(bld):
- obj = bld.new_task_gen('cc', 'shlib')
+ obj = bld(features = 'c cshlib')
obj.source = '''
animation.c
cairo-support.c
@@ -40,7 +40,7 @@ def build(bld):
if sys.platform == 'darwin':
# Bit of a hack: make a symlink to the .dylib that meets GTK's criteria for finding it (namely that the library must be a *.so
# and that it must reside in a directory called `engines')
- obj = bld.new_task_gen(target = 'engines', rule = 'mkdir -p ${TGT} && rm -f ${TGT}/libclearlooks.so && ln -s ../libclearlooks.dylib ${TGT}/libclearlooks.so')
+ obj = bld(target = 'engines', rule = 'mkdir -p ${TGT} && rm -f ${TGT}/libclearlooks.so && ln -s ../libclearlooks.dylib ${TGT}/libclearlooks.so')
def shutdown():
diff --git a/libs/evoral/wscript b/libs/evoral/wscript
index e1b729c826..24a5f4dd1f 100644
--- a/libs/evoral/wscript
+++ b/libs/evoral/wscript
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import Options
import os
@@ -19,10 +19,10 @@ APPNAME = 'evoral'
VERSION = EVORAL_VERSION
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
opt.add_option('--test', action='store_true', default=False, dest='build_tests',
help="Build unit tests")
@@ -38,8 +38,8 @@ def configure(conf):
autowaf.check_pkg(conf, 'gthread-2.0', uselib_store='GTHREAD', atleast_version='2.14.0')
# Boost headers
- autowaf.check_header(conf, 'boost/shared_ptr.hpp')
- autowaf.check_header(conf, 'boost/weak_ptr.hpp')
+ autowaf.check_header(conf, 'cxx', 'boost/shared_ptr.hpp')
+ autowaf.check_header(conf, 'cxx', 'boost/weak_ptr.hpp')
conf.env['BUILD_TESTS'] = Options.options.build_tests
@@ -54,7 +54,7 @@ def build(bld):
# Pkgconfig file
#autowaf.build_pc(bld, 'EVORAL', EVORAL_VERSION, 'GLIBMM GTHREAD')
- libsmf = bld.new_task_gen('cc', 'shlib')
+ libsmf = bld(features = 'c cshlib')
libsmf.source = '''
src/libsmf/smf.c
src/libsmf/smf_decode.c
@@ -62,7 +62,7 @@ def build(bld):
src/libsmf/smf_save.c
src/libsmf/smf_tempo.c
'''
- libsmf.export_incdirs = ['./src/libsmf']
+ libsmf.export_includes = ['./src/libsmf']
libsmf.defines = 'SMF_VERSION="1.2"'
libsmf.includes = ['./src']
libsmf.name = 'libsmf'
@@ -85,50 +85,50 @@ def build(bld):
'''
# Library
- obj = bld.new_task_gen('cxx', 'shlib')
+ obj = bld(features = 'cxx cxxshlib')
obj.source = lib_source
- obj.export_incdirs = ['.']
+ obj.export_includes = ['.']
obj.includes = ['.', './src']
obj.name = 'libevoral'
obj.target = 'evoral'
obj.uselib = 'GLIBMM GTHREAD SMF'
- obj.uselib_local = 'libsmf libpbd'
+ obj.use = 'libsmf libpbd'
obj.vnum = EVORAL_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
obj.defines = ['PACKAGE="libevoral"' ]
if bld.env['BUILD_TESTS'] and bld.env['HAVE_CPPUNIT']:
# Static library (for unit test code coverage)
- obj = bld.new_task_gen('cxx', 'staticlib')
+ obj = bld(features = 'cxx cstlib')
obj.source = lib_source
obj.source = lib_source
- obj.export_incdirs = ['.']
+ obj.export_includes = ['.']
obj.includes = ['.', './src']
obj.name = 'libevoral_static'
obj.target = 'evoral_static'
obj.uselib = 'GLIBMM GTHREAD SMF'
- obj.uselib_local = 'libsmf libpbd'
+ obj.use = 'libsmf libpbd'
obj.vnum = EVORAL_LIB_VERSION
obj.install_path = ''
- obj.ccflags = [ '-fprofile-arcs', '-ftest-coverage' ]
+ obj.cflags = [ '-fprofile-arcs', '-ftest-coverage' ]
obj.cxxflags = [ '-fprofile-arcs', '-ftest-coverage' ]
obj.defines = ['PACKAGE="libevoral"' ]
# Unit tests
- obj = bld.new_task_gen('cxx', 'program')
+ obj = bld(features = 'cxx cxxprogram')
obj.source = '''
test/SequenceTest.cpp
test/SMFTest.cpp
test/testrunner.cpp
'''
obj.includes = ['.', './src']
- obj.uselib_local = 'libevoral_static'
+ obj.use = 'libevoral_static'
obj.uselib = 'CPPUNIT SNDFILE'
obj.libs = 'gcov'
obj.target = 'run-tests'
obj.name = 'libevoral-tests'
obj.install_path = ''
- obj.ccflags = [ '-fprofile-arcs', '-ftest-coverage' ]
+ obj.cflags = [ '-fprofile-arcs', '-ftest-coverage' ]
obj.cxxflags = [ '-fprofile-arcs', '-ftest-coverage' ]
def shutdown():
diff --git a/libs/gnomecanvas/wscript b/libs/gnomecanvas/wscript
index e3085065dc..64ade4a189 100644
--- a/libs/gnomecanvas/wscript
+++ b/libs/gnomecanvas/wscript
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import os
# Version of this package (even if built as a child)
@@ -19,8 +19,8 @@ APPNAME = 'libgnomecanvas'
VERSION = LIBGNOMECANVAS_VERSION
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
path_prefix = 'libs/gnomecanvas/'
@@ -41,7 +41,7 @@ libgnomecanvas_sources = [
'libgnomecanvas/libgnomecanvastypes.c'
]
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
@@ -52,9 +52,9 @@ def configure(conf):
def build(bld):
# Library
- obj = bld.new_task_gen('cc', 'shlib')
+ obj = bld(features = 'c cshlib')
obj.source = libgnomecanvas_sources
- obj.export_incdirs = ['.']
+ obj.export_includes = ['.']
obj.includes = ['.']
obj.name = 'libgnomecanvas-2'
obj.target = 'gnomecanvas-2'
diff --git a/libs/gtkmm2ext/wscript b/libs/gtkmm2ext/wscript
index fa5dea50e0..3103ebd9b8 100644
--- a/libs/gtkmm2ext/wscript
+++ b/libs/gtkmm2ext/wscript
@@ -1,7 +1,6 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import os
-import glob
# Version of this package (even if built as a child)
MAJOR = '0'
@@ -60,12 +59,12 @@ gtkmm2ext_sources = [
]
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
path_prefix = 'libs/gtkmm2ext/'
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
@@ -78,20 +77,20 @@ def configure(conf):
def build(bld):
- obj = bld.new_task_gen(features = 'cc cxx cshlib')
+ obj = bld(features = 'c cxx cxxshlib cshlib')
obj.source = gtkmm2ext_sources
- obj.export_incdirs = ['.']
+ obj.export_includes = ['.']
obj.includes = ['.']
obj.name = 'libgtkmm2ext'
obj.target = 'gtkmm2ext'
obj.uselib = 'GTKMM GTK GTKOSX OSX GDK'
- obj.uselib_local = 'libpbd'
+ obj.use = 'libpbd'
obj.vnum = GTKMM2EXT_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
obj.cxxflags = [
'-DPACKAGE="libgtkmm2ext"',
'-DLOCALEDIR="' + os.path.join(
- os.path.normpath(bld.env['DATADIRNAME']), 'locale') + '"']
+ os.path.normpath(bld.env['DATADIR']), 'locale') + '"']
if bld.env['GTKOSX']:
obj.source += ['gtkapplication_quartz.mm']
else:
@@ -99,7 +98,7 @@ def build(bld):
# i18n
if bld.env['ENABLE_NLS']:
- mo_files = glob.glob (os.path.join (bld.get_curdir(), 'po/*.mo'))
+ mo_files = bld.path.ant_glob ('po/*.mo')
for mo in mo_files:
lang = os.path.basename (mo).replace ('.mo', '')
bld.install_as (os.path.join(bld.env['PREFIX'], 'share', 'locale',
diff --git a/libs/midi++2/wscript b/libs/midi++2/wscript
index f236d0a8cd..e4dbf1eab6 100644
--- a/libs/midi++2/wscript
+++ b/libs/midi++2/wscript
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import os
import sys
@@ -20,12 +20,12 @@ APPNAME = 'libmidipp'
VERSION = LIBMIDIPP_VERSION
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
path_prefix = 'libs/midi++2/'
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
@@ -38,12 +38,12 @@ def configure(conf):
autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0')
# Boost headers
- autowaf.check_header(conf, 'boost/shared_ptr.hpp')
- autowaf.check_header(conf, 'boost/weak_ptr.hpp')
+ autowaf.check_header(conf, 'cxx', 'boost/shared_ptr.hpp')
+ autowaf.check_header(conf, 'cxx', 'boost/weak_ptr.hpp')
def build(bld):
# Library
- obj = bld.new_task_gen('cxx', 'shlib')
+ obj = bld(features = 'cxx cxxshlib')
obj.source = '''
midi.cc
channel.cc
@@ -57,12 +57,12 @@ def build(bld):
'''
# everybody loves JACK
obj.cxxflags = [ '-DWITH_JACK_MIDI' ]
- obj.export_incdirs = ['.']
+ obj.export_includes = ['.']
obj.includes = ['.', '../surfaces/control_protocol']
obj.name = 'libmidipp'
obj.target = 'midipp'
obj.uselib = 'GLIBMM SIGCPP XML JACK OSX'
- obj.uselib_local = 'libpbd libevoral libtimecode'
+ obj.use = 'libpbd libevoral libtimecode'
obj.vnum = LIBMIDIPP_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
diff --git a/libs/panners/1in2out/wscript b/libs/panners/1in2out/wscript
index 2238124dc7..70c34d0779 100644
--- a/libs/panners/1in2out/wscript
+++ b/libs/panners/1in2out/wscript
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import os
# Library version (UNIX style major, minor, micro)
@@ -9,24 +9,24 @@ import os
LIBARDOUR_PAN1IN2OUT_LIB_VERSION = '1.0.0'
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
autowaf.configure(conf)
def build(bld):
- obj = bld.new_task_gen('cxx', 'shlib')
+ obj = bld(features = 'cxx cxxshlib')
obj.source = [ 'panner_1in2out.cc' ]
- obj.export_incdirs = ['.']
+ obj.export_includes = ['.']
obj.cxxflags = '-DPACKAGE="libardour_pan1in2out"'
obj.includes = ['.']
obj.name = 'libardour_pan1in2out'
obj.target = 'pan1in2out'
- obj.uselib_local = 'libardour libardour_cp libpbd'
+ obj.use = 'libardour libardour_cp libpbd'
obj.vnum = LIBARDOUR_PAN1IN2OUT_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3', 'panners')
diff --git a/libs/panners/2in2out/wscript b/libs/panners/2in2out/wscript
index 2891dfd6f7..8288ef28f7 100644
--- a/libs/panners/2in2out/wscript
+++ b/libs/panners/2in2out/wscript
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import os
# Library version (UNIX style major, minor, micro)
@@ -9,24 +9,24 @@ import os
LIBARDOUR_PAN2IN2OUT_LIB_VERSION = '1.0.0'
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
autowaf.configure(conf)
def build(bld):
- obj = bld.new_task_gen('cxx', 'shlib')
+ obj = bld(features = 'cxx cxxshlib')
obj.source = [ 'panner_2in2out.cc' ]
- obj.export_incdirs = ['.']
+ obj.export_includes = ['.']
obj.cxxflags = '-DPACKAGE="libardour_pan2in2out"'
obj.includes = ['.']
obj.name = 'libardour_pan2in2out'
obj.target = 'pan2in2out'
- obj.uselib_local = 'libardour libardour_cp libpbd'
+ obj.use = 'libardour libardour_cp libpbd'
obj.vnum = LIBARDOUR_PAN2IN2OUT_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3', 'panners')
diff --git a/libs/panners/vbap/wscript b/libs/panners/vbap/wscript
index bd311272b5..c6ba94261f 100644
--- a/libs/panners/vbap/wscript
+++ b/libs/panners/vbap/wscript
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import os
# Library version (UNIX style major, minor, micro)
@@ -9,24 +9,24 @@ import os
LIBARDOUR_PANVBAP_LIB_VERSION = '1.0.0'
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
autowaf.configure(conf)
def build(bld):
- obj = bld.new_task_gen('cxx', 'shlib')
+ obj = bld(features = 'cxx cxxshlib')
obj.source = [ 'vbap_speakers.cc', 'vbap.cc' ]
- obj.export_incdirs = ['.']
+ obj.export_includes = ['.']
obj.cxxflags = '-DPACKAGE="libardour_panvbap"'
obj.includes = ['.']
obj.name = 'libardour_panvbap'
obj.target = 'panvbap'
- obj.uselib_local = 'libardour libardour_cp libpbd'
+ obj.use = 'libardour libardour_cp libpbd'
obj.vnum = LIBARDOUR_PANVBAP_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3', 'panners')
diff --git a/libs/panners/wscript b/libs/panners/wscript
index 3c1a013732..76f14e6fa1 100644
--- a/libs/panners/wscript
+++ b/libs/panners/wscript
@@ -1,14 +1,14 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import os
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
panners = [ '2in2out', '1in2out', 'vbap' ]
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def sub_config_and_use(conf, name, has_objects = True):
diff --git a/libs/pbd/wscript b/libs/pbd/wscript
index 66b63c999e..c2be9849a9 100644
--- a/libs/pbd/wscript
+++ b/libs/pbd/wscript
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import os
import sys
import TaskGen
@@ -21,12 +21,12 @@ APPNAME = 'libpbd'
VERSION = LIBPBD_VERSION
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
path_prefix = 'libs/pbd/'
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
@@ -42,19 +42,19 @@ def configure(conf):
conf.check(function_name='getmntent', header_name='mntent.h', define_name='HAVE_GETMNTENT')
conf.check(header_name='execinfo.h', define_name='HAVE_EXECINFO')
conf.check(header_name='unistd.h', define_name='HAVE_UNISTD')
- if conf.check_cc(function_name='posix_memalign', header_name='stdlib.h', ccflags='-D_XOPEN_SOURCE=600') == False:
+ if conf.check_cc(function_name='posix_memalign', header_name='stdlib.h', cflags='-D_XOPEN_SOURCE=600') == False:
conf.define ('NO_POSIX_MEMALIGN',1)
- conf.write_config_header('libpbd-config.h')
+ conf.write_config_header('libpbd-config.h', remove=False)
# Boost headers
- autowaf.check_header(conf, 'boost/shared_ptr.hpp')
- autowaf.check_header(conf, 'boost/weak_ptr.hpp')
- # autowaf.check_header(conf, 'boost/uuid/uuid.hpp')
+ autowaf.check_header(conf, 'cxx', 'boost/shared_ptr.hpp')
+ autowaf.check_header(conf, 'cxx', 'boost/weak_ptr.hpp')
+ # autowaf.check_header(conf, 'cxx', 'boost/uuid/uuid.hpp')
def build(bld):
# Library
- obj = bld.new_task_gen('cxx', 'shlib')
+ obj = bld(features = 'cxx cxxshlib')
obj.source = '''
basename.cc
base_ui.cc
@@ -111,7 +111,7 @@ def build(bld):
if bld.env['DEBUG_RT_ALLOC']:
obj.source += 'debug_rt_alloc.c'
- obj.export_incdirs = ['.']
+ obj.export_includes = ['.']
obj.includes = ['.']
obj.name = 'libpbd'
obj.target = 'pbd'
@@ -129,7 +129,7 @@ def build(bld):
if bld.env['BUILD_TESTS'] and bld.env['HAVE_CPPUNIT']:
# Unit tests
- testobj = bld.new_task_gen('cxx', 'program')
+ testobj = bld(features = 'cxx cxxprogram')
testobj.source = '''
test/testrunner.cc
test/xpath.cc
@@ -139,7 +139,7 @@ def build(bld):
testobj.target = 'run-tests'
testobj.includes = obj.includes + ['test', '../pbd']
testobj.uselib = 'CPPUNIT XML SNDFILE'
- testobj.uselib_local = 'libpbd'
+ testobj.use = 'libpbd'
def shutdown():
diff --git a/libs/qm-dsp/wscript b/libs/qm-dsp/wscript
index a77822abac..db759c69db 100644
--- a/libs/qm-dsp/wscript
+++ b/libs/qm-dsp/wscript
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import os
# Version of this package (even if built as a child)
@@ -16,10 +16,10 @@ APPNAME = 'qm-dsp'
VERSION = QM_DSP_VERSION
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
@@ -28,7 +28,7 @@ def configure(conf):
def build(bld):
# Host Library
- obj = bld.new_task_gen('cxx', 'shlib')
+ obj = bld(features = 'cxx cxxshlib')
obj.source = '''
dsp/onsets/DetectionFunction.cpp
dsp/onsets/PeakPicking.cpp
@@ -47,7 +47,7 @@ def build(bld):
maths/MathUtilities.cpp
base/Pitch.cpp
'''
- obj.export_incdirs = ['.']
+ obj.export_includes = ['.']
obj.includes = ['.']
obj.name = 'libqmdsp'
obj.target = 'qmdsp'
diff --git a/libs/rubberband/wscript b/libs/rubberband/wscript
index 011a858aca..15fb9b2ade 100644
--- a/libs/rubberband/wscript
+++ b/libs/rubberband/wscript
@@ -1,7 +1,7 @@
#!/usr/bin/env python
-import autowaf
-import glob
+from waflib.extras import autowaf as autowaf
import os
+import glob
# Version of this package (even if built as a child)
LIBRUBBERBAND_VERSION = '0.0.0'
@@ -17,10 +17,10 @@ APPNAME = 'librubberband'
VERSION = LIBRUBBERBAND_VERSION
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
@@ -29,18 +29,18 @@ def configure(conf):
def build(bld):
# Library
- obj = bld.new_task_gen('cxx', 'shlib')
+ obj = bld(features = 'cxx cxxshlib')
prefix = 'libs/rubberband/'
sources = glob.glob(prefix + 'src/*.cpp')
obj.source = [ ]
for i in sources:
obj.source += [ i.replace(prefix, '') ]
- obj.export_incdirs = ['.']
+ obj.export_includes = ['.']
obj.includes = ['.', 'rubberband']
obj.name = 'librubberband'
obj.target = 'rubberband'
obj.uselib = 'FFTW3 FFTW3F SAMPLERATE SNDFILE'
- obj.uselib_local = 'libvamphost'
+ obj.use = 'libvamphost'
obj.vnum = LIBRUBBERBAND_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
obj.cxxflags = '-DPACKAGE="librubberband"'
diff --git a/libs/surfaces/control_protocol/wscript b/libs/surfaces/control_protocol/wscript
index a4afd68539..8c083ba9ec 100644
--- a/libs/surfaces/control_protocol/wscript
+++ b/libs/surfaces/control_protocol/wscript
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import os
# Library version (UNIX style major, minor, micro)
@@ -10,27 +10,27 @@ APPNAME = 'libardour_cp'
LIBARDOUR_CP_LIB_VERSION = '4.1.0'
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
autowaf.configure(conf)
def build(bld):
- obj = bld.new_task_gen('cxx', 'shlib')
+ obj = bld(features = 'cxx cxxshlib')
obj.source = '''
basic_ui.cc
control_protocol.cc
'''
- obj.export_incdirs = ['.', './control_protocol' ]
+ obj.export_includes = ['.', './control_protocol' ]
obj.cxxflags = '-DPACKAGE="ardour_cp"'
obj.includes = ['.', './control_protocol']
obj.name = 'libardour_cp'
obj.target = 'ardourcp'
- obj.uselib_local = 'libardour libtimecode'
+ obj.use = 'libardour libtimecode'
obj.vnum = LIBARDOUR_CP_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
diff --git a/libs/surfaces/frontier/wscript b/libs/surfaces/frontier/wscript
index cd388b8bff..c23b3cf3c9 100644
--- a/libs/surfaces/frontier/wscript
+++ b/libs/surfaces/frontier/wscript
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import os
# Version of this package (even if built as a child)
@@ -16,10 +16,10 @@ APPNAME = 'libsurfaces'
VERSION = LIBSURFACES_VERSION
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
@@ -27,18 +27,18 @@ def configure(conf):
def build(bld):
# Generic MIDI
- obj = bld.new_task_gen('cxx', 'shlib')
+ obj = bld(features = 'cxx cxxshlib')
obj.source = '''
generic_midi_control_protocol.cc
interface.cc
midicontrollable.cc
'''
- obj.export_incdirs = ['./generic_midi']
+ obj.export_includes = ['./generic_midi']
obj.cxxflags = '-DPACKAGE="ardour_genericmidi"'
obj.includes = ['.', './generic_midi']
obj.name = 'libgeneric_midi'
obj.target = 'generic_midi'
- obj.uselib_local = 'libardour libsurfaces'
+ obj.use = 'libardour libsurfaces'
obj.vnum = LIBSURFACES_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3', 'surfaces')
diff --git a/libs/surfaces/generic_midi/wscript b/libs/surfaces/generic_midi/wscript
index 9111df5982..6daf413b66 100644
--- a/libs/surfaces/generic_midi/wscript
+++ b/libs/surfaces/generic_midi/wscript
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import os
# Library version (UNIX style major, minor, micro)
@@ -9,17 +9,17 @@ import os
LIBARDOUR_GENERIC_MIDI_LIB_VERSION = '4.1.0'
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
autowaf.configure(conf)
def build(bld):
- obj = bld.new_task_gen('cxx', 'shlib')
+ obj = bld(features = 'cxx cxxshlib')
obj.source = '''
generic_midi_control_protocol.cc
gmcp_gui.cc
@@ -29,13 +29,13 @@ def build(bld):
midifunction.cc
midiaction.cc
'''
- obj.export_incdirs = ['.']
+ obj.export_includes = ['.']
obj.cxxflags = '-DPACKAGE="ardour_genericmidi"'
obj.includes = ['.', './generic_midi']
obj.name = 'libardour_generic_midi'
obj.target = 'ardour_generic_midi'
obj.uselib = 'GTKMM GTK GDK'
- obj.uselib_local = 'libardour libardour_cp libgtkmm2ext libpbd'
+ obj.use = 'libardour libardour_cp libgtkmm2ext libpbd'
obj.vnum = LIBARDOUR_GENERIC_MIDI_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3', 'surfaces')
diff --git a/libs/surfaces/mackie/wscript b/libs/surfaces/mackie/wscript
index f091acb148..ba8b8e5b4b 100644
--- a/libs/surfaces/mackie/wscript
+++ b/libs/surfaces/mackie/wscript
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import os
# Library version (UNIX style major, minor, micro)
@@ -9,17 +9,17 @@ import os
LIBARDOUR_MCP_LIB_VERSION = '4.1.0'
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
autowaf.configure(conf)
def build(bld):
- obj = bld.new_task_gen('cxx', 'shlib')
+ obj = bld(features = 'cxx cxxshlib')
obj.source = '''
bcf_surface.cc
bcf_surface_generated.cc
@@ -41,13 +41,13 @@ def build(bld):
surface_port.cc
types.cc
'''
- obj.export_incdirs = ['./mackie']
+ obj.export_includes = ['./mackie']
obj.cxxflags = '-DPACKAGE="ardour_mackie"'
obj.includes = ['.', './mackie']
obj.name = 'libardour_mcp'
obj.target = 'ardour_mcp'
obj.uselib = 'GTKMM'
- obj.uselib_local = 'libardour libardour_cp libgtkmm2ext'
+ obj.use = 'libardour libardour_cp libgtkmm2ext'
obj.vnum = LIBARDOUR_MCP_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3', 'surfaces')
diff --git a/libs/surfaces/osc/wscript b/libs/surfaces/osc/wscript
index 4d62bda7bc..1ab9bf42a7 100644
--- a/libs/surfaces/osc/wscript
+++ b/libs/surfaces/osc/wscript
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import os
# Library version (UNIX style major, minor, micro)
@@ -9,10 +9,10 @@ import os
LIBARDOUR_OSC_LIB_VERSION = '4.1.0'
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
@@ -20,20 +20,20 @@ def configure(conf):
autowaf.check_pkg(conf, 'liblo', uselib_store='LO', linkflags='-llo')
def build(bld):
- obj = bld.new_task_gen('cxx', 'shlib')
+ obj = bld(features = 'cxx cxxshlib')
obj.source = '''
osc.cc
osc_controllable.cc
osc_route_observer.cc
interface.cc
'''
- obj.export_incdirs = ['.']
+ obj.export_includes = ['.']
obj.cxxflags = '-DPACKAGE="ardour_cp"'
obj.includes = ['.', './osc']
obj.name = 'libardour_osc'
obj.target = 'ardour_osc'
obj.uselib = ' LO '
- obj.uselib_local = 'libardour libardour_cp libpbd'
+ obj.use = 'libardour libardour_cp libpbd'
obj.vnum = LIBARDOUR_OSC_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3', 'surfaces')
diff --git a/libs/surfaces/powermate/wscript b/libs/surfaces/powermate/wscript
index 6f263fc9a0..fb97607169 100644
--- a/libs/surfaces/powermate/wscript
+++ b/libs/surfaces/powermate/wscript
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import os
# Library version (UNIX style major, minor, micro)
@@ -9,27 +9,27 @@ import os
LIBARDOUR_POWERMATE_LIB_VERSION = '4.1.0'
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
autowaf.configure(conf)
def build(bld):
- obj = bld.new_task_gen('cxx', 'shlib')
+ obj = bld(features = 'cxx cxxshlib')
obj.source = '''
interface.cc
powermate.cc
'''
- obj.export_incdirs = ['.']
+ obj.export_includes = ['.']
obj.cxxflags = '-DPACKAGE="ardour_powermate"'
obj.includes = ['.' ]
obj.name = 'libpowermate'
obj.target = 'powermate'
- obj.uselib_local = 'libardour libardour_cp'
+ obj.use = 'libardour libardour_cp'
obj.vnum = LIBARDOUR_POWERMATE_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3', 'surfaces')
diff --git a/libs/surfaces/tranzport/wscript b/libs/surfaces/tranzport/wscript
index 7a7d5d2a05..311a9a2045 100644
--- a/libs/surfaces/tranzport/wscript
+++ b/libs/surfaces/tranzport/wscript
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import os
# Library version (UNIX style major, minor, micro)
@@ -9,17 +9,17 @@ import os
LIBARDOUR_TRANZPORT_LIB_VERSION = '4.1.0'
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
autowaf.configure(conf)
def build(bld):
- obj = bld.new_task_gen('cxx', 'shlib')
+ obj = bld(features = 'cxx cxxshlib')
obj.source = '''
button_events.cc
buttons.cc
@@ -38,12 +38,12 @@ def build(bld):
wheel.cc
wheel_modes.cc
'''
- obj.export_incdirs = ['./tranzport']
+ obj.export_includes = ['./tranzport']
obj.cxxflags = '-DPACKAGE="ardour_tranzport"'
obj.includes = ['.', './tranzport']
obj.name = 'libardour_tranzport'
obj.target = 'ardour_tranzport'
- obj.uselib_local = 'libardour libardour_cp'
+ obj.use = 'libardour libardour_cp'
obj.vnum = LIBARDOUR_TRANZPORT_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3', 'surfaces')
diff --git a/libs/surfaces/wiimote/wscript b/libs/surfaces/wiimote/wscript
index 3c4650ca9b..3fbea7e248 100644
--- a/libs/surfaces/wiimote/wscript
+++ b/libs/surfaces/wiimote/wscript
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import os
# Library version (UNIX style major, minor, micro)
@@ -9,27 +9,27 @@ import os
LIBARDOUR_WIIMOTE_LIB_VERSION = '4.1.0'
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
autowaf.configure(conf)
def build(bld):
- obj = bld.new_task_gen('cxx', 'shlib')
+ obj = bld(features = 'cxx cxxshlib')
obj.source = '''
wiimote.cc
interface.cc
'''
- obj.export_incdirs = ['./wiimote']
+ obj.export_includes = ['./wiimote']
obj.cxxflags = '-DPACKAGE="ardour_wiimote"'
obj.includes = ['.', './wiimote']
obj.name = 'libwiimote'
obj.target = 'wiimote'
- obj.uselib_local = 'libardour libardour_cp'
+ obj.use = 'libardour libardour_cp'
obj.vnum = LIBARDOUR_WIIMOTE_LIB_VERSION
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3', 'surfaces')
diff --git a/libs/surfaces/wscript b/libs/surfaces/wscript
index 1b9d5c7091..9f5c4749e7 100644
--- a/libs/surfaces/wscript
+++ b/libs/surfaces/wscript
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import Options
# Version of this package (even if built as a child)
@@ -16,8 +16,8 @@ APPNAME = 'libsurfaces'
VERSION = LIBSURFACES_VERSION
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
children = [
'control_protocol',
@@ -30,7 +30,7 @@ children = [
'wiimote'
]
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def sub_config_and_use(conf, name, has_objects = True):
@@ -44,7 +44,11 @@ def configure(conf):
for i in children:
sub_config_and_use(conf, i)
- conf.check_cc (lib='libusb', header_name='libusb.h', function_name='usb_interrupt_write', define_name='BUILD_TRANZPORT')
+ autowaf.check_pkg(conf, 'libusb-1.0', uselib_store='USB', mandatory=False)
+ if conf.env['HAVE_USB']:
+ conf.define('BUILD_TRANZPORT', 1)
+
+ #conf.check_cc (lib='libusb', header_name='libusb.h', function_name='usb_interrupt_write', define_name='BUILD_TRANZPORT')
conf.check_cc (header_name='linux/input.h', define_name='BUILD_POWERMATE')
conf.check_cc (lib='lo', header_name='lo/lo.h', function_name='lo_server_new', define_name='BUILD_OSC')
diff --git a/libs/taglib/wscript b/libs/taglib/wscript
index b7276d01c5..986f8302ab 100644
--- a/libs/taglib/wscript
+++ b/libs/taglib/wscript
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import glob
import os
@@ -17,12 +17,10 @@ APPNAME = 'libtaglib'
VERSION = LIBTAGLIB_VERSION
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
-path_prefix = 'libs/taglib/'
-
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
@@ -31,25 +29,23 @@ def configure(conf):
def build(bld):
# Library
- obj = bld.new_task_gen('cxx', 'shlib')
- sources = glob.glob(path_prefix + 'taglib/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/flac/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/mpc/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/mpeg/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/mpeg/id3v1/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/mpeg/id3v2/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/mpeg/id3v2/frames/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/ogg/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/ogg/vorbis/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/ogg/speex/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/ogg/flac/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/trueaudio/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/wavpack/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/ape/*.cpp')
- sources += glob.glob(path_prefix + 'taglib/toolkit/*.cpp')
- obj.source = []
- for i in sources:
- obj.source += [ i.replace(path_prefix, '') ]
+ obj = bld(features = 'cxx cxxshlib')
+ sources = bld.path.ant_glob('taglib/*.cpp')
+ sources += bld.path.ant_glob('taglib/flac/*.cpp')
+ sources += bld.path.ant_glob('taglib/mpc/*.cpp')
+ sources += bld.path.ant_glob('taglib/mpeg/*.cpp')
+ sources += bld.path.ant_glob('taglib/mpeg/id3v1/*.cpp')
+ sources += bld.path.ant_glob('taglib/mpeg/id3v2/*.cpp')
+ sources += bld.path.ant_glob('taglib/mpeg/id3v2/frames/*.cpp')
+ sources += bld.path.ant_glob('taglib/ogg/*.cpp')
+ sources += bld.path.ant_glob('taglib/ogg/vorbis/*.cpp')
+ sources += bld.path.ant_glob('taglib/ogg/speex/*.cpp')
+ sources += bld.path.ant_glob('taglib/ogg/flac/*.cpp')
+ sources += bld.path.ant_glob('taglib/trueaudio/*.cpp')
+ sources += bld.path.ant_glob('taglib/wavpack/*.cpp')
+ sources += bld.path.ant_glob('taglib/ape/*.cpp')
+ sources += bld.path.ant_glob('taglib/toolkit/*.cpp')
+ obj.source = sources
include_dirs = '''
taglib
@@ -67,7 +63,7 @@ def build(bld):
taglib/ogg/speex
taglib/ogg/flac
'''.split()
- obj.export_incdirs = ['.', 'taglib', 'taglib/toolkit']
+ obj.export_includes = ['.', 'taglib', 'taglib/toolkit']
obj.includes = include_dirs
obj.name = 'libtaglib'
obj.target = 'taglib'
diff --git a/libs/timecode/wscript b/libs/timecode/wscript
index be84a4b940..f919649e25 100644
--- a/libs/timecode/wscript
+++ b/libs/timecode/wscript
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import Options
import os
@@ -19,10 +19,10 @@ APPNAME = 'timecode'
VERSION = TIMECODE_VERSION
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
@@ -32,9 +32,9 @@ def configure(conf):
def build(bld):
# Library
- obj = bld.new_task_gen('cxx', 'shlib')
+ obj = bld(features = 'cxx cxxshlib')
obj.source = [ 'src/time.cc', 'src/bbt_time.cc' ]
- obj.export_incdirs = ['.']
+ obj.export_includes = ['.']
obj.includes = ['.', './src']
obj.name = 'libtimecode'
obj.target = 'timecode'
diff --git a/libs/vamp-plugins/wscript b/libs/vamp-plugins/wscript
index 4fde44ea34..4ec6c198b3 100644
--- a/libs/vamp-plugins/wscript
+++ b/libs/vamp-plugins/wscript
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import os
# Version of this package (even if built as a child)
@@ -16,10 +16,10 @@ APPNAME = 'libardourvampplugins'
VERSION = LIBARDOURVAMPPLUGINS_VERSION
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
@@ -27,11 +27,11 @@ def configure(conf):
conf.check_tool('compiler_cxx')
autowaf.check_pkg(conf, 'fftw3f', uselib_store='FFTW3F', mandatory=True)
autowaf.check_pkg(conf, 'aubio', uselib_store='AUBIO', mandatory=False)
- conf.write_config_header('libvampplugins-config.h')
+ conf.write_config_header('libvampplugins-config.h', remove=False)
def build(bld):
# Library
- obj = bld.new_task_gen('cxx', 'shlib')
+ obj = bld(features = 'cxx cxxshlib')
obj.source = '''
plugins.cpp
AmplitudeFollower.cpp
@@ -40,12 +40,12 @@ def build(bld):
SpectralCentroid.cpp
ZeroCrossing.cpp
'''
- obj.export_incdirs = ['.']
+ obj.export_includes = ['.']
obj.includes = ['.']
obj.name = 'libardourvampplugins'
obj.target = 'ardourvampplugins'
obj.uselib = 'FFTW3F'
- obj.uselib_local = 'libvampplugin libqmdsp'
+ obj.use = 'libvampplugin libqmdsp'
if bld.env['HAVE_AUBIO']:
obj.source += ' Onset.cpp '
obj.uselib += ' AUBIO '
diff --git a/libs/vamp-sdk/wscript b/libs/vamp-sdk/wscript
index 7ea25d71b2..aabac61ea1 100644
--- a/libs/vamp-sdk/wscript
+++ b/libs/vamp-sdk/wscript
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-import autowaf
+from waflib.extras import autowaf as autowaf
import os
# Version of this package (even if built as a child)
@@ -16,10 +16,10 @@ APPNAME = 'libvamp'
VERSION = LIBVAMP_VERSION
# Mandatory variables
-srcdir = '.'
-blddir = 'build'
+top = '.'
+out = 'build'
-def set_options(opt):
+def options(opt):
autowaf.set_options(opt)
def configure(conf):
@@ -31,7 +31,7 @@ def configure(conf):
def build(bld):
# Host Library
- obj = bld.new_task_gen('cxx', 'shlib')
+ obj = bld(features = 'cxx cxxshlib')
obj.source = '''
src/vamp-hostsdk/PluginHostAdapter.cpp
src/vamp-hostsdk/PluginBufferingAdapter.cpp
@@ -41,7 +41,7 @@ def build(bld):
src/vamp-hostsdk/PluginWrapper.cpp
src/vamp-hostsdk/RealTime.cpp
'''
- obj.export_incdirs = ['.']
+ obj.export_includes = ['.']
obj.includes = ['.']
obj.name = 'libvamphost'
obj.target = 'vamphost'
@@ -50,12 +50,12 @@ def build(bld):
obj.install_path = os.path.join(bld.env['LIBDIR'], 'ardour3')
# Plugin Library
- obj = bld.new_task_gen('cxx', 'shlib')
+ obj = bld(features = 'cxx cxxshlib')
obj.source = '''
src/vamp-sdk/PluginAdapter.cpp
src/vamp-sdk/RealTime.cpp
'''
- obj.export_incdirs = ['.']
+ obj.export_includes = ['.']
obj.includes = ['.']
obj.name = 'libvampplugin'
obj.target = 'vampplugin'