python-cryptography: bump to version 1.7.2
[buildroot-gz.git] / package / mpv / mpv.mk
blob5b83b6d942f4dd0982c560ca75b94da13a506d7c
1 ################################################################################
3 # mpv
5 ################################################################################
7 MPV_VERSION = 0.23.0
8 MPV_SITE = https://github.com/mpv-player/mpv/archive
9 MPV_SOURCE = v$(MPV_VERSION).tar.gz
10 MPV_DEPENDENCIES = \
11 host-pkgconf ffmpeg zlib \
12 $(if $(BR2_PACKAGE_LIBICONV),libiconv)
13 MPV_LICENSE = GPLv2+
14 MPV_LICENSE_FILES = LICENSE
16 MPV_NEEDS_EXTERNAL_WAF = YES
18 # Some of these options need testing and/or tweaks
19 MPV_CONF_OPTS = \
20 --prefix=/usr \
21 --disable-android \
22 --disable-caca \
23 --disable-cdda \
24 --disable-cocoa \
25 --disable-coreaudio \
26 --disable-libv4l2 \
27 --disable-opensles \
28 --disable-rpi \
29 --disable-rsound \
30 --disable-rubberband \
31 --disable-uchardet \
32 --disable-vapoursynth \
33 --disable-vapoursynth-lazy \
34 --disable-vdpau
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
40 else
41 MPV_CONF_OPTS += --disable-alsa
42 endif
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
48 else
49 MPV_CONF_OPTS += --disable-gbm
50 endif
52 # jack support
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
57 else
58 MPV_CONF_OPTS += --disable-jack
59 endif
61 # jpeg support
62 ifeq ($(BR2_PACKAGE_JPEG),y)
63 MPV_CONF_OPTS += --enable-jpeg
64 MPV_DEPENDENCIES += jpeg
65 else
66 MPV_CONF_OPTS += --disable-jpeg
67 endif
69 # lcms2 support
70 ifeq ($(BR2_PACKAGE_LCMS2),y)
71 MPV_CONF_OPTS += --enable-lcms2
72 MPV_DEPENDENCIES += lcms2
73 else
74 MPV_CONF_OPTS += --disable-lcms2
75 endif
77 # libarchive support
78 ifeq ($(BR2_PACKAGE_LIBARCHIVE),y)
79 MPV_CONF_OPTS += --enable-libarchive
80 MPV_DEPENDENCIES += libarchive
81 else
82 MPV_CONF_OPTS += --disable-libarchive
83 endif
85 # libass subtitle support
86 ifeq ($(BR2_PACKAGE_LIBASS),y)
87 MPV_CONF_OPTS += --enable-libass
88 MPV_DEPENDENCIES += libass
89 else
90 MPV_CONF_OPTS += --disable-libass
91 endif
93 # bluray support
94 ifeq ($(BR2_PACKAGE_LIBBLURAY),y)
95 MPV_CONF_OPTS += --enable-libbluray
96 MPV_DEPENDENCIES += libbluray
97 else
98 MPV_CONF_OPTS += --disable-libbluray
99 endif
101 # libdvdnav
102 ifeq ($(BR2_PACKAGE_LIBDVDNAV),y)
103 MPV_CONF_OPTS += --enable-dvdnav
104 MPV_DEPENDENCIES += libdvdnav
105 else
106 MPV_CONF_OPTS += --disable-dvdnav
107 endif
109 # libdvdread
110 ifeq ($(BR2_PACKAGE_LIBDVDREAD),y)
111 MPV_CONF_OPTS += --enable-dvdread
112 MPV_DEPENDENCIES += libdvdread
113 else
114 MPV_CONF_OPTS += --disable-dvdread
115 endif
117 # libdrm
118 ifeq ($(BR2_PACKAGE_LIBDRM),y)
119 MPV_CONF_OPTS += --enable-drm
120 MPV_DEPENDENCIES += libdrm
121 else
122 MPV_CONF_OPTS += --disable-drm
123 endif
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
130 else
131 MPV_CONF_OPTS += --disable-lua
132 endif
134 # OpenGL support
135 ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
136 MPV_CONF_OPTS += --enable-gl --enable-standard-gl
137 MPV_DEPENDENCIES += libgl
138 else
139 MPV_CONF_OPTS += --disable-gl --disable-standard-gl
140 endif
142 # pulseaudio support
143 ifeq ($(BR2_PACKAGE_PULSEAUDIO),y)
144 MPV_CONF_OPTS += --enable-pulse
145 MPV_DEPENDENCIES += pulseaudio
146 else
147 MPV_CONF_OPTS += --disable-pulse
148 endif
150 # samba support
151 ifeq ($(BR2_PACKAGE_SAMBA4),y)
152 MPV_CONF_OPTS += --enable-libsmbclient
153 MPV_DEPENDENCIES += samba4
154 else
155 MPV_CONF_OPTS += --disable-libsmbclient
156 endif
158 # SDL support
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
167 else
168 MPV_CONF_OPTS += --disable-sdl1 --disable-sdl2
169 endif
171 # va-api support
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
178 else
179 MPV_CONF_OPTS += --disable-vaapi
180 endif
181 else
182 MPV_CONF_OPTS += --disable-vaapi
183 endif
185 # wayland support
186 ifeq ($(BR2_PACKAGE_WAYLAND),y)
187 MPV_CONF_OPTS += --enable-wayland
188 MPV_DEPENDENCIES += libxkbcommon wayland
189 else
190 MPV_CONF_OPTS += --disable-wayland
191 endif
193 # Base X11 support
194 ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y)
195 MPV_CONF_OPTS += --enable-x11 --disable-xss
196 MPV_DEPENDENCIES += xlib_libX11
197 # xext
198 ifeq ($(BR2_PACKAGE_XLIB_LIBXEXT),y)
199 MPV_CONF_OPTS += --enable-xext
200 MPV_DEPENDENCIES += xlib_libXext
201 else
202 MPV_CONF_OPTS += --disable-xext
203 endif
204 # xinerama
205 ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y)
206 MPV_CONF_OPTS += --enable-xinerama
207 MPV_DEPENDENCIES += xlib_libXinerama
208 else
209 MPV_CONF_OPTS += --disable-xinerama
210 endif
211 # xrandr
212 ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y)
213 MPV_CONF_OPTS += --enable-xrandr
214 MPV_DEPENDENCIES += xlib_libXrandr
215 else
216 MPV_CONF_OPTS += --disable-xrandr
217 endif
218 # XVideo
219 ifeq ($(BR2_PACKAGE_XLIB_LIBXV),y)
220 MPV_CONF_OPTS += --enable-xv
221 MPV_DEPENDENCIES += xlib_libXv
222 else
223 MPV_CONF_OPTS += --disable-xv
224 endif
225 else
226 MPV_CONF_OPTS += --disable-x11
227 endif
229 $(eval $(waf-package))