Build failure due to missing but unneeded gstreamer dependencies for the selected options
When trying to build only with basic/minimal functionality and the spotify plugin enabled:
-Dfile=enabled
-Dsodium=enabled
-Dthreadshare=enabled
-Dspotify=enabled
via:
-Daudiofx=disabled -Daws=disabled -Dcdg=disabled -Dclaxon=disabled -Dcsound=disabled -Ddoc=disabled -Dexamples=disabled -Dfallbackswitch=disabled -Dffv1=disabled -Dfile=enabled -Dflavors=disabled -Dfmp4=disabled -Dgif=disabled -Dhlssink3=disabled -Dhsv=disabled -Djson=disabled -Dlewton=disabled -Dlivesync=disabled -Dndi=disabled -Dmp4=disabled -Dpng=disabled -Draptorq=disabled -Drav1e=disabled -Dregex=disabled -Dreqwest=disabled -Drtp=disabled -Dsodium=enabled -Dsodium-source=system -Dtextahead=disabled -Dtextwrap=disabled -Dthreadshare=enabled -Dtogglerecord=disabled -Dtracers=disabled -Duriplaylistbin=disabled -Dvideofx=disabled -Dwebrtc=disabled -Dwebrtchttp=disabled -Dclosedcaption=disabled -Ddav1d=disabled -Dgtk4=disabled -Donvif=disabled -Dspotify=enabled -Dwebp=disabled
build fails with:
Run-time dependency gstreamer-gl-1.0 found: NO (tried pkgconfig and cmake)
Looking for a fallback subproject for the dependency gstreamer-gl-1.0
../gst-plugins-rs-0.9.8/meson.build:77:2: ERROR: Neither a subproject directory nor a gst-plugins-base.wrap file was found
due to https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/blob/main/meson.build#L65
which is true, I don't have gst-plugins-base compiled with gl support as it's running on a headless machine (as in spotify plugin only required for mopidy-spotify). The dependency shouldn't be required and forced at all. This was working fine in gst-plugins-rs-0.9.4 which didn't offer the whole lot of options to disable unneeded stuff in a big scale like newer versions do, but the build worked fine without having e.g. gstreamer-gl-1.0 installed.
The package builds fine for me with the options stated above if I remove the dependency from meson.build:
# gstreamer-gl-1.0 is only required for gtk4
if option !gstreamer_plugins:gtk4 ; then
edo sed \
-e '/gstreamer-gl-1.0/d' \
-i meson.build
fi
Same goes for the gstreamer-webrtc-1.0 line / dependency pulling in gst-plugins-bad which is not needed if webrtc/webrtchttp are disabled.
Pulling in these dependencies should be made conditional in regards to the selected plugins actually needing those.