summaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-12-30 08:23:19 +0000
committerDavid Robillard <d@drobilla.net>2011-12-30 08:23:19 +0000
commit8708ccb858ddbf5d521c4755e137bd04544a6ae5 (patch)
tree2da5030db36592ff19b13f8ff802a5f5c3bfb3b8 /wscript
parentc5c4a6e935eecc2d2dac7bb9cccd36057b8dc123 (diff)
downloadlilv-8708ccb858ddbf5d521c4755e137bd04544a6ae5.tar.gz
lilv-8708ccb858ddbf5d521c4755e137bd04544a6ae5.tar.bz2
lilv-8708ccb858ddbf5d521c4755e137bd04544a6ae5.zip
Support arbitrary binary data in plugin state via base64 encoding.
Unit testing for plugin instantiation and state. Build without LV2 state available. Support URID values in plugin state nicely. Fix various holes in state implementation exposed by tests. git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3908 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'wscript')
-rw-r--r--wscript37
1 files changed, 31 insertions, 6 deletions
diff --git a/wscript b/wscript
index 13a382f..a774f0f 100644
--- a/wscript
+++ b/wscript
@@ -69,11 +69,13 @@ def configure(conf):
autowaf.check_pkg(conf, 'lv2core', uselib_store='LV2CORE', mandatory=True)
autowaf.check_pkg(conf, 'serd-0', uselib_store='SERD',
- atleast_version='0.7.0', mandatory=True)
+ atleast_version='0.9.0', mandatory=True)
autowaf.check_pkg(conf, 'sord-0', uselib_store='SORD',
atleast_version='0.5.0', mandatory=True)
+ autowaf.check_pkg(conf, 'lv2-lv2plug.in-ns-ext-urid',
+ uselib_store='LV2_URID', mandatory=True)
autowaf.check_pkg(conf, 'lv2-lv2plug.in-ns-ext-state',
- uselib_store='LV2_STATE', mandatory=True)
+ uselib_store='LV2_STATE', mandatory=False)
conf.check_cc(function_name='wordexp',
header_name='wordexp.h',
@@ -204,7 +206,7 @@ def build(bld):
cflags = libflags + [ '-DLILV_SHARED',
'-DLILV_INTERNAL' ],
lib = lib)
- autowaf.use_lib(bld, obj, 'SORD LV2CORE')
+ autowaf.use_lib(bld, obj, 'SORD LV2CORE LV2_STATE LV2_URID')
# Static library
if bld.env['BUILD_STATIC']:
@@ -217,9 +219,30 @@ def build(bld):
vnum = LILV_LIB_VERSION,
install_path = '${LIBDIR}',
cflags = [ '-DLILV_INTERNAL' ])
- autowaf.use_lib(bld, obj, 'SORD LV2CORE')
+ autowaf.use_lib(bld, obj, 'SORD LV2CORE LV2_STATE LV2_URID')
if bld.env['BUILD_TESTS']:
+ # Test plugin library
+ penv = bld.env.derive()
+ shlib_pattern = penv['cshlib_PATTERN']
+ if shlib_pattern.startswith('lib'):
+ shlib_pattern = shlib_pattern[3:]
+ penv['cshlib_PATTERN'] = shlib_pattern
+ obj = bld(features = 'c cshlib',
+ env = penv,
+ source = 'test/test_plugin.c',
+ name = 'test_plugin',
+ target = 'test/test_plugin.lv2/test_plugin',
+ install_path = None,
+ uselib = 'LV2CORE LV2_STATE LV2_URID')
+
+ # Test plugin data files
+ for i in [ 'manifest.ttl', 'test_plugin.ttl' ]:
+ bld(rule = 'cp ${SRC} ${TGT}',
+ source = 'test/' + i,
+ target = 'test/test_plugin.lv2/' + i,
+ install_path = None)
+
# Static profiled library (for unit test code coverage)
obj = bld(features = 'c cstlib',
source = lib_source,
@@ -230,7 +253,7 @@ def build(bld):
cflags = [ '-fprofile-arcs', '-ftest-coverage',
'-DLILV_INTERNAL' ],
lib = lib + ['gcov'])
- autowaf.use_lib(bld, obj, 'SORD LV2CORE')
+ autowaf.use_lib(bld, obj, 'SORD LV2CORE LV2_STATE LV2_URID')
# Unit test program
obj = bld(features = 'c cprogram',
@@ -241,8 +264,10 @@ def build(bld):
lib = lib + ['gcov'],
target = 'test/lilv_test',
install_path = '',
+ defines = ['LILV_TEST_BUNDLE=\"%s/\"' % os.path.abspath(
+ os.path.join(out, 'test', 'test_plugin.lv2'))],
cflags = [ '-fprofile-arcs', '-ftest-coverage' ])
- autowaf.use_lib(bld, obj, 'SORD LV2CORE')
+ autowaf.use_lib(bld, obj, 'SORD LV2CORE LV2_STATE LV2_URID')
# Utilities
if bld.env['BUILD_UTILS']: