package/mpv: fix build of vaapi with egl-drm
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Thu, 19 Aug 2021 22:19:29 +0000 (00:19 +0200)
committerYann E. MORIN <yann.morin.1998@free.fr>
Fri, 20 Aug 2021 08:02:32 +0000 (10:02 +0200)
commit6fdac7fd193507789b568d5e6839e6d100edbf26
treed2829f4cd0964370384c134e2fe93c5d1f40bd8c
parente5709388eb519e79720b4ae8ca7c67bd80513a6c
package/mpv: fix build of vaapi with egl-drm

Build of vaapi with egl-drm is broken since commit
6ec47c4e59c7c8c57e972dab985c8a2ba0bf7174 because egl-drm is a part of gl
group which is only enabled if BR2_PACKAGE_HAS_LIBGL or
BR2_PACKAGE_HAS_LIBGLES are set:
https://github.com/mpv-player/mpv/blob/ec0006bfa1aaf608a7141929f2871c89ac7a15d6/wscript#L572

As a result, despite what is being displayed in the autobuilder log
message, the build failure is not related to X11 but to the fact that
we try to enable vaapi through egl-drm but at the same time, we disable
gl.

To fix it, enable gl if libegl is available as gl can be enabled for
example through wayland and egl (gl-wayland):

'deps': 'gl-cocoa || gl-x11 || egl-x11 || egl-drm || '
+ 'gl-win32 || gl-wayland || rpi || '
+ 'plain-gl',

Fixes:
 - http://autobuild.buildroot.org/results/e5c15228f42a73f8c34b26630b2074c30e5f5966

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/mpv/mpv.mk