summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-02-03 22:58:17 +0000
committerDavid Robillard <d@drobilla.net>2011-02-03 22:58:17 +0000
commit32e207d966562d622a38d5261d624346a0785b37 (patch)
tree3c1a8a2cb4de991fa41dac87cf28d355b7f55cc1 /libs
parentfc64778946ea6dcb22523369338c6983f6ad15e0 (diff)
Compile with new (as yet unreleased) librdf and SPARQL-free slv2.
git-svn-id: svn://localhost/ardour2/branches/3.0@8696 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/lv2_plugin.cc17
-rw-r--r--libs/ardour/wscript1
2 files changed, 10 insertions, 8 deletions
diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc
index d71fd50c00..096123f564 100644
--- a/libs/ardour/lv2_plugin.cc
+++ b/libs/ardour/lv2_plugin.cc
@@ -402,12 +402,13 @@ LV2Plugin::load_preset (PresetRecord r)
{
Plugin::load_preset (r);
-#if 0
- // TODO: SLV2 needs blank nodes in the API for this to be possible...
- SLV2Value lv2_port = slv2_value_new_uri(_world.world, NS_LV2 "port");
- SLV2Value lv2_symbol = slv2_value_new_uri(_world.world, NS_LV2 "symbol");
- SLV2Value pset_value = slv2_value_new_uri(_world.world, NS_PSET "value");
- SLV2Value preset = slv2_value_new_uri(_world.world, r.uri.c_str());
+#ifdef HAVE_NEW_SLV2
+ // New (>= 0.7.0) slv2 no longer supports SPARQL, but exposes blank nodes
+ // so querying ports is possible with the simple API
+ SLV2Value lv2_port = slv2_value_new_uri(_world.world, NS_LV2 "port");
+ SLV2Value lv2_symbol = slv2_value_new_uri(_world.world, NS_LV2 "symbol");
+ SLV2Value pset_value = slv2_value_new_uri(_world.world, NS_PSET "value");
+ SLV2Value preset = slv2_value_new_uri(_world.world, r.uri.c_str());
SLV2Values ports = slv2_plugin_get_value_for_subject(_plugin, preset, lv2_port);
for (unsigned i = 0; i < slv2_values_size(ports); ++i) {
@@ -425,8 +426,7 @@ LV2Plugin::load_preset (PresetRecord r)
slv2_value_free(pset_value);
slv2_value_free(lv2_symbol);
slv2_value_free(lv2_port);
-#endif
-
+#else
const string query = string(
"PREFIX lv2p: <http://lv2plug.in/ns/dev/presets#>\n"
"PREFIX dc: <http://dublincore.org/documents/dcmi-namespace/>\n"
@@ -442,6 +442,7 @@ LV2Plugin::load_preset (PresetRecord r)
}
}
slv2_results_free(values);
+#endif
return true;
}
diff --git a/libs/ardour/wscript b/libs/ardour/wscript
index 309d646d31..5e10b85b88 100644
--- a/libs/ardour/wscript
+++ b/libs/ardour/wscript
@@ -242,6 +242,7 @@ def configure(conf):
autowaf.check_pkg(conf, 'samplerate', uselib_store='SAMPLERATE', atleast_version='0.1.0')
autowaf.check_pkg(conf, 'sigc++-2.0', uselib_store='SIGCPP', atleast_version='2.0')
autowaf.check_pkg(conf, 'slv2', uselib_store='SLV2', atleast_version='0.6.4', mandatory=False)
+ autowaf.check_pkg(conf, 'slv2', uselib_store='NEW_SLV2', atleast_version='0.7.0', mandatory=False)
autowaf.check_pkg(conf, 'rasqal', uselib_store='RASQAL', atleast_version='0.9.14', mandatory=False)
autowaf.check_pkg(conf, 'soundtouch-1.0', uselib_store='SOUNDTOUCH', mandatory=False)
autowaf.check_pkg(conf, 'cppunit', uselib_store='CPPUNIT', atleast_version='1.12.0', mandatory=False)