Remove conditional support for ancient versions of Lilv
This updates the dependency to 0.24.2, which was released in January 2017 and is the most recent version in Debian 9 (stretch).
This commit is contained in:
parent
ff51744671
commit
79c9c62154
|
@ -408,13 +408,8 @@ LV2PluginUI::lv2ui_instantiate(const std::string& title)
|
|||
const LilvUI* ui = (const LilvUI*)_lv2->c_ui();
|
||||
const LilvNode* bundle = lilv_ui_get_bundle_uri(ui);
|
||||
const LilvNode* binary = lilv_ui_get_binary_uri(ui);
|
||||
#ifdef HAVE_LILV_0_21_3
|
||||
char* ui_bundle_path = lilv_file_uri_parse(lilv_node_as_uri(bundle), NULL);
|
||||
char* ui_binary_path = lilv_file_uri_parse(lilv_node_as_uri(binary), NULL);
|
||||
#else
|
||||
char* ui_bundle_path = strdup(lilv_uri_to_path(lilv_node_as_uri(bundle)));
|
||||
char* ui_binary_path = strdup(lilv_uri_to_path(lilv_node_as_uri(binary)));
|
||||
#endif
|
||||
if (!ui_bundle_path || !ui_binary_path) {
|
||||
error << _("failed to get path for UI bindle or binary") << endmsg;
|
||||
free(ui_bundle_path);
|
||||
|
|
|
@ -653,7 +653,6 @@ LV2Plugin::init(const void* c_plugin, samplecnt_t rate)
|
|||
lilv_nodes_free(optional_features);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LILV_0_16_0
|
||||
// Load default state
|
||||
if (_worker) {
|
||||
/* immediately schedule any work,
|
||||
|
@ -668,7 +667,6 @@ LV2Plugin::init(const void* c_plugin, samplecnt_t rate)
|
|||
lilv_state_restore(state, _impl->instance, NULL, NULL, 0, NULL);
|
||||
}
|
||||
lilv_state_free(state);
|
||||
#endif
|
||||
|
||||
_sample_rate = rate;
|
||||
|
||||
|
@ -1603,7 +1601,6 @@ LV2Plugin::do_save_preset(string name)
|
|||
Glib::build_filename(".lv2", prefix + "_" + base_name + ".lv2"));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LILV_0_21_3
|
||||
/* delete reference to old preset (if any) */
|
||||
const PresetRecord* r = preset_by_label(name);
|
||||
if (r) {
|
||||
|
@ -1613,7 +1610,6 @@ LV2Plugin::do_save_preset(string name)
|
|||
lilv_node_free(pset);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
LilvState* state = lilv_state_new_from_instance(
|
||||
_impl->plugin,
|
||||
|
@ -1645,10 +1641,8 @@ LV2Plugin::do_save_preset(string name)
|
|||
std::string uri = Glib::filename_to_uri(Glib::build_filename(bundle, file_name));
|
||||
LilvNode *node_bundle = lilv_new_uri(_world.world, Glib::filename_to_uri(Glib::build_filename(bundle, "/")).c_str());
|
||||
LilvNode *node_preset = lilv_new_uri(_world.world, uri.c_str());
|
||||
#ifdef HAVE_LILV_0_21_3
|
||||
lilv_world_unload_resource(_world.world, node_preset);
|
||||
lilv_world_unload_bundle(_world.world, node_bundle);
|
||||
#endif
|
||||
lilv_world_load_bundle(_world.world, node_bundle);
|
||||
lilv_world_load_resource(_world.world, node_preset);
|
||||
lilv_node_free(node_bundle);
|
||||
|
@ -1660,7 +1654,6 @@ LV2Plugin::do_save_preset(string name)
|
|||
void
|
||||
LV2Plugin::do_remove_preset(string name)
|
||||
{
|
||||
#ifdef HAVE_LILV_0_21_3
|
||||
/* Look up preset record by label (FIXME: ick, label as ID) */
|
||||
const PresetRecord* r = preset_by_label(name);
|
||||
if (!r) {
|
||||
|
@ -1686,11 +1679,6 @@ LV2Plugin::do_remove_preset(string name)
|
|||
|
||||
lilv_state_free(state);
|
||||
lilv_node_free(pset);
|
||||
#endif
|
||||
/* Without lilv_state_delete(), we could delete the preset file, but this
|
||||
would leave a broken bundle/manifest around, so the preset would still
|
||||
be visible, but broken. Naively deleting a bundle is too dangerous, so
|
||||
we simply do not support preset deletion with older Lilv */
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
|
@ -313,13 +313,7 @@ def configure(conf):
|
|||
autowaf.check_pkg(conf, 'sratom-0', uselib_store='SRATOM',
|
||||
atleast_version='0.2.0', mandatory=True)
|
||||
autowaf.check_pkg(conf, 'lilv-0', uselib_store='LILV',
|
||||
atleast_version='0.14.0', mandatory=True)
|
||||
autowaf.check_pkg(conf, 'lilv-0', uselib_store='LILV_0_16_0',
|
||||
atleast_version='0.16.0', mandatory=False)
|
||||
autowaf.check_pkg(conf, 'lilv-0', uselib_store='LILV_0_19_2',
|
||||
atleast_version='0.19.2', mandatory=False)
|
||||
autowaf.check_pkg(conf, 'lilv-0', uselib_store='LILV_0_21_3',
|
||||
atleast_version='0.21.3', mandatory=False)
|
||||
atleast_version='0.24.2', mandatory=False)
|
||||
autowaf.check_pkg(conf, 'suil-0', uselib_store='SUIL',
|
||||
atleast_version='0.6.0', mandatory=False)
|
||||
conf.define ('LV2_SUPPORT', 1)
|
||||
|
|
Loading…
Reference in New Issue
Block a user