1 ################################################################################
5 ################################################################################
8 MPV_SITE
= https
://github.com
/mpv-player
/mpv
/archive
9 MPV_SOURCE
= v
$(MPV_VERSION
).
tar.gz
11 host-pkgconf ffmpeg zlib \
12 $(if
$(BR2_PACKAGE_LIBICONV
),libiconv
)
14 MPV_LICENSE_FILES
= LICENSE
16 MPV_NEEDS_EXTERNAL_WAF
= YES
18 # Some of these options need testing and/or tweaks
30 --disable-rubberband \
32 --disable-vapoursynth \
33 --disable-vapoursynth-lazy \
36 # ALSA support requires pcm+mixer
37 ifeq ($(BR2_PACKAGE_ALSA_LIB_MIXER
)$(BR2_PACKAGE_ALSA_LIB_PCM
),yy
)
38 MPV_CONF_OPTS
+= --enable-alsa
39 MPV_DEPENDENCIES
+= alsa-lib
41 MPV_CONF_OPTS
+= --disable-alsa
44 # GBM support is provided by mesa3d when EGL=y
45 ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL
),y
)
46 MPV_CONF_OPTS
+= --enable-gbm
47 MPV_DEPENDENCIES
+= mesa3d
49 MPV_CONF_OPTS
+= --disable-gbm
53 # It also requires 64-bit sync intrinsics
54 ifeq ($(BR2_TOOLCHAIN_HAS_SYNC_8
)$(BR2_PACKAGE_JACK2
),yy
)
55 MPV_CONF_OPTS
+= --enable-jack
56 MPV_DEPENDENCIES
+= jack2
58 MPV_CONF_OPTS
+= --disable-jack
62 ifeq ($(BR2_PACKAGE_JPEG
),y
)
63 MPV_CONF_OPTS
+= --enable-jpeg
64 MPV_DEPENDENCIES
+= jpeg
66 MPV_CONF_OPTS
+= --disable-jpeg
70 ifeq ($(BR2_PACKAGE_LCMS2
),y
)
71 MPV_CONF_OPTS
+= --enable-lcms2
72 MPV_DEPENDENCIES
+= lcms2
74 MPV_CONF_OPTS
+= --disable-lcms2
78 ifeq ($(BR2_PACKAGE_LIBARCHIVE
),y
)
79 MPV_CONF_OPTS
+= --enable-libarchive
80 MPV_DEPENDENCIES
+= libarchive
82 MPV_CONF_OPTS
+= --disable-libarchive
85 # libass subtitle support
86 ifeq ($(BR2_PACKAGE_LIBASS
),y
)
87 MPV_CONF_OPTS
+= --enable-libass
88 MPV_DEPENDENCIES
+= libass
90 MPV_CONF_OPTS
+= --disable-libass
94 ifeq ($(BR2_PACKAGE_LIBBLURAY
),y
)
95 MPV_CONF_OPTS
+= --enable-libbluray
96 MPV_DEPENDENCIES
+= libbluray
98 MPV_CONF_OPTS
+= --disable-libbluray
102 ifeq ($(BR2_PACKAGE_LIBDVDNAV
),y
)
103 MPV_CONF_OPTS
+= --enable-dvdnav
104 MPV_DEPENDENCIES
+= libdvdnav
106 MPV_CONF_OPTS
+= --disable-dvdnav
110 ifeq ($(BR2_PACKAGE_LIBDVDREAD
),y
)
111 MPV_CONF_OPTS
+= --enable-dvdread
112 MPV_DEPENDENCIES
+= libdvdread
114 MPV_CONF_OPTS
+= --disable-dvdread
118 ifeq ($(BR2_PACKAGE_LIBDRM
),y
)
119 MPV_CONF_OPTS
+= --enable-drm
120 MPV_DEPENDENCIES
+= libdrm
122 MPV_CONF_OPTS
+= --disable-drm
125 # LUA support, only for lua51/lua52/luajit
126 # This enables the controller (OSD) together with libass
127 ifeq ($(BR2_PACKAGE_LUA_5_1
)$(BR2_PACKAGE_LUA_5_2
)$(BR2_PACKAGE_LUAJIT
),y
)
128 MPV_CONF_OPTS
+= --enable-lua
129 MPV_DEPENDENCIES
+= luainterpreter
131 MPV_CONF_OPTS
+= --disable-lua
135 ifeq ($(BR2_PACKAGE_HAS_LIBGL
),y
)
136 MPV_CONF_OPTS
+= --enable-gl
--enable-standard-gl
137 MPV_DEPENDENCIES
+= libgl
139 MPV_CONF_OPTS
+= --disable-gl
--disable-standard-gl
143 ifeq ($(BR2_PACKAGE_PULSEAUDIO
),y
)
144 MPV_CONF_OPTS
+= --enable-pulse
145 MPV_DEPENDENCIES
+= pulseaudio
147 MPV_CONF_OPTS
+= --disable-pulse
151 ifeq ($(BR2_PACKAGE_SAMBA4
),y
)
152 MPV_CONF_OPTS
+= --enable-libsmbclient
153 MPV_DEPENDENCIES
+= samba4
155 MPV_CONF_OPTS
+= --disable-libsmbclient
159 # Both can't be used at the same time, prefer newer API
160 # It also requires 64-bit sync intrinsics
161 ifeq ($(BR2_TOOLCHAIN_HAS_SYNC_8
)$(BR2_PACKAGE_SDL2
),yy
)
162 MPV_CONF_OPTS
+= --enable-sdl2
--disable-sdl1
163 MPV_DEPENDENCIES
+= sdl2
164 else ifeq ($(BR2_TOOLCHAIN_HAS_SYNC_8
)$(BR2_PACKAGE_SDL
),yy
)
165 MPV_CONF_OPTS
+= --enable-sdl1
--disable-sdl2
166 MPV_DEPENDENCIES
+= sdl
168 MPV_CONF_OPTS
+= --disable-sdl1
--disable-sdl2
172 # This requires one or more of the egl-drm, wayland, x11 backends
173 # For now we support wayland and x11
174 ifeq ($(BR2_PACKAGE_LIBVA
),y
)
175 ifneq ($(BR2_PACKAGE_WAYLAND
)$(BR2_PACKAGE_XLIB_LIBX11
),)
176 MPV_CONF_OPTS
+= --enable-vaapi
177 MPV_DEPENDENCIES
+= libva
179 MPV_CONF_OPTS
+= --disable-vaapi
182 MPV_CONF_OPTS
+= --disable-vaapi
186 ifeq ($(BR2_PACKAGE_WAYLAND
),y
)
187 MPV_CONF_OPTS
+= --enable-wayland
188 MPV_DEPENDENCIES
+= libxkbcommon wayland
190 MPV_CONF_OPTS
+= --disable-wayland
194 ifeq ($(BR2_PACKAGE_XLIB_LIBX11
),y
)
195 MPV_CONF_OPTS
+= --enable-x11
--disable-xss
196 MPV_DEPENDENCIES
+= xlib_libX11
198 ifeq ($(BR2_PACKAGE_XLIB_LIBXEXT
),y
)
199 MPV_CONF_OPTS
+= --enable-xext
200 MPV_DEPENDENCIES
+= xlib_libXext
202 MPV_CONF_OPTS
+= --disable-xext
205 ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA
),y
)
206 MPV_CONF_OPTS
+= --enable-xinerama
207 MPV_DEPENDENCIES
+= xlib_libXinerama
209 MPV_CONF_OPTS
+= --disable-xinerama
212 ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR
),y
)
213 MPV_CONF_OPTS
+= --enable-xrandr
214 MPV_DEPENDENCIES
+= xlib_libXrandr
216 MPV_CONF_OPTS
+= --disable-xrandr
219 ifeq ($(BR2_PACKAGE_XLIB_LIBXV
),y
)
220 MPV_CONF_OPTS
+= --enable-xv
221 MPV_DEPENDENCIES
+= xlib_libXv
223 MPV_CONF_OPTS
+= --disable-xv
226 MPV_CONF_OPTS
+= --disable-x11
229 $(eval
$(waf-package
))