python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / vlc / vlc.mk
blob583edf3659ac0a8a202e3a41eff2ec2dc75add27
1 ################################################################################
3 # vlc
5 ################################################################################
7 VLC_VERSION = 2.2.4
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 # gcc bug internal compiler error: in merge_overlapping_regs, at
19 # regrename.c:304. This bug is fixed since gcc 6.
20 ifeq ($(BR2_microblaze):$(BR2_TOOLCHAIN_GCC_AT_LEAST_6),y:)
21 VLC_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -O0"
22 VLC_CONF_OPTS += --disable-optimizations
23 endif
25 # VLC defines two autoconf functions which are also defined by our own pkg.m4
26 # from pkgconf. Unfortunately, they are defined in a different way: VLC adds
27 # --enable- options, but pkg.m4 adds --with- options. To make sure we use
28 # VLC's definition, rename these two functions.
29 define VLC_OVERRIDE_PKG_M4
30 $(SED) 's/PKG_WITH_MODULES/VLC_PKG_WITH_MODULES/g' \
31 -e 's/PKG_HAVE_WITH_MODULES/VLC_PKG_HAVE_WITH_MODULES/g' \
32 $(@D)/configure.ac $(@D)/m4/with_pkg.m4
33 endef
34 VLC_POST_PATCH_HOOKS += VLC_OVERRIDE_PKG_M4
36 VLC_CONF_OPTS += \
37 --disable-gles1 \
38 --disable-a52 \
39 --disable-shout \
40 --disable-twolame \
41 --disable-dca \
42 --disable-schroedinger \
43 --disable-fluidsynth \
44 --disable-zvbi \
45 --disable-kate \
46 --disable-caca \
47 --disable-jack \
48 --disable-samplerate \
49 --disable-chromaprint \
50 --disable-goom \
51 --disable-projectm \
52 --disable-vsxu \
53 --disable-mtp \
54 --disable-mmal-codec \
55 --disable-mmal-vout \
56 --disable-dvdnav \
57 --disable-vpx \
58 --disable-jpeg \
59 --disable-x262 \
60 --disable-x265 \
61 --disable-mfx \
62 --disable-vdpau \
63 --disable-addonmanagermodules \
64 --enable-run-as-root \
66 # Uses __atomic_fetch_add_4
67 ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
68 VLC_CONF_ENV += LIBS="-latomic"
69 endif
71 # Building static and shared doesn't work, so force static off.
72 ifeq ($(BR2_STATIC_LIBS),)
73 VLC_CONF_OPTS += --disable-static
74 endif
76 ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y)
77 VLC_CONF_OPTS += --enable-altivec
78 else
79 VLC_CONF_OPTS += --disable-altivec
80 endif
82 ifeq ($(BR2_X86_CPU_HAS_SSE),y)
83 VLC_CONF_OPTS += --enable-sse
84 else
85 VLC_CONF_OPTS += --disable-sse
86 endif
88 ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
89 VLC_CONF_OPTS += --enable-alsa
90 VLC_DEPENDENCIES += alsa-lib
91 else
92 VLC_CONF_OPTS += --disable-alsa
93 endif
95 # bonjour support needs avahi-client, which needs avahi-daemon and dbus
96 ifeq ($(BR2_PACKAGE_AVAHI)$(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yyy)
97 VLC_CONF_OPTS += --enable-bonjour
98 VLC_DEPENDENCIES += avahi dbus
99 else
100 VLC_CONF_OPTS += --disable-bonjour
101 endif
103 ifeq ($(BR2_PACKAGE_DBUS),y)
104 VLC_CONF_OPTS += --enable-dbus
105 VLC_DEPENDENCIES += dbus
106 else
107 VLC_CONF_OPTS += --disable-dbus
108 endif
110 ifeq ($(BR2_PACKAGE_DIRECTFB),y)
111 VLC_CONF_OPTS += --enable-directfb
112 VLC_CONF_ENV += ac_cv_path_DIRECTFB_CONFIG=$(STAGING_DIR)/usr/bin/directfb-config
113 VLC_DEPENDENCIES += directfb
114 else
115 VLC_CONF_OPTS += --disable-directfb
116 endif
118 ifeq ($(BR2_PACKAGE_FAAD2),y)
119 VLC_CONF_OPTS += --enable-faad
120 VLC_DEPENDENCIES += faad2
121 else
122 VLC_CONF_OPTS += --disable-faad
123 endif
125 ifeq ($(BR2_PACKAGE_FFMPEG),y)
126 VLC_CONF_OPTS += --enable-avcodec
127 VLC_DEPENDENCIES += ffmpeg
128 else
129 VLC_CONF_OPTS += --disable-avcodec
130 endif
132 ifeq ($(BR2_PACKAGE_FFMPEG_POSTPROC),y)
133 VLC_CONF_OPTS += --enable-postproc
134 else
135 VLC_CONF_OPTS += --disable-postproc
136 endif
138 ifeq ($(BR2_PACKAGE_FFMPEG_SWSCALE),y)
139 VLC_CONF_OPTS += --enable-swscale
140 else
141 VLC_CONF_OPTS += --disable-swscale
142 endif
144 ifeq ($(BR2_PACKAGE_FLAC),y)
145 VLC_CONF_OPTS += --enable-flac
146 VLC_DEPENDENCIES += flac
147 else
148 VLC_CONF_OPTS += --disable-flac
149 endif
151 ifeq ($(BR2_PACKAGE_FREERDP),y)
152 VLC_DEPENDENCIES += freerdp
153 endif
155 ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
156 VLC_DEPENDENCIES += libgl
157 endif
159 ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
160 VLC_CONF_OPTS += --enable-gles2
161 VLC_DEPENDENCIES += libgles
162 else
163 VLC_CONF_OPTS += --disable-gles2
164 endif
166 ifeq ($(BR2_PACKAGE_OPENCV)$(BR2_PACKAGE_OPENCV3),y)
167 VLC_CONF_OPTS += --enable-opencv
168 ifeq ($(BR2_PACKAGE_OPENCV),y)
169 VLC_DEPENDENCIES += opencv
170 else
171 VLC_DEPENDENCIES += opencv3
172 endif
173 else
174 VLC_CONF_OPTS += --disable-opencv
175 endif
177 ifeq ($(BR2_PACKAGE_OPUS),y)
178 VLC_CONF_OPTS += --enable-opus
179 VLC_DEPENDENCIES += libvorbis opus
180 else
181 VLC_CONF_OPTS += --disable-opus
182 endif
184 ifeq ($(BR2_PACKAGE_LIBASS),y)
185 VLC_CONF_OPTS += --enable-libass
186 VLC_DEPENDENCIES += libass
187 else
188 VLC_CONF_OPTS += --disable-libass
189 endif
191 ifeq ($(BR2_PACKAGE_LIBBLURAY),y)
192 VLC_CONF_OPTS += --enable-bluray
193 VLC_DEPENDENCIES += libbluray
194 else
195 VLC_CONF_OPTS += --disable-bluray
196 endif
198 ifeq ($(BR2_PACKAGE_LIBCDDB),y)
199 VLC_CONF_OPTS += --enable-libcddb
200 VLC_DEPENDENCIES += libcddb
201 else
202 VLC_CONF_OPTS += --disable-libcddb
203 endif
205 ifeq ($(BR2_PACKAGE_LIBDVBPSI),y)
206 VLC_CONF_OPTS += --enable-dvbpsi
207 VLC_DEPENDENCIES += libdvbpsi
208 else
209 VLC_CONF_OPTS += --disable-dvbpsi
210 endif
212 ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
213 VLC_CONF_OPTS += --enable-libgcrypt
214 VLC_DEPENDENCIES += libgcrypt
215 VLC_CONF_ENV += \
216 GCRYPT_CONFIG="$(STAGING_DIR)/usr/bin/libgcrypt-config"
217 else
218 VLC_CONF_OPTS += --disable-libgcrypt
219 endif
221 ifeq ($(BR2_PACKAGE_LIBMAD),y)
222 VLC_CONF_OPTS += --enable-mad
223 VLC_DEPENDENCIES += libmad
224 else
225 VLC_CONF_OPTS += --disable-mad
226 endif
228 ifeq ($(BR2_PACKAGE_LIBMATROSKA),y)
229 VLC_CONF_OPTS += --enable-mkv
230 VLC_DEPENDENCIES += libmatroska
231 else
232 VLC_CONF_OPTS += --disable-mkv
233 endif
235 ifeq ($(BR2_PACKAGE_LIBMODPLUG),y)
236 VLC_CONF_OPTS += --enable-mod
237 VLC_DEPENDENCIES += libmodplug
238 else
239 VLC_CONF_OPTS += --disable-mod
240 endif
242 ifeq ($(BR2_PACKAGE_LIBMPEG2),y)
243 VLC_CONF_OPTS += --enable-libmpeg2
244 VLC_DEPENDENCIES += libmpeg2
245 else
246 VLC_CONF_OPTS += --disable-libmpeg2
247 endif
249 ifeq ($(BR2_PACKAGE_LIBPNG),y)
250 VLC_CONF_OPTS += --enable-png
251 VLC_DEPENDENCIES += libpng
252 else
253 VLC_CONF_OPTS += --disable-png
254 endif
256 ifeq ($(BR2_PACKAGE_LIBRSVG),y)
257 VLC_CONF_OPTS += --enable-svg --enable-svgdec
258 VLC_DEPENDENCIES += librsvg
259 else
260 VLC_CONF_OPTS += --disable-svg --disable-svgdec
261 endif
263 ifeq ($(BR2_PACKAGE_LIBSSH2),y)
264 VLC_CONF_OPTS += --enable-sftp
265 VLC_DEPENDENCIES += libssh2
266 else
267 VLC_CONF_OPTS += --disable-sftp
268 endif
270 ifeq ($(BR2_PACKAGE_LIBSIDPLAY2),y)
271 VLC_CONF_OPTS += --enable-sid
272 VLC_DEPENDENCIES += libsidplay2
273 else
274 VLC_CONF_OPTS += --disable-sid
275 endif
277 ifeq ($(BR2_PACKAGE_LIBTHEORA),y)
278 VLC_CONF_OPTS += --enable-theora
279 VLC_DEPENDENCIES += libtheora
280 else
281 VLC_CONF_OPTS += --disable-theora
282 endif
284 ifeq ($(BR2_PACKAGE_LIBUPNP),y)
285 VLC_CONF_OPTS += --enable-upnp
286 VLC_DEPENDENCIES += libupnp
287 else
288 VLC_CONF_OPTS += --disable-upnp
289 endif
291 ifeq ($(BR2_PACKAGE_LIBVNCSERVER),y)
292 VLC_CONF_OPTS += --enable-vnc
293 VLC_DEPENDENCIES += libvncserver
294 else
295 VLC_CONF_OPTS += --disable-vnc
296 endif
298 ifeq ($(BR2_PACKAGE_LIBVORBIS),y)
299 VLC_CONF_OPTS += --enable-vorbis
300 VLC_DEPENDENCIES += libvorbis
301 else
302 VLC_CONF_OPTS += --disable-vorbis
303 endif
305 ifeq ($(BR2_PACKAGE_LIBV4L),y)
306 VLC_CONF_OPTS += --enable-v4l2
307 VLC_DEPENDENCIES += libv4l
308 else
309 VLC_CONF_OPTS += --disable-v4l2
310 endif
312 ifeq ($(BR2_PACKAGE_LIBXCB),y)
313 VLC_CONF_OPTS += --enable-xcb
314 VLC_DEPENDENCIES += libxcb
315 else
316 VLC_CONF_OPTS += --disable-xcb
317 endif
319 ifeq ($(BR2_PACKAGE_LIBXML2),y)
320 VLC_CONF_OPTS += --enable-libxml2
321 VLC_DEPENDENCIES += libxml2
322 else
323 VLC_CONF_OPTS += --disable-libxml2
324 endif
326 ifeq ($(BR2_PACKAGE_LIVE555),y)
327 VLC_CONF_OPTS += --enable-live555
328 VLC_DEPENDENCIES += live555
329 VLC_CONF_ENV += \
330 LIVE555_CFLAGS="\
331 -I$(STAGING_DIR)/usr/include/BasicUsageEnvironment \
332 -I$(STAGING_DIR)/usr/include/groupsock \
333 -I$(STAGING_DIR)/usr/include/liveMedia \
334 -I$(STAGING_DIR)/usr/include/UsageEnvironment \
336 LIVE555_LIBS="-L$(STAGING_DIR)/usr/lib -lliveMedia"
337 else
338 VLC_CONF_OPTS += --disable-live555
339 endif
341 ifeq ($(BR2_PACKAGE_LUA),y)
342 VLC_CONF_OPTS += --enable-lua
343 VLC_DEPENDENCIES += lua host-lua
344 else
345 VLC_CONF_OPTS += --disable-lua
346 endif
348 ifeq ($(BR2_PACKAGE_MINIZIP),y)
349 VLC_DEPENDENCIES += minizip
350 endif
352 ifeq ($(BR2_PACKAGE_MUSEPACK),y)
353 VLC_CONF_OPTS += --enable-mpc
354 VLC_DEPENDENCIES += musepack
355 else
356 VLC_CONF_OPTS += --disable-mpc
357 endif
359 ifeq ($(BR2_PACKAGE_QT_GUI_MODULE),y)
360 VLC_CONF_OPTS += --enable-qt
361 VLC_CONF_ENV += \
362 ac_cv_path_MOC=$(HOST_DIR)/usr/bin/moc \
363 ac_cv_path_RCC=$(HOST_DIR)/usr/bin/rcc \
364 ac_cv_path_UIC=$(HOST_DIR)/usr/bin/uic
365 VLC_DEPENDENCIES += qt
366 else
367 VLC_CONF_OPTS += --disable-qt
368 endif
370 ifeq ($(BR2_PACKAGE_SDL_X11),y)
371 VLC_CONF_OPTS += --enable-sdl
372 VLC_DEPENDENCIES += sdl
373 else
374 VLC_CONF_OPTS += --disable-sdl
375 endif
377 ifeq ($(BR2_PACKAGE_SDL_IMAGE),y)
378 VLC_CONF_OPTS += --enable-sdl-image
379 VLC_DEPENDENCIES += sdl_image
380 else
381 VLC_CONF_OPTS += --disable-sdl-image
382 endif
384 ifeq ($(BR2_PACKAGE_SPEEX),y)
385 VLC_CONF_OPTS += --enable-speex
386 VLC_DEPENDENCIES += speex
387 else
388 VLC_CONF_OPTS += --disable-speex
389 endif
391 ifeq ($(BR2_PACKAGE_TAGLIB),y)
392 VLC_CONF_OPTS += --enable-taglib
393 VLC_DEPENDENCIES += taglib
394 else
395 VLC_CONF_OPTS += --disable-taglib
396 endif
398 ifeq ($(BR2_PACKAGE_TREMOR),y)
399 VLC_CONF_OPTS += --enable-tremor
400 VLC_DEPENDENCIES += tremor
401 else
402 VLC_CONF_OPTS += --disable-tremor
403 endif
405 ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
406 VLC_CONF_OPTS += --enable-udev
407 VLC_DEPENDENCIES += udev
408 else
409 VLC_CONF_OPTS += --disable-udev
410 endif
412 ifeq ($(BR2_PACKAGE_XCB_UTIL_KEYSYMS),y)
413 VLC_CONF_OPTS += --enable-xcb
414 VLC_DEPENDENCIES += xcb-util-keysyms
415 else
416 VLC_CONF_OPTS += --disable-xcb
417 endif
419 ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y)
420 VLC_CONF_OPTS += --with-x
421 VLC_DEPENDENCIES += xlib_libX11
422 else
423 VLC_CONF_OPTS += --without-x
424 endif
426 ifeq ($(BR2_PACKAGE_ZLIB),y)
427 VLC_DEPENDENCIES += zlib
428 endif
430 $(eval $(autotools-package))