vlc: bump version to 2.2.3
[buildroot-gz.git] / package / vlc / vlc.mk
blob30887bd2729c2ae81fd6cd7303275354be7095de
1 ################################################################################
3 # vlc
5 ################################################################################
7 VLC_VERSION = 2.2.3
8 VLC_SITE = http://get.videolan.org/vlc/$(VLC_VERSION)
9 VLC_SOURCE = vlc-$(VLC_VERSION).tar.xz
10 VLC_LICENSE = GPLv2+ LGPLv2.1+
11 VLC_LICENSE_FILES = COPYING COPYING.LIB
12 VLC_DEPENDENCIES = host-pkgconf
13 VLC_AUTORECONF = YES
15 # Install vlc libraries in staging.
16 VLC_INSTALL_STAGING = YES
18 # VLC defines two autoconf functions which are also defined by our own pkg.m4
19 # from pkgconf. Unfortunately, they are defined in a different way: VLC adds
20 # --enable- options, but pkg.m4 adds --with- options. To make sure we use
21 # VLC's definition, rename these two functions.
22 define VLC_OVERRIDE_PKG_M4
23 $(SED) 's/PKG_WITH_MODULES/VLC_PKG_WITH_MODULES/g' \
24 -e 's/PKG_HAVE_WITH_MODULES/VLC_PKG_HAVE_WITH_MODULES/g' \
25 $(@D)/configure.ac $(@D)/m4/with_pkg.m4
26 endef
27 VLC_POST_PATCH_HOOKS += VLC_OVERRIDE_PKG_M4
29 VLC_CONF_OPTS += \
30 --disable-gles1 \
31 --disable-a52 \
32 --disable-shout \
33 --disable-twolame \
34 --disable-dca \
35 --disable-schroedinger \
36 --disable-fluidsynth \
37 --disable-zvbi \
38 --disable-kate \
39 --disable-caca \
40 --disable-jack \
41 --disable-samplerate \
42 --disable-chromaprint \
43 --disable-goom \
44 --disable-projectm \
45 --disable-vsxu \
46 --disable-mtp \
47 --disable-mmal-codec \
48 --disable-mmal-vout \
49 --disable-dvdnav \
50 --disable-vpx \
51 --disable-jpeg \
52 --disable-x262 \
53 --disable-x265 \
54 --disable-mfx \
55 --disable-vdpau \
56 --disable-addonmanagermodules \
57 --enable-run-as-root \
59 # Building static and shared doesn't work, so force static off.
60 ifeq ($(BR2_STATIC_LIBS),)
61 VLC_CONF_OPTS += --disable-static
62 endif
64 ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y)
65 VLC_CONF_OPTS += --enable-altivec
66 else
67 VLC_CONF_OPTS += --disable-altivec
68 endif
70 ifeq ($(BR2_X86_CPU_HAS_SSE),y)
71 VLC_CONF_OPTS += --enable-sse
72 else
73 VLC_CONF_OPTS += --disable-sse
74 endif
76 ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
77 VLC_CONF_OPTS += --enable-alsa
78 VLC_DEPENDENCIES += alsa-lib
79 else
80 VLC_CONF_OPTS += --disable-alsa
81 endif
83 # bonjour support needs avahi-client, which needs avahi-daemon and dbus
84 ifeq ($(BR2_PACKAGE_AVAHI)$(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yyy)
85 VLC_CONF_OPTS += --enable-bonjour
86 VLC_DEPENDENCIES += avahi dbus
87 else
88 VLC_CONF_OPTS += --disable-bonjour
89 endif
91 ifeq ($(BR2_PACKAGE_DBUS),y)
92 VLC_CONF_OPTS += --enable-dbus
93 VLC_DEPENDENCIES += dbus
94 else
95 VLC_CONF_OPTS += --disable-dbus
96 endif
98 ifeq ($(BR2_PACKAGE_DIRECTFB),y)
99 VLC_CONF_OPTS += --enable-directfb
100 VLC_CONF_ENV += ac_cv_path_DIRECTFB_CONFIG=$(STAGING_DIR)/usr/bin/directfb-config
101 VLC_DEPENDENCIES += directfb
102 else
103 VLC_CONF_OPTS += --disable-directfb
104 endif
106 ifeq ($(BR2_PACKAGE_FAAD2),y)
107 VLC_CONF_OPTS += --enable-faad
108 VLC_DEPENDENCIES += faad2
109 else
110 VLC_CONF_OPTS += --disable-faad
111 endif
113 ifeq ($(BR2_PACKAGE_FFMPEG),y)
114 VLC_CONF_OPTS += --enable-avcodec
115 VLC_DEPENDENCIES += ffmpeg
116 else
117 VLC_CONF_OPTS += --disable-avcodec
118 endif
120 ifeq ($(BR2_PACKAGE_FFMPEG_POSTPROC),y)
121 VLC_CONF_OPTS += --enable-postproc
122 else
123 VLC_CONF_OPTS += --disable-postproc
124 endif
126 ifeq ($(BR2_PACKAGE_FFMPEG_SWSCALE),y)
127 VLC_CONF_OPTS += --enable-swscale
128 else
129 VLC_CONF_OPTS += --disable-swscale
130 endif
132 ifeq ($(BR2_PACKAGE_FLAC),y)
133 VLC_CONF_OPTS += --enable-flac
134 VLC_DEPENDENCIES += flac
135 else
136 VLC_CONF_OPTS += --disable-flac
137 endif
139 ifeq ($(BR2_PACKAGE_FREERDP),y)
140 VLC_CONF_OPTS += --enable-freerdp
141 VLC_DEPENDENCIES += freerdp
142 else
143 VLC_CONF_OPTS += --disable-libfreerdp
144 endif
146 ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
147 VLC_DEPENDENCIES += libgl
148 endif
150 ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
151 VLC_CONF_OPTS += --enable-gles2
152 VLC_DEPENDENCIES += libgles
153 else
154 VLC_CONF_OPTS += --disable-gles2
155 endif
157 ifeq ($(BR2_PACKAGE_OPENCV)$(BR2_PACKAGE_OPENCV3),y)
158 VLC_CONF_OPTS += --enable-opencv
159 ifeq ($(BR2_PACKAGE_OPENCV),y)
160 VLC_DEPENDENCIES += opencv
161 else
162 VLC_DEPENDENCIES += opencv3
163 endif
164 else
165 VLC_CONF_OPTS += --disable-opencv
166 endif
168 ifeq ($(BR2_PACKAGE_OPUS),y)
169 VLC_CONF_OPTS += --enable-opus
170 VLC_DEPENDENCIES += libvorbis opus
171 else
172 VLC_CONF_OPTS += --disable-opus
173 endif
175 ifeq ($(BR2_PACKAGE_LIBASS),y)
176 VLC_CONF_OPTS += --enable-libass
177 VLC_DEPENDENCIES += libass
178 else
179 VLC_CONF_OPTS += --disable-libass
180 endif
182 ifeq ($(BR2_PACKAGE_LIBBLURAY),y)
183 VLC_CONF_OPTS += --enable-bluray
184 VLC_DEPENDENCIES += libbluray
185 else
186 VLC_CONF_OPTS += --disable-bluray
187 endif
189 ifeq ($(BR2_PACKAGE_LIBCDDB),y)
190 VLC_CONF_OPTS += --enable-libcddb
191 VLC_DEPENDENCIES += libcddb
192 else
193 VLC_CONF_OPTS += --disable-libcddb
194 endif
196 ifeq ($(BR2_PACKAGE_LIBDVBPSI),y)
197 VLC_CONF_OPTS += --enable-dvbpsi
198 VLC_DEPENDENCIES += libdvbpsi
199 else
200 VLC_CONF_OPTS += --disable-dvbpsi
201 endif
203 ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
204 VLC_CONF_OPTS += --enable-libgcrypt
205 VLC_DEPENDENCIES += libgcrypt
206 VLC_CONF_ENV += \
207 GCRYPT_CONFIG="$(STAGING_DIR)/usr/bin/libgcrypt-config"
208 else
209 VLC_CONF_OPTS += --disable-libgcrypt
210 endif
212 ifeq ($(BR2_PACKAGE_LIBMAD),y)
213 VLC_CONF_OPTS += --enable-mad
214 VLC_DEPENDENCIES += libmad
215 else
216 VLC_CONF_OPTS += --disable-mad
217 endif
219 ifeq ($(BR2_PACKAGE_LIBMATROSKA),y)
220 VLC_CONF_OPTS += --enable-mkv
221 VLC_DEPENDENCIES += libmatroska
222 else
223 VLC_CONF_OPTS += --disable-mkv
224 endif
226 ifeq ($(BR2_PACKAGE_LIBMODPLUG),y)
227 VLC_CONF_OPTS += --enable-mod
228 VLC_DEPENDENCIES += libmodplug
229 else
230 VLC_CONF_OPTS += --disable-mod
231 endif
233 ifeq ($(BR2_PACKAGE_LIBMPEG2),y)
234 VLC_CONF_OPTS += --enable-libmpeg2
235 VLC_DEPENDENCIES += libmpeg2
236 else
237 VLC_CONF_OPTS += --disable-libmpeg2
238 endif
240 ifeq ($(BR2_PACKAGE_LIBPNG),y)
241 VLC_CONF_OPTS += --enable-png
242 VLC_DEPENDENCIES += libpng
243 else
244 VLC_CONF_OPTS += --disable-png
245 endif
247 ifeq ($(BR2_PACKAGE_LIBRSVG),y)
248 VLC_CONF_OPTS += --enable-svg --enable-svgdec
249 VLC_DEPENDENCIES += librsvg
250 else
251 VLC_CONF_OPTS += --disable-svg --disable-svgdec
252 endif
254 ifeq ($(BR2_PACKAGE_LIBSSH2),y)
255 VLC_CONF_OPTS += --enable-sftp
256 VLC_DEPENDENCIES += libssh2
257 else
258 VLC_CONF_OPTS += --disable-sftp
259 endif
261 ifeq ($(BR2_PACKAGE_LIBSIDPLAY2),y)
262 VLC_CONF_OPTS += --enable-sid
263 VLC_DEPENDENCIES += libsidplay2
264 else
265 VLC_CONF_OPTS += --disable-sid
266 endif
268 ifeq ($(BR2_PACKAGE_LIBTHEORA),y)
269 VLC_CONF_OPTS += --enable-theora
270 VLC_DEPENDENCIES += libtheora
271 else
272 VLC_CONF_OPTS += --disable-theora
273 endif
275 ifeq ($(BR2_PACKAGE_LIBUPNP),y)
276 VLC_CONF_OPTS += --enable-upnp
277 VLC_DEPENDENCIES += libupnp
278 else
279 VLC_CONF_OPTS += --disable-upnp
280 endif
282 ifeq ($(BR2_PACKAGE_LIBVNCSERVER),y)
283 VLC_CONF_OPTS += --enable-vnc
284 VLC_DEPENDENCIES += libvncserver
285 else
286 VLC_CONF_OPTS += --disable-vnc
287 endif
289 ifeq ($(BR2_PACKAGE_LIBVORBIS),y)
290 VLC_CONF_OPTS += --enable-vorbis
291 VLC_DEPENDENCIES += libvorbis
292 else
293 VLC_CONF_OPTS += --disable-vorbis
294 endif
296 ifeq ($(BR2_PACKAGE_LIBV4L),y)
297 VLC_CONF_OPTS += --enable-v4l2
298 VLC_DEPENDENCIES += libv4l
299 else
300 VLC_CONF_OPTS += --disable-v4l2
301 endif
303 ifeq ($(BR2_PACKAGE_LIBXCB),y)
304 VLC_CONF_OPTS += --enable-xcb
305 VLC_DEPENDENCIES += libxcb
306 else
307 VLC_CONF_OPTS += --disable-xcb
308 endif
310 ifeq ($(BR2_PACKAGE_LIBXML2),y)
311 VLC_CONF_OPTS += --enable-libxml2
312 VLC_DEPENDENCIES += libxml2
313 else
314 VLC_CONF_OPTS += --disable-libxml2
315 endif
317 ifeq ($(BR2_PACKAGE_LIVE555),y)
318 VLC_CONF_OPTS += --enable-live555
319 VLC_DEPENDENCIES += live555
320 VLC_CONF_ENV += \
321 LIVE555_CFLAGS="\
322 -I$(STAGING_DIR)/usr/include/BasicUsageEnvironment \
323 -I$(STAGING_DIR)/usr/include/groupsock \
324 -I$(STAGING_DIR)/usr/include/liveMedia \
325 -I$(STAGING_DIR)/usr/include/UsageEnvironment \
327 LIVE555_LIBS="-L$(STAGING_DIR)/usr/lib -lliveMedia"
328 else
329 VLC_CONF_OPTS += --disable-live555
330 endif
332 ifeq ($(BR2_PACKAGE_LUA),y)
333 VLC_CONF_OPTS += --enable-lua
334 VLC_DEPENDENCIES += lua host-lua
335 else
336 VLC_CONF_OPTS += --disable-lua
337 endif
339 ifeq ($(BR2_PACKAGE_MINIZIP),y)
340 VLC_DEPENDENCIES += minizip
341 endif
343 ifeq ($(BR2_PACKAGE_MUSEPACK),y)
344 VLC_CONF_OPTS += --enable-mpc
345 VLC_DEPENDENCIES += musepack
346 else
347 VLC_CONF_OPTS += --disable-mpc
348 endif
350 ifeq ($(BR2_PACKAGE_QT_GUI_MODULE),y)
351 VLC_CONF_OPTS += --enable-qt
352 VLC_CONF_ENV += \
353 ac_cv_path_MOC=$(HOST_DIR)/usr/bin/moc \
354 ac_cv_path_RCC=$(HOST_DIR)/usr/bin/rcc \
355 ac_cv_path_UIC=$(HOST_DIR)/usr/bin/uic
356 VLC_DEPENDENCIES += qt
357 else
358 VLC_CONF_OPTS += --disable-qt
359 endif
361 ifeq ($(BR2_PACKAGE_SDL_X11),y)
362 VLC_CONF_OPTS += --enable-sdl
363 VLC_DEPENDENCIES += sdl
364 else
365 VLC_CONF_OPTS += --disable-sdl
366 endif
368 ifeq ($(BR2_PACKAGE_SDL_IMAGE),y)
369 VLC_CONF_OPTS += --enable-sdl-image
370 VLC_DEPENDENCIES += sdl_image
371 else
372 VLC_CONF_OPTS += --disable-sdl-image
373 endif
375 ifeq ($(BR2_PACKAGE_SPEEX),y)
376 VLC_CONF_OPTS += --enable-speex
377 VLC_DEPENDENCIES += speex
378 else
379 VLC_CONF_OPTS += --disable-speex
380 endif
382 ifeq ($(BR2_PACKAGE_TAGLIB),y)
383 VLC_CONF_OPTS += --enable-taglib
384 VLC_DEPENDENCIES += taglib
385 else
386 VLC_CONF_OPTS += --disable-taglib
387 endif
389 ifeq ($(BR2_PACKAGE_TREMOR),y)
390 VLC_CONF_OPTS += --enable-tremor
391 VLC_DEPENDENCIES += tremor
392 else
393 VLC_CONF_OPTS += --disable-tremor
394 endif
396 ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
397 VLC_CONF_OPTS += --enable-udev
398 VLC_DEPENDENCIES += udev
399 else
400 VLC_CONF_OPTS += --disable-udev
401 endif
403 ifeq ($(BR2_PACKAGE_XCB_UTIL_KEYSYMS),y)
404 VLC_CONF_OPTS += --enable-xcb
405 VLC_DEPENDENCIES += xcb-util-keysyms
406 else
407 VLC_CONF_OPTS += --disable-xcb
408 endif
410 ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y)
411 VLC_CONF_OPTS += --with-x
412 VLC_DEPENDENCIES += xlib_libX11
413 else
414 VLC_CONF_OPTS += --without-x
415 endif
417 ifeq ($(BR2_PACKAGE_ZLIB),y)
418 VLC_DEPENDENCIES += zlib
419 endif
421 $(eval $(autotools-package))