2016-04-27 15:12:02 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# mpv
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2021-05-27 09:04:23 +02:00
|
|
|
MPV_VERSION = 0.33.1
|
2020-09-20 10:40:52 +02:00
|
|
|
MPV_SITE = $(call github,mpv-player,mpv,v$(MPV_VERSION))
|
2016-04-27 15:12:02 +02:00
|
|
|
MPV_DEPENDENCIES = \
|
2021-01-12 07:52:24 +01:00
|
|
|
host-pkgconf ffmpeg libass zlib \
|
2016-04-27 15:12:02 +02:00
|
|
|
$(if $(BR2_PACKAGE_LIBICONV),libiconv)
|
2017-03-30 15:43:32 +02:00
|
|
|
MPV_LICENSE = GPL-2.0+
|
2019-07-31 08:11:03 +02:00
|
|
|
MPV_LICENSE_FILES = LICENSE.GPL
|
2021-05-22 22:28:54 +02:00
|
|
|
MPV_CPE_ID_VENDOR = mpv
|
2021-08-13 12:56:18 +02:00
|
|
|
MPV_INSTALL_STAGING = YES
|
2016-04-27 15:12:02 +02:00
|
|
|
|
2016-10-30 17:02:20 +01:00
|
|
|
MPV_NEEDS_EXTERNAL_WAF = YES
|
|
|
|
|
2016-04-27 15:12:02 +02:00
|
|
|
# Some of these options need testing and/or tweaks
|
|
|
|
MPV_CONF_OPTS = \
|
|
|
|
--prefix=/usr \
|
|
|
|
--disable-android \
|
|
|
|
--disable-caca \
|
|
|
|
--disable-cocoa \
|
|
|
|
--disable-coreaudio \
|
2017-04-16 14:12:36 +02:00
|
|
|
--disable-cuda-hwaccel \
|
2016-04-27 15:12:02 +02:00
|
|
|
--disable-opensles \
|
|
|
|
--disable-rubberband \
|
|
|
|
--disable-uchardet \
|
2020-09-20 10:40:52 +02:00
|
|
|
--disable-vapoursynth
|
2016-04-27 15:12:02 +02:00
|
|
|
|
2021-06-18 21:22:34 +02:00
|
|
|
ifeq ($(BR2_REPRODUCIBLE),y)
|
|
|
|
MPV_CONF_OPTS += --disable-build-date
|
|
|
|
endif
|
|
|
|
|
package/mpv: handle --{en,dis}able-libmpv-{shared,static}
libmpv-static and libmpv-shared are disabled by default resulting in the
following build failure when building with gl but without rpi, wayland
or x11:
Checking for OpenGL without platform-specific code (e.g. for libmpv) : libmpv-shared not found
Checking for OpenGL context support : gl-cocoa not found
You manually enabled the feature 'gl', but the autodetection check failed.
Here is an extract of wscript:
} , {
'name': '--plain-gl',
'desc': 'OpenGL without platform-specific code (e.g. for libmpv)',
'deps': 'libmpv-shared || libmpv-static',
'func': check_true,
}, {
'name': '--gl',
'desc': 'OpenGL context support',
'deps': 'gl-cocoa || gl-x11 || egl-x11 || egl-drm || '
+ 'gl-win32 || gl-wayland || rpi || '
+ 'plain-gl',
'func': check_true,
'req': True,
'fmsg': "No OpenGL video output found or enabled. " +
"Aborting. If you really mean to compile without OpenGL " +
"video outputs use --disable-gl.",
}, {
Enabling both the shared and static libraries is not allowed by mpv, so
we consider the BR2_STATIC_LIBS to be static, and otherwise (i.e.
BR2_SHARED_LIBS and BR2_SHARED_STATIC_LIBS) to be shared.
Fixes:
- http://autobuild.buildroot.org/results/590d2a8b6746ef071dfb439e42b636f81dbdc35d
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
[yann.morin.1998@free.fr:
- expand config log about shared/static icompatibility
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2021-06-06 00:00:31 +02:00
|
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
|
|
|
MPV_CONF_OPTS += --disable-libmpv-shared --enable-libmpv-static
|
|
|
|
else
|
|
|
|
MPV_CONF_OPTS += --enable-libmpv-shared --disable-libmpv-static
|
|
|
|
endif
|
|
|
|
|
2016-04-27 15:12:02 +02:00
|
|
|
# ALSA support requires pcm+mixer
|
|
|
|
ifeq ($(BR2_PACKAGE_ALSA_LIB_MIXER)$(BR2_PACKAGE_ALSA_LIB_PCM),yy)
|
|
|
|
MPV_CONF_OPTS += --enable-alsa
|
|
|
|
MPV_DEPENDENCIES += alsa-lib
|
|
|
|
else
|
|
|
|
MPV_CONF_OPTS += --disable-alsa
|
|
|
|
endif
|
|
|
|
|
2021-08-24 08:49:16 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_MESA3D_GBM),y)
|
2016-04-27 15:12:02 +02:00
|
|
|
MPV_CONF_OPTS += --enable-gbm
|
2017-01-02 17:11:01 +01:00
|
|
|
MPV_DEPENDENCIES += mesa3d
|
2021-06-18 21:22:36 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBDRM),y)
|
|
|
|
MPV_CONF_OPTS += --enable-egl-drm
|
2016-04-27 15:12:02 +02:00
|
|
|
else
|
2021-06-18 21:22:36 +02:00
|
|
|
MPV_CONF_OPTS += --disable-egl-drm
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
MPV_CONF_OPTS += --disable-gbm --disable-egl-drm
|
2016-04-27 15:12:02 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
# jack support
|
2016-04-28 15:20:18 +02:00
|
|
|
# It also requires 64-bit sync intrinsics
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_SYNC_8)$(BR2_PACKAGE_JACK2),yy)
|
2016-04-27 15:12:02 +02:00
|
|
|
MPV_CONF_OPTS += --enable-jack
|
|
|
|
MPV_DEPENDENCIES += jack2
|
|
|
|
else
|
|
|
|
MPV_CONF_OPTS += --disable-jack
|
|
|
|
endif
|
|
|
|
|
|
|
|
# jpeg support
|
|
|
|
ifeq ($(BR2_PACKAGE_JPEG),y)
|
|
|
|
MPV_CONF_OPTS += --enable-jpeg
|
|
|
|
MPV_DEPENDENCIES += jpeg
|
|
|
|
else
|
|
|
|
MPV_CONF_OPTS += --disable-jpeg
|
|
|
|
endif
|
|
|
|
|
|
|
|
# lcms2 support
|
|
|
|
ifeq ($(BR2_PACKAGE_LCMS2),y)
|
|
|
|
MPV_CONF_OPTS += --enable-lcms2
|
|
|
|
MPV_DEPENDENCIES += lcms2
|
|
|
|
else
|
|
|
|
MPV_CONF_OPTS += --disable-lcms2
|
|
|
|
endif
|
|
|
|
|
|
|
|
# libarchive support
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBARCHIVE),y)
|
|
|
|
MPV_CONF_OPTS += --enable-libarchive
|
|
|
|
MPV_DEPENDENCIES += libarchive
|
|
|
|
else
|
|
|
|
MPV_CONF_OPTS += --disable-libarchive
|
|
|
|
endif
|
|
|
|
|
|
|
|
# bluray support
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBBLURAY),y)
|
|
|
|
MPV_CONF_OPTS += --enable-libbluray
|
|
|
|
MPV_DEPENDENCIES += libbluray
|
|
|
|
else
|
|
|
|
MPV_CONF_OPTS += --disable-libbluray
|
|
|
|
endif
|
|
|
|
|
2018-04-01 21:36:53 +02:00
|
|
|
# libcdio-paranoia
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBCDIO_PARANOIA),y)
|
|
|
|
MPV_CONF_OPTS += --enable-cdda
|
|
|
|
MPV_DEPENDENCIES += libcdio-paranoia
|
|
|
|
else
|
|
|
|
MPV_CONF_OPTS += --disable-cdda
|
|
|
|
endif
|
|
|
|
|
2016-04-27 15:12:02 +02:00
|
|
|
# libdvdnav
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBDVDNAV),y)
|
|
|
|
MPV_CONF_OPTS += --enable-dvdnav
|
|
|
|
MPV_DEPENDENCIES += libdvdnav
|
|
|
|
else
|
|
|
|
MPV_CONF_OPTS += --disable-dvdnav
|
|
|
|
endif
|
|
|
|
|
|
|
|
# libdrm
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBDRM),y)
|
|
|
|
MPV_CONF_OPTS += --enable-drm
|
|
|
|
MPV_DEPENDENCIES += libdrm
|
|
|
|
else
|
|
|
|
MPV_CONF_OPTS += --disable-drm
|
|
|
|
endif
|
|
|
|
|
2020-01-18 19:37:32 +01:00
|
|
|
# libvdpau
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBVDPAU),y)
|
|
|
|
MPV_CONF_OPTS += --enable-vdpau
|
|
|
|
MPV_DEPENDENCIES += libvdpau
|
|
|
|
else
|
|
|
|
MPV_CONF_OPTS += --disable-vdpau
|
|
|
|
endif
|
|
|
|
|
2016-04-27 15:12:02 +02:00
|
|
|
# LUA support, only for lua51/lua52/luajit
|
|
|
|
# This enables the controller (OSD) together with libass
|
2018-12-02 11:25:06 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LUA_5_1)$(BR2_PACKAGE_LUAJIT),y)
|
2016-04-27 15:12:02 +02:00
|
|
|
MPV_CONF_OPTS += --enable-lua
|
|
|
|
MPV_DEPENDENCIES += luainterpreter
|
|
|
|
else
|
|
|
|
MPV_CONF_OPTS += --disable-lua
|
|
|
|
endif
|
|
|
|
|
|
|
|
# OpenGL support
|
|
|
|
ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
|
2017-04-24 11:42:18 +02:00
|
|
|
MPV_CONF_OPTS += --enable-gl
|
2016-04-27 15:12:02 +02:00
|
|
|
MPV_DEPENDENCIES += libgl
|
2021-06-18 21:22:35 +02:00
|
|
|
else ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
|
|
|
|
MPV_CONF_OPTS += --enable-gl
|
|
|
|
MPV_DEPENDENCIES += libgles
|
2021-08-20 00:19:29 +02:00
|
|
|
else ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y)
|
|
|
|
MPV_CONF_OPTS += --enable-gl
|
|
|
|
MPV_DEPENDENCIES += libegl
|
2016-04-27 15:12:02 +02:00
|
|
|
else
|
2017-04-24 11:42:18 +02:00
|
|
|
MPV_CONF_OPTS += --disable-gl
|
2016-04-27 15:12:02 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
# pulseaudio support
|
|
|
|
ifeq ($(BR2_PACKAGE_PULSEAUDIO),y)
|
|
|
|
MPV_CONF_OPTS += --enable-pulse
|
|
|
|
MPV_DEPENDENCIES += pulseaudio
|
|
|
|
else
|
|
|
|
MPV_CONF_OPTS += --disable-pulse
|
|
|
|
endif
|
|
|
|
|
|
|
|
# SDL support
|
2019-07-31 08:11:03 +02:00
|
|
|
# Sdl2 requires 64-bit sync intrinsics
|
2016-04-28 15:20:18 +02:00
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_SYNC_8)$(BR2_PACKAGE_SDL2),yy)
|
2019-07-31 08:11:03 +02:00
|
|
|
MPV_CONF_OPTS += --enable-sdl2
|
2016-04-27 15:12:02 +02:00
|
|
|
MPV_DEPENDENCIES += sdl2
|
|
|
|
else
|
2019-07-31 08:11:03 +02:00
|
|
|
MPV_CONF_OPTS += --disable-sdl2
|
2016-04-27 15:12:02 +02:00
|
|
|
endif
|
|
|
|
|
2017-10-24 11:07:40 +02:00
|
|
|
# Raspberry Pi support
|
|
|
|
ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
|
|
|
|
MPV_CONF_OPTS += --enable-rpi --enable-gl
|
2018-01-01 22:44:46 +01:00
|
|
|
MPV_DEPENDENCIES += rpi-userland
|
2017-10-24 11:07:40 +02:00
|
|
|
else
|
|
|
|
MPV_CONF_OPTS += --disable-rpi
|
|
|
|
endif
|
|
|
|
|
2016-04-27 15:12:02 +02:00
|
|
|
# va-api support
|
2021-06-18 21:22:37 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBVA)$(BR2_PACKAGE_MPV_SUPPORTS_VAAPI),yy)
|
2016-04-27 15:12:02 +02:00
|
|
|
MPV_CONF_OPTS += --enable-vaapi
|
|
|
|
MPV_DEPENDENCIES += libva
|
2021-09-14 18:15:11 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBDRM)$(BR2_PACKAGE_MESA3D_OPENGL_EGL),yy)
|
2021-06-18 21:22:37 +02:00
|
|
|
MPV_CONF_OPTS += --enable-vaapi-drm
|
2016-04-27 15:12:02 +02:00
|
|
|
else
|
2021-06-18 21:22:37 +02:00
|
|
|
MPV_CONF_OPTS += --disable-vaapi-drm
|
2016-04-27 15:12:02 +02:00
|
|
|
endif
|
2016-04-28 16:33:07 +02:00
|
|
|
else
|
2021-06-18 21:22:37 +02:00
|
|
|
MPV_CONF_OPTS += --disable-vaapi --disable-vaapi-drm
|
2016-04-28 16:33:07 +02:00
|
|
|
endif
|
2016-04-27 15:12:02 +02:00
|
|
|
|
|
|
|
# wayland support
|
|
|
|
ifeq ($(BR2_PACKAGE_WAYLAND),y)
|
|
|
|
MPV_CONF_OPTS += --enable-wayland
|
2019-08-09 19:26:37 +02:00
|
|
|
MPV_DEPENDENCIES += libxkbcommon wayland wayland-protocols
|
2016-04-27 15:12:02 +02:00
|
|
|
else
|
|
|
|
MPV_CONF_OPTS += --disable-wayland
|
|
|
|
endif
|
|
|
|
|
mpv: fix X11 logic after bump to 0.25.0
Between 0.24.0 and 0.25.0, mpv has changed its logic around the
detection/usage of X11 (in upstream commit
https://github.com/mpv-player/mpv/commit/927afa311d4a89b022305508acbf4e7325fe3928). Instead
of having fine grained option for x11, xext, xinerama, xscreensaver and
xrandr, mpv now requires all five libraries to be available in order to
enable X.org support.
Therefore, this commit adjusts the mpv packaging so that:
1. All necessary X11 libraries are selected if BR2_PACKAGE_XORG7 is
enabled. It would indeed be too cumbersome for the user to know that
all of x11, xext, xinerama, xscreensaver and xrandr are necessary in
order to have X.org support.
2. mpv.mk is simplified by enabling X.org support when
BR2_PACKAGE_XORG7 is enabled.
Fixes:
http://autobuild.buildroot.net/results/b470cfba451ce9ba648e3a2f3ae08429db8bdee9/
(--disable-xss was used to disable xscreensaver support, and this
option no longer exists)
[Peter: reword X11 comment in .mk]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2017-05-08 15:32:51 +02:00
|
|
|
# Base X11 support. Config.in ensures that if BR2_PACKAGE_XORG7 is
|
|
|
|
# enabled, xlib_libX11, xlib_libXext, xlib_libXinerama,
|
|
|
|
# xlib_libXrandr, xlib_libXScrnSaver.
|
|
|
|
ifeq ($(BR2_PACKAGE_XORG7),y)
|
|
|
|
MPV_CONF_OPTS += --enable-x11
|
|
|
|
MPV_DEPENDENCIES += xlib_libX11 xlib_libXext xlib_libXinerama xlib_libXrandr xlib_libXScrnSaver
|
2016-04-27 15:12:02 +02:00
|
|
|
# XVideo
|
|
|
|
ifeq ($(BR2_PACKAGE_XLIB_LIBXV),y)
|
|
|
|
MPV_CONF_OPTS += --enable-xv
|
|
|
|
MPV_DEPENDENCIES += xlib_libXv
|
|
|
|
else
|
|
|
|
MPV_CONF_OPTS += --disable-xv
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
MPV_CONF_OPTS += --disable-x11
|
|
|
|
endif
|
|
|
|
|
2020-08-15 23:57:30 +02:00
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
|
|
|
|
MPV_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -latomic"
|
|
|
|
endif
|
|
|
|
|
2016-10-30 17:02:20 +01:00
|
|
|
$(eval $(waf-package))
|