package/dhcp/S80dhcp-server: allow empty INTERFACES
[buildroot-gz.git] / package / vlc / vlc.mk
blobca1f09c85c06d3cc1d197ce4411ebe5182b5ca5d
1 ################################################################################
3 # vlc
5 ################################################################################
7 VLC_VERSION = 2.2.1
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_LIBGCRYPT),y)
183 VLC_CONF_OPTS += --enable-libgcrypt
184 VLC_DEPENDENCIES += libgcrypt
185 VLC_CONF_ENV += \
186 GCRYPT_CONFIG="$(STAGING_DIR)/usr/bin/libgcrypt-config"
187 else
188 VLC_CONF_OPTS += --disable-libgcrypt
189 endif
191 ifeq ($(BR2_PACKAGE_LIBMAD),y)
192 VLC_CONF_OPTS += --enable-mad
193 VLC_DEPENDENCIES += libmad
194 else
195 VLC_CONF_OPTS += --disable-mad
196 endif
198 ifeq ($(BR2_PACKAGE_LIBMODPLUG),y)
199 VLC_CONF_OPTS += --enable-mod
200 VLC_DEPENDENCIES += libmodplug
201 else
202 VLC_CONF_OPTS += --disable-mod
203 endif
205 ifeq ($(BR2_PACKAGE_LIBMPEG2),y)
206 VLC_CONF_OPTS += --enable-libmpeg2
207 VLC_DEPENDENCIES += libmpeg2
208 else
209 VLC_CONF_OPTS += --disable-libmpeg2
210 endif
212 ifeq ($(BR2_PACKAGE_LIBPNG),y)
213 VLC_CONF_OPTS += --enable-png
214 VLC_DEPENDENCIES += libpng
215 else
216 VLC_CONF_OPTS += --disable-png
217 endif
219 ifeq ($(BR2_PACKAGE_LIBRSVG),y)
220 VLC_CONF_OPTS += --enable-svg --enable-svgdec
221 VLC_DEPENDENCIES += librsvg
222 else
223 VLC_CONF_OPTS += --disable-svg --disable-svgdec
224 endif
226 ifeq ($(BR2_PACKAGE_LIBSIDPLAY2),y)
227 VLC_CONF_OPTS += --enable-sid
228 VLC_DEPENDENCIES += libsidplay2
229 else
230 VLC_CONF_OPTS += --disable-sid
231 endif
233 ifeq ($(BR2_PACKAGE_LIBTHEORA),y)
234 VLC_CONF_OPTS += --enable-theora
235 VLC_DEPENDENCIES += libtheora
236 else
237 VLC_CONF_OPTS += --disable-theora
238 endif
240 ifeq ($(BR2_PACKAGE_LIBUPNP),y)
241 VLC_CONF_OPTS += --enable-upnp
242 VLC_DEPENDENCIES += libupnp
243 else
244 VLC_CONF_OPTS += --disable-upnp
245 endif
247 ifeq ($(BR2_PACKAGE_LIBVORBIS),y)
248 VLC_CONF_OPTS += --enable-vorbis
249 VLC_DEPENDENCIES += libvorbis
250 else
251 VLC_CONF_OPTS += --disable-vorbis
252 endif
254 ifeq ($(BR2_PACKAGE_LIBV4L),y)
255 VLC_CONF_OPTS += --enable-v4l2
256 VLC_DEPENDENCIES += libv4l
257 else
258 VLC_CONF_OPTS += --disable-v4l2
259 endif
261 ifeq ($(BR2_PACKAGE_LIBXCB),y)
262 VLC_CONF_OPTS += --enable-xcb
263 VLC_DEPENDENCIES += libxcb
264 else
265 VLC_CONF_OPTS += --disable-xcb
266 endif
268 ifeq ($(BR2_PACKAGE_LIBXML2),y)
269 VLC_CONF_OPTS += --enable-libxml2
270 VLC_DEPENDENCIES += libxml2
271 else
272 VLC_CONF_OPTS += --disable-libxml2
273 endif
275 ifeq ($(BR2_PACKAGE_LIVE555),y)
276 VLC_CONF_OPTS += --enable-live555
277 VLC_DEPENDENCIES += live555
278 VLC_CONF_ENV += \
279 LIVE555_CFLAGS="\
280 -I$(STAGING_DIR)/usr/include/BasicUsageEnvironment \
281 -I$(STAGING_DIR)/usr/include/groupsock \
282 -I$(STAGING_DIR)/usr/include/liveMedia \
283 -I$(STAGING_DIR)/usr/include/UsageEnvironment \
285 LIVE555_LIBS="-L$(STAGING_DIR)/usr/lib -lliveMedia"
286 else
287 VLC_CONF_OPTS += --disable-live555
288 endif
290 ifeq ($(BR2_PACKAGE_LUA),y)
291 VLC_CONF_OPTS += --enable-lua
292 VLC_DEPENDENCIES += lua host-lua
293 else
294 VLC_CONF_OPTS += --disable-lua
295 endif
297 ifeq ($(BR2_PACKAGE_QT_GUI_MODULE),y)
298 VLC_CONF_OPTS += --enable-qt
299 VLC_CONF_ENV += \
300 ac_cv_path_MOC=$(HOST_DIR)/usr/bin/moc \
301 ac_cv_path_RCC=$(HOST_DIR)/usr/bin/rcc \
302 ac_cv_path_UIC=$(HOST_DIR)/usr/bin/uic
303 VLC_DEPENDENCIES += qt
304 else
305 VLC_CONF_OPTS += --disable-qt
306 endif
308 ifeq ($(BR2_PACKAGE_SDL_X11),y)
309 VLC_CONF_OPTS += --enable-sdl
310 VLC_DEPENDENCIES += sdl
311 else
312 VLC_CONF_OPTS += --disable-sdl
313 endif
315 ifeq ($(BR2_PACKAGE_SDL_IMAGE),y)
316 VLC_CONF_OPTS += --enable-sdl-image
317 VLC_DEPENDENCIES += sdl_image
318 else
319 VLC_CONF_OPTS += --disable-sdl-image
320 endif
322 ifeq ($(BR2_PACKAGE_SPEEX),y)
323 VLC_CONF_OPTS += --enable-speex
324 VLC_DEPENDENCIES += speex
325 else
326 VLC_CONF_OPTS += --disable-speex
327 endif
329 ifeq ($(BR2_PACKAGE_TAGLIB),y)
330 VLC_CONF_OPTS += --enable-taglib
331 VLC_DEPENDENCIES += taglib
332 else
333 VLC_CONF_OPTS += --disable-taglib
334 endif
336 ifeq ($(BR2_PACKAGE_TREMOR),y)
337 VLC_CONF_OPTS += --enable-tremor
338 VLC_DEPENDENCIES += tremor
339 else
340 VLC_CONF_OPTS += --disable-tremor
341 endif
343 ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
344 VLC_CONF_OPTS += --enable-udev
345 VLC_DEPENDENCIES += udev
346 else
347 VLC_CONF_OPTS += --disable-udev
348 endif
350 ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y)
351 VLC_CONF_OPTS += --with-x
352 VLC_DEPENDENCIES += xlib_libX11
353 else
354 VLC_CONF_OPTS += --without-x
355 endif
357 $(eval $(autotools-package))