commit: b616876327f00eadb888ebf3480b2444671f81c0 Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org> AuthorDate: Fri Apr 4 07:23:01 2025 +0000 Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org> CommitDate: Fri Apr 4 07:39:57 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6168763
media-video/mpv: drop opengl USE and suggest egl USE instead As the ebuild's ewarn notes, --gpu-api=opengl still works with USE=egl through egl-x11/wayland, this only drops the deprecated/legacy gl-x11. Debated renaming USE=egl to USE=opengl instead given it's more commonly used, but given we've been calling it deprecated in metadata.xml and that mpv options are all egl-* it may come as confusing. The ewarn is not overly essential given we enable USE=egl by default, but mpv tend to have a few minimalist users that disable everything they can. I may add that if do this, may want to consider USE=vulkan instead if it works well given mpv upstream favours it by default now. Untested but tentatively add aqua for -Dgl (formerly controlled through USE=opengl), believe gl-cocoa is always available? Please report if this causes issues. Closes: https://bugs.gentoo.org/953107 Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org> .../{mpv-0.40.0.ebuild => mpv-0.40.0-r1.ebuild} | 23 ++++++++++++++-------- media-video/mpv/mpv-9999.ebuild | 23 ++++++++++++++-------- 2 files changed, 30 insertions(+), 16 deletions(-) diff --git a/media-video/mpv/mpv-0.40.0.ebuild b/media-video/mpv/mpv-0.40.0-r1.ebuild similarity index 89% rename from media-video/mpv/mpv-0.40.0.ebuild rename to media-video/mpv/mpv-0.40.0-r1.ebuild index b17efcfce030..409716b6966f 100644 --- a/media-video/mpv/mpv-0.40.0.ebuild +++ b/media-video/mpv/mpv-0.40.0-r1.ebuild @@ -23,17 +23,16 @@ SLOT="0/2" # soname IUSE=" +X +alsa aqua archive bluray cdda +cli coreaudio debug +drm dvb dvd +egl gamepad +iconv jack javascript jpeg lcms libcaca +libmpv - +lua nvenc openal opengl pipewire pulseaudio rubberband sdl selinux - sixel sndio soc test tools +uchardet vaapi vdpau +vulkan wayland xv - zimg zlib + +lua nvenc openal pipewire pulseaudio rubberband sdl selinux sixel + sndio soc test tools +uchardet vaapi vdpau +vulkan wayland xv zimg + zlib " REQUIRED_USE=" ${PYTHON_REQUIRED_USE} || ( cli libmpv ) egl? ( || ( X drm wayland ) ) lua? ( ${LUA_REQUIRED_USE} ) - nvenc? ( || ( egl opengl vulkan ) ) - opengl? ( || ( X aqua ) ) + nvenc? ( || ( egl vulkan ) ) test? ( cli ) tools? ( cli ) uchardet? ( iconv ) @@ -46,7 +45,7 @@ RESTRICT="!test? ( test )" COMMON_DEPEND=" media-libs/libass:=[fontconfig] - >=media-libs/libplacebo-7.349.0:=[opengl?,vulkan?] + >=media-libs/libplacebo-7.349.0:=[vulkan?] >=media-video/ffmpeg-6.1:=[encode(+),soc(-)?,threads(+),vaapi?,vdpau?] X? ( x11-libs/libX11 @@ -85,7 +84,6 @@ COMMON_DEPEND=" libcaca? ( media-libs/libcaca ) lua? ( ${LUA_DEPS} ) openal? ( media-libs/openal ) - opengl? ( media-libs/libglvnd[X?] ) pipewire? ( media-video/pipewire:= ) pulseaudio? ( media-libs/libpulse ) rubberband? ( media-libs/rubberband:= ) @@ -123,6 +121,15 @@ BDEPEND=" wayland? ( dev-util/wayland-scanner ) " +pkg_pretend() { + if has_version "${CATEGORY}/${PN}[X,opengl]" && use !egl; then #953107 + ewarn "${PN}'s 'opengl' USE was removed in favour of the 'egl' USE as it was" + ewarn "only for the deprecated 'gl-x11' mpv option when 'egl-x11/wayland'" + ewarn "should be used if --gpu-api=opengl. It is recommended to enable 'egl'" + ewarn "unless using vulkan (default since ${PN}-0.40) or something else." + fi +} + pkg_setup() { use lua && lua-single_pkg_setup python-single-r1_pkg_setup @@ -189,7 +196,7 @@ src_configure() { $(meson_feature wayland) $(meson_feature xv) - -Dgl=$(use egl || use libmpv || use opengl && + -Dgl=$(use aqua || use egl || use libmpv && echo enabled || echo disabled) $(meson_feature egl) $(meson_feature libmpv plain-gl) diff --git a/media-video/mpv/mpv-9999.ebuild b/media-video/mpv/mpv-9999.ebuild index aaf45c44fd62..e79b68414d16 100644 --- a/media-video/mpv/mpv-9999.ebuild +++ b/media-video/mpv/mpv-9999.ebuild @@ -23,17 +23,16 @@ SLOT="0/2" # soname IUSE=" +X +alsa aqua archive bluray cdda +cli coreaudio debug +drm dvb dvd +egl gamepad +iconv jack javascript jpeg lcms libcaca +libmpv - +lua nvenc openal opengl pipewire pulseaudio rubberband sdl selinux - sixel sndio soc test tools +uchardet vaapi vdpau +vulkan wayland xv - zimg zlib + +lua nvenc openal pipewire pulseaudio rubberband sdl selinux sixel + sndio soc test tools +uchardet vaapi vdpau +vulkan wayland xv zimg + zlib " REQUIRED_USE=" ${PYTHON_REQUIRED_USE} || ( cli libmpv ) egl? ( || ( X drm wayland ) ) lua? ( ${LUA_REQUIRED_USE} ) - nvenc? ( || ( egl opengl vulkan ) ) - opengl? ( || ( X aqua ) ) + nvenc? ( || ( egl vulkan ) ) test? ( cli ) tools? ( cli ) uchardet? ( iconv ) @@ -46,7 +45,7 @@ RESTRICT="!test? ( test )" COMMON_DEPEND=" media-libs/libass:=[fontconfig] - >=media-libs/libplacebo-7.349.0:=[opengl?,vulkan?] + >=media-libs/libplacebo-7.349.0:=[vulkan?] >=media-video/ffmpeg-6.1:=[encode(+),soc(-)?,threads(+),vaapi?,vdpau?] X? ( x11-libs/libX11 @@ -85,7 +84,6 @@ COMMON_DEPEND=" libcaca? ( media-libs/libcaca ) lua? ( ${LUA_DEPS} ) openal? ( media-libs/openal ) - opengl? ( media-libs/libglvnd[X?] ) pipewire? ( media-video/pipewire:= ) pulseaudio? ( media-libs/libpulse ) rubberband? ( media-libs/rubberband:= ) @@ -126,6 +124,15 @@ BDEPEND=" wayland? ( dev-util/wayland-scanner ) " +pkg_pretend() { + if has_version "${CATEGORY}/${PN}[X,opengl]" && use !egl; then #953107 + ewarn "${PN}'s 'opengl' USE was removed in favour of the 'egl' USE as it was" + ewarn "only for the deprecated 'gl-x11' mpv option when 'egl-x11/wayland'" + ewarn "should be used if --gpu-api=opengl. It is recommended to enable 'egl'" + ewarn "unless using vulkan (default since ${PN}-0.40) or something else." + fi +} + pkg_setup() { use lua && lua-single_pkg_setup python-single-r1_pkg_setup @@ -192,7 +199,7 @@ src_configure() { $(meson_feature wayland) $(meson_feature xv) - -Dgl=$(use egl || use libmpv || use opengl && + -Dgl=$(use aqua || use egl || use libmpv && echo enabled || echo disabled) $(meson_feature egl) $(meson_feature libmpv plain-gl)
