lv2: Try and reflect better lilv default path

While keeping it simple, this patch tries and mimic lilv default path.
It does not matter if some path are duplicated due to symlink because in
the end it's lilv that will walk these paths. The worst case is that we
update our cache more often then strictly needed.

https://bugzilla.gnome.org/show_bug.cgi?id=791717
This commit is contained in:
Nicolas Dufresne 2017-12-18 14:42:21 -05:00
parent 8c850b3465
commit fbd9a62504

View file

@ -50,10 +50,24 @@
GST_DEBUG_CATEGORY (lv2_debug);
#define GST_CAT_DEFAULT lv2_debug
#if defined (G_OS_WIN32)
#define GST_LV2_ENVVARS "APPDATA/LV2:COMMONPROGRAMFILES/LV2"
#define GST_LV2_DEFAULT_PATH NULL
#elif defined (HAVE_OSX)
#define GST_LV2_ENVVARS "HOME/Library/Audio/Plug-Ins/LV2:HOME/.lv2"
#define GST_LV2_DEFAULT_PATH \
"/usr/lib/lv2" G_SEARCHPATH_SEPARATOR_S \
"/usr/local/lib/lv2" G_SEARCHPATH_SEPARATOR_S \
"/usr/local/lib/lv2:/usr/lib/lv2:/Library/Audio/Plug-Ins/LV2"
#elif defined (G_OS_UNIX)
#define GST_LV2_ENVVARS "HOME/.lv2"
#define GST_LV2_DEFAULT_PATH \
"/usr/lib/lv2:" \
"/usr/lib64/lv2:" \
"/usr/local/lib/lv2:" \
"/usr/local/lib64/lv2:" \
LIBDIR "/lv2"
#else
#error "Unsupported OS"
#endif
GstStructure *lv2_meta_all = NULL;
@ -255,7 +269,7 @@ plugin_init (GstPlugin * plugin)
side_right_role = lilv_new_uri (world, LV2_PORT_GROUPS__sideRight);
gst_plugin_add_dependency_simple (plugin,
"LV2_PATH", GST_LV2_DEFAULT_PATH, NULL,
"LV2_PATH:" GST_LV2_ENVVARS, GST_LV2_DEFAULT_PATH, NULL,
GST_PLUGIN_DEPENDENCY_FLAG_RECURSE);
/* ensure GstAudioChannelPosition type is registered */