1*4882a593Smuzhiyun################################################################################ 2*4882a593Smuzhiyun# 3*4882a593Smuzhiyun# mpv 4*4882a593Smuzhiyun# 5*4882a593Smuzhiyun################################################################################ 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunMPV_VERSION = 0.33.1 8*4882a593SmuzhiyunMPV_SITE = $(call github,mpv-player,mpv,v$(MPV_VERSION)) 9*4882a593SmuzhiyunMPV_DEPENDENCIES = \ 10*4882a593Smuzhiyun host-pkgconf ffmpeg libass zlib \ 11*4882a593Smuzhiyun $(if $(BR2_PACKAGE_LIBICONV),libiconv) 12*4882a593SmuzhiyunMPV_LICENSE = GPL-2.0+ 13*4882a593SmuzhiyunMPV_LICENSE_FILES = LICENSE.GPL 14*4882a593SmuzhiyunMPV_CPE_ID_VENDOR = mpv 15*4882a593SmuzhiyunMPV_INSTALL_STAGING = YES 16*4882a593Smuzhiyun 17*4882a593SmuzhiyunMPV_NEEDS_EXTERNAL_WAF = YES 18*4882a593Smuzhiyun 19*4882a593Smuzhiyun# Some of these options need testing and/or tweaks 20*4882a593SmuzhiyunMPV_CONF_OPTS = \ 21*4882a593Smuzhiyun --prefix=/usr \ 22*4882a593Smuzhiyun --disable-android \ 23*4882a593Smuzhiyun --disable-caca \ 24*4882a593Smuzhiyun --disable-cocoa \ 25*4882a593Smuzhiyun --disable-coreaudio \ 26*4882a593Smuzhiyun --disable-cuda-hwaccel \ 27*4882a593Smuzhiyun --disable-opensles \ 28*4882a593Smuzhiyun --disable-rubberband \ 29*4882a593Smuzhiyun --disable-uchardet \ 30*4882a593Smuzhiyun --disable-vapoursynth 31*4882a593Smuzhiyun 32*4882a593Smuzhiyunifeq ($(BR2_REPRODUCIBLE),y) 33*4882a593SmuzhiyunMPV_CONF_OPTS += --disable-build-date 34*4882a593Smuzhiyunendif 35*4882a593Smuzhiyun 36*4882a593Smuzhiyunifeq ($(BR2_STATIC_LIBS),y) 37*4882a593SmuzhiyunMPV_CONF_OPTS += --disable-libmpv-shared --enable-libmpv-static 38*4882a593Smuzhiyunelse 39*4882a593SmuzhiyunMPV_CONF_OPTS += --enable-libmpv-shared --disable-libmpv-static 40*4882a593Smuzhiyunendif 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun# ALSA support requires pcm+mixer 43*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_ALSA_LIB_MIXER)$(BR2_PACKAGE_ALSA_LIB_PCM),yy) 44*4882a593SmuzhiyunMPV_CONF_OPTS += --enable-alsa 45*4882a593SmuzhiyunMPV_DEPENDENCIES += alsa-lib 46*4882a593Smuzhiyunelse 47*4882a593SmuzhiyunMPV_CONF_OPTS += --disable-alsa 48*4882a593Smuzhiyunendif 49*4882a593Smuzhiyun 50*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_MESA3D_GBM),y) 51*4882a593SmuzhiyunMPV_CONF_OPTS += --enable-gbm 52*4882a593SmuzhiyunMPV_DEPENDENCIES += mesa3d 53*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBDRM),y) 54*4882a593SmuzhiyunMPV_CONF_OPTS += --enable-egl-drm 55*4882a593Smuzhiyunelse 56*4882a593SmuzhiyunMPV_CONF_OPTS += --disable-egl-drm 57*4882a593Smuzhiyunendif 58*4882a593Smuzhiyunelse 59*4882a593SmuzhiyunMPV_CONF_OPTS += --disable-gbm --disable-egl-drm 60*4882a593Smuzhiyunendif 61*4882a593Smuzhiyun 62*4882a593Smuzhiyun# jack support 63*4882a593Smuzhiyun# It also requires 64-bit sync intrinsics 64*4882a593Smuzhiyunifeq ($(BR2_TOOLCHAIN_HAS_SYNC_8)$(BR2_PACKAGE_JACK2),yy) 65*4882a593SmuzhiyunMPV_CONF_OPTS += --enable-jack 66*4882a593SmuzhiyunMPV_DEPENDENCIES += jack2 67*4882a593Smuzhiyunelse 68*4882a593SmuzhiyunMPV_CONF_OPTS += --disable-jack 69*4882a593Smuzhiyunendif 70*4882a593Smuzhiyun 71*4882a593Smuzhiyun# jpeg support 72*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_JPEG),y) 73*4882a593SmuzhiyunMPV_CONF_OPTS += --enable-jpeg 74*4882a593SmuzhiyunMPV_DEPENDENCIES += jpeg 75*4882a593Smuzhiyunelse 76*4882a593SmuzhiyunMPV_CONF_OPTS += --disable-jpeg 77*4882a593Smuzhiyunendif 78*4882a593Smuzhiyun 79*4882a593Smuzhiyun# lcms2 support 80*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LCMS2),y) 81*4882a593SmuzhiyunMPV_CONF_OPTS += --enable-lcms2 82*4882a593SmuzhiyunMPV_DEPENDENCIES += lcms2 83*4882a593Smuzhiyunelse 84*4882a593SmuzhiyunMPV_CONF_OPTS += --disable-lcms2 85*4882a593Smuzhiyunendif 86*4882a593Smuzhiyun 87*4882a593Smuzhiyun# libarchive support 88*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBARCHIVE),y) 89*4882a593SmuzhiyunMPV_CONF_OPTS += --enable-libarchive 90*4882a593SmuzhiyunMPV_DEPENDENCIES += libarchive 91*4882a593Smuzhiyunelse 92*4882a593SmuzhiyunMPV_CONF_OPTS += --disable-libarchive 93*4882a593Smuzhiyunendif 94*4882a593Smuzhiyun 95*4882a593Smuzhiyun# bluray support 96*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBBLURAY),y) 97*4882a593SmuzhiyunMPV_CONF_OPTS += --enable-libbluray 98*4882a593SmuzhiyunMPV_DEPENDENCIES += libbluray 99*4882a593Smuzhiyunelse 100*4882a593SmuzhiyunMPV_CONF_OPTS += --disable-libbluray 101*4882a593Smuzhiyunendif 102*4882a593Smuzhiyun 103*4882a593Smuzhiyun# libcdio-paranoia 104*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBCDIO_PARANOIA),y) 105*4882a593SmuzhiyunMPV_CONF_OPTS += --enable-cdda 106*4882a593SmuzhiyunMPV_DEPENDENCIES += libcdio-paranoia 107*4882a593Smuzhiyunelse 108*4882a593SmuzhiyunMPV_CONF_OPTS += --disable-cdda 109*4882a593Smuzhiyunendif 110*4882a593Smuzhiyun 111*4882a593Smuzhiyun# libdvdnav 112*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBDVDNAV),y) 113*4882a593SmuzhiyunMPV_CONF_OPTS += --enable-dvdnav 114*4882a593SmuzhiyunMPV_DEPENDENCIES += libdvdnav 115*4882a593Smuzhiyunelse 116*4882a593SmuzhiyunMPV_CONF_OPTS += --disable-dvdnav 117*4882a593Smuzhiyunendif 118*4882a593Smuzhiyun 119*4882a593Smuzhiyun# libdrm 120*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBDRM),y) 121*4882a593SmuzhiyunMPV_CONF_OPTS += --enable-drm 122*4882a593SmuzhiyunMPV_DEPENDENCIES += libdrm 123*4882a593Smuzhiyunelse 124*4882a593SmuzhiyunMPV_CONF_OPTS += --disable-drm 125*4882a593Smuzhiyunendif 126*4882a593Smuzhiyun 127*4882a593Smuzhiyun# libvdpau 128*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBVDPAU),y) 129*4882a593SmuzhiyunMPV_CONF_OPTS += --enable-vdpau 130*4882a593SmuzhiyunMPV_DEPENDENCIES += libvdpau 131*4882a593Smuzhiyunelse 132*4882a593SmuzhiyunMPV_CONF_OPTS += --disable-vdpau 133*4882a593Smuzhiyunendif 134*4882a593Smuzhiyun 135*4882a593Smuzhiyun# LUA support, only for lua51/lua52/luajit 136*4882a593Smuzhiyun# This enables the controller (OSD) together with libass 137*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LUA_5_1)$(BR2_PACKAGE_LUAJIT),y) 138*4882a593SmuzhiyunMPV_CONF_OPTS += --enable-lua 139*4882a593SmuzhiyunMPV_DEPENDENCIES += luainterpreter 140*4882a593Smuzhiyunelse 141*4882a593SmuzhiyunMPV_CONF_OPTS += --disable-lua 142*4882a593Smuzhiyunendif 143*4882a593Smuzhiyun 144*4882a593Smuzhiyun# OpenGL support 145*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_HAS_LIBGL),y) 146*4882a593SmuzhiyunMPV_CONF_OPTS += --enable-gl 147*4882a593SmuzhiyunMPV_DEPENDENCIES += libgl 148*4882a593Smuzhiyunelse ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y) 149*4882a593SmuzhiyunMPV_CONF_OPTS += --enable-gl 150*4882a593SmuzhiyunMPV_DEPENDENCIES += libgles 151*4882a593Smuzhiyunelse ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y) 152*4882a593SmuzhiyunMPV_CONF_OPTS += --enable-gl 153*4882a593SmuzhiyunMPV_DEPENDENCIES += libegl 154*4882a593Smuzhiyunelse 155*4882a593SmuzhiyunMPV_CONF_OPTS += --disable-gl 156*4882a593Smuzhiyunendif 157*4882a593Smuzhiyun 158*4882a593Smuzhiyun# pulseaudio support 159*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_PULSEAUDIO),y) 160*4882a593SmuzhiyunMPV_CONF_OPTS += --enable-pulse 161*4882a593SmuzhiyunMPV_DEPENDENCIES += pulseaudio 162*4882a593Smuzhiyunelse 163*4882a593SmuzhiyunMPV_CONF_OPTS += --disable-pulse 164*4882a593Smuzhiyunendif 165*4882a593Smuzhiyun 166*4882a593Smuzhiyun# SDL support 167*4882a593Smuzhiyun# Sdl2 requires 64-bit sync intrinsics 168*4882a593Smuzhiyunifeq ($(BR2_TOOLCHAIN_HAS_SYNC_8)$(BR2_PACKAGE_SDL2),yy) 169*4882a593SmuzhiyunMPV_CONF_OPTS += --enable-sdl2 170*4882a593SmuzhiyunMPV_DEPENDENCIES += sdl2 171*4882a593Smuzhiyunelse 172*4882a593SmuzhiyunMPV_CONF_OPTS += --disable-sdl2 173*4882a593Smuzhiyunendif 174*4882a593Smuzhiyun 175*4882a593Smuzhiyun# Raspberry Pi support 176*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_RPI_USERLAND),y) 177*4882a593SmuzhiyunMPV_CONF_OPTS += --enable-rpi --enable-gl 178*4882a593SmuzhiyunMPV_DEPENDENCIES += rpi-userland 179*4882a593Smuzhiyunelse 180*4882a593SmuzhiyunMPV_CONF_OPTS += --disable-rpi 181*4882a593Smuzhiyunendif 182*4882a593Smuzhiyun 183*4882a593Smuzhiyun# va-api support 184*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBVA)$(BR2_PACKAGE_MPV_SUPPORTS_VAAPI),yy) 185*4882a593SmuzhiyunMPV_CONF_OPTS += --enable-vaapi 186*4882a593SmuzhiyunMPV_DEPENDENCIES += libva 187*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_LIBDRM)$(BR2_PACKAGE_MESA3D_OPENGL_EGL),yy) 188*4882a593SmuzhiyunMPV_CONF_OPTS += --enable-vaapi-drm 189*4882a593Smuzhiyunelse 190*4882a593SmuzhiyunMPV_CONF_OPTS += --disable-vaapi-drm 191*4882a593Smuzhiyunendif 192*4882a593Smuzhiyunelse 193*4882a593SmuzhiyunMPV_CONF_OPTS += --disable-vaapi --disable-vaapi-drm 194*4882a593Smuzhiyunendif 195*4882a593Smuzhiyun 196*4882a593Smuzhiyun# wayland support 197*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_WAYLAND),y) 198*4882a593SmuzhiyunMPV_CONF_OPTS += --enable-wayland 199*4882a593SmuzhiyunMPV_DEPENDENCIES += libxkbcommon wayland wayland-protocols 200*4882a593Smuzhiyunelse 201*4882a593SmuzhiyunMPV_CONF_OPTS += --disable-wayland 202*4882a593Smuzhiyunendif 203*4882a593Smuzhiyun 204*4882a593Smuzhiyun# Base X11 support. Config.in ensures that if BR2_PACKAGE_XORG7 is 205*4882a593Smuzhiyun# enabled, xlib_libX11, xlib_libXext, xlib_libXinerama, 206*4882a593Smuzhiyun# xlib_libXrandr, xlib_libXScrnSaver. 207*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_XORG7),y) 208*4882a593SmuzhiyunMPV_CONF_OPTS += --enable-x11 209*4882a593SmuzhiyunMPV_DEPENDENCIES += xlib_libX11 xlib_libXext xlib_libXinerama xlib_libXrandr xlib_libXScrnSaver 210*4882a593Smuzhiyun# XVideo 211*4882a593Smuzhiyunifeq ($(BR2_PACKAGE_XLIB_LIBXV),y) 212*4882a593SmuzhiyunMPV_CONF_OPTS += --enable-xv 213*4882a593SmuzhiyunMPV_DEPENDENCIES += xlib_libXv 214*4882a593Smuzhiyunelse 215*4882a593SmuzhiyunMPV_CONF_OPTS += --disable-xv 216*4882a593Smuzhiyunendif 217*4882a593Smuzhiyunelse 218*4882a593SmuzhiyunMPV_CONF_OPTS += --disable-x11 219*4882a593Smuzhiyunendif 220*4882a593Smuzhiyun 221*4882a593Smuzhiyunifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) 222*4882a593SmuzhiyunMPV_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -latomic" 223*4882a593Smuzhiyunendif 224*4882a593Smuzhiyun 225*4882a593Smuzhiyun$(eval $(waf-package)) 226