meson: Use list for dependency version to enable multiple restrictions

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1447>
This commit is contained in:
Ruben Gonzalez 2024-02-05 19:57:20 +01:00 committed by GStreamer Marge Bot
parent d7c7784022
commit f8572c17dd

View file

@ -140,13 +140,13 @@ plugins = {
'aws': { 'aws': {
'library': 'libgstaws', 'library': 'libgstaws',
'extra-deps': {'openssl': '>=1.1'}, 'extra-deps': {'openssl': ['>=1.1']},
}, },
'hlssink3': {'library': 'libgsthlssink3'}, 'hlssink3': {'library': 'libgsthlssink3'},
'ndi': {'library': 'libgstndi'}, 'ndi': {'library': 'libgstndi'},
'onvif': { 'onvif': {
'library': 'libgstrsonvif', 'library': 'libgstrsonvif',
'extra-deps': {'pangocairo': ''}, 'extra-deps': {'pangocairo': []},
}, },
'raptorq': {'library': 'libgstraptorq'}, 'raptorq': {'library': 'libgstraptorq'},
'reqwest': {'library': 'libgstreqwest'}, 'reqwest': {'library': 'libgstreqwest'},
@ -173,14 +173,14 @@ plugins = {
'closedcaption': { 'closedcaption': {
'library': 'libgstrsclosedcaption', 'library': 'libgstrsclosedcaption',
'extra-deps': { 'extra-deps': {
'pango': '', 'pango': [],
'pangocairo': '', 'pangocairo': [],
'cairo-gobject': '', 'cairo-gobject': [],
} }
}, },
'dav1d': { 'dav1d': {
'library': 'libgstdav1d', 'library': 'libgstdav1d',
'extra-deps': {'dav1d': '>=1.0'}, 'extra-deps': {'dav1d': ['>=1.0']},
}, },
'ffv1': {'library': 'libgstffv1'}, 'ffv1': {'library': 'libgstffv1'},
'flavors': {'library': 'libgstrsflv'}, 'flavors': {'library': 'libgstrsflv'},
@ -197,7 +197,7 @@ plugins = {
'rav1e': {'library': 'libgstrav1e'}, 'rav1e': {'library': 'libgstrav1e'},
'videofx': { 'videofx': {
'library': 'libgstrsvideofx', 'library': 'libgstrsvideofx',
'extra-deps': {'cairo-gobject': ''}, 'extra-deps': {'cairo-gobject': []},
}, },
} }
@ -236,7 +236,7 @@ if host_system not in ['windows', 'darwin']
# https://github.com/qnighy/libwebp-sys2-rs/issues/4 # https://github.com/qnighy/libwebp-sys2-rs/issues/4
plugins += {'webp': { plugins += {'webp': {
'library': 'libgstrswebp', 'library': 'libgstrswebp',
'extra-deps': {'libwebpdemux': ''}, 'extra-deps': {'libwebpdemux': []},
}} }}
endif endif
@ -302,7 +302,7 @@ if get_option('gtk4').allowed()
'gtk4': { 'gtk4': {
'library': 'libgstgtk4', 'library': 'libgstgtk4',
'examples': ['gtksink'], 'examples': ['gtksink'],
'extra-deps': {'gtk4': '>=4.6'}, 'extra-deps': {'gtk4': ['>=4.6']},
'features': gtk4_features, 'features': gtk4_features,
}, },
} }
@ -373,7 +373,7 @@ foreach plugin_name, details: plugins
if plugin_opt.allowed() if plugin_opt.allowed()
plugin_deps_found = true plugin_deps_found = true
foreach dep_name, dep_ver: details.get('extra-deps', {}) foreach dep_name, dep_ver: details.get('extra-deps', {})
if dep_ver != '' if dep_ver.length() != 0
dep = dependency(dep_name, version: dep_ver, required: plugin_opt) dep = dependency(dep_name, version: dep_ver, required: plugin_opt)
else else
dep = dependency(dep_name, required: plugin_opt) dep = dependency(dep_name, required: plugin_opt)