1 ################################################################################
5 ################################################################################
8 MPLAYER_SOURCE
= MPlayer-
$(MPLAYER_VERSION
).
tar.xz
9 MPLAYER_SITE
= http
://www.mplayerhq.hu
/MPlayer
/releases
10 MPLAYER_DEPENDENCIES
= host-pkgconf
11 MPLAYER_LICENSE
= GPLv2
12 MPLAYER_LICENSE_FILES
= LICENSE Copyright
13 MPLAYER_CFLAGS
= $(TARGET_CFLAGS
)
14 MPLAYER_LDFLAGS
= $(TARGET_LDFLAGS
)
16 # mplayer needs pcm+mixer support, but configure fails to check for it
17 ifeq ($(BR2_PACKAGE_ALSA_LIB
)$(BR2_PACKAGE_ALSA_LIB_MIXER
)$(BR2_PACKAGE_ALSA_LIB_PCM
),yyy
)
18 MPLAYER_DEPENDENCIES
+= alsa-lib
19 MPLAYER_CONF_OPTS
+= --enable-alsa
21 MPLAYER_CONF_OPTS
+= --disable-alsa
24 ifeq ($(BR2_ENDIAN
),"BIG")
25 MPLAYER_CONF_OPTS
+= --enable-big-endian
27 MPLAYER_CONF_OPTS
+= --disable-big-endian
30 ifeq ($(BR2_PACKAGE_ZLIB
),y
)
31 MPLAYER_DEPENDENCIES
+= zlib
32 MPLAYER_CONF_OPTS
+= \
33 --enable-decoder
=apng \
34 --enable-encoder
=apng \
37 MPLAYER_CONF_OPTS
+= \
38 --disable-decoder
=apng \
39 --disable-encoder
=apng \
40 --disable-decoder
=tdsc
43 ifeq ($(BR2_PACKAGE_SDL
),y
)
44 MPLAYER_CONF_OPTS
+= \
46 --with-sdl-config
=$(STAGING_DIR
)/usr
/bin
/sdl-config
47 MPLAYER_DEPENDENCIES
+= sdl
49 MPLAYER_CONF_OPTS
+= --disable-sdl
52 ifeq ($(BR2_PACKAGE_FREETYPE
),y
)
53 MPLAYER_CONF_OPTS
+= \
55 --with-freetype-config
=$(STAGING_DIR
)/usr
/bin
/freetype-config
56 MPLAYER_DEPENDENCIES
+= freetype
58 MPLAYER_CONF_OPTS
+= --disable-freetype
61 # We intentionally don't pass --enable-fontconfig, to let the
62 # autodetection find which library to link with.
63 ifeq ($(BR2_PACKAGE_FONTCONFIG
),y
)
64 MPLAYER_DEPENDENCIES
+= fontconfig
66 MPLAYER_CONF_OPTS
+= --disable-fontconfig
69 ifeq ($(BR2_PACKAGE_LIBENCA
),y
)
70 MPLAYER_CONF_OPTS
+= --enable-enca
71 MPLAYER_DEPENDENCIES
+= libenca
73 MPLAYER_CONF_OPTS
+= --disable-enca
76 # We intentionally don't pass --enable-fribidi, to let the
77 # autodetection find which library to link with.
78 ifeq ($(BR2_PACKAGE_LIBFRIBIDI
),y
)
79 MPLAYER_DEPENDENCIES
+= libfribidi
81 MPLAYER_CONF_OPTS
+= --disable-fribidi
84 # We intentionally don't pass --enable-libiconv, to let the
85 # autodetection find which library to link with.
86 ifeq ($(BR2_PACKAGE_LIBICONV
),y
)
87 MPLAYER_DEPENDENCIES
+= libiconv
89 MPLAYER_CONF_OPTS
+= --disable-iconv
92 # We intentionally don't pass --enable-termcap, in order to let the
93 # autodetection find with which library to link with. Otherwise, we
94 # would have to pass it manually.
95 ifeq ($(BR2_PACKAGE_NCURSES
),y
)
96 MPLAYER_DEPENDENCIES
+= ncurses
98 MPLAYER_CONF_OPTS
+= --disable-termcap
101 ifeq ($(BR2_PACKAGE_SAMBA_SMBCLIENT
),y
)
102 MPLAYER_CONF_OPTS
+= --enable-smb
103 MPLAYER_DEPENDENCIES
+= samba
105 MPLAYER_CONF_OPTS
+= --disable-smb
108 ifeq ($(BR2_PACKAGE_LIBBLURAY
),y
)
109 MPLAYER_CONF_OPTS
+= --enable-bluray
110 MPLAYER_DEPENDENCIES
+= libbluray
112 MPLAYER_CONF_OPTS
+= --disable-bluray
115 # cdio support is broken in buildroot atm due to missing libcdio-paranoia
116 # package and this patch
117 # https://github.com/pld-linux/mplayer/blob/master/mplayer-libcdio.patch
118 MPLAYER_CONF_OPTS
+= --disable-libcdio
120 # We intentionally don't pass --enable-dvdread, to let the
121 # autodetection find which library to link with.
122 ifeq ($(BR2_PACKAGE_LIBDVDREAD
),y
)
123 MPLAYER_CONF_OPTS
+= \
124 --with-dvdread-config
=$(STAGING_DIR
)/usr
/bin
/dvdread-config
125 MPLAYER_DEPENDENCIES
+= libdvdread
128 # We intentionally don't pass --enable-dvdnav to let the autodetection
129 # find which library to link with.
130 ifeq ($(BR2_PACKAGE_LIBDVDNAV
),y
)
131 MPLAYER_CONF_OPTS
+= \
132 --with-dvdnav-config
=$(STAGING_DIR
)/usr
/bin
/dvdnav-config
133 MPLAYER_DEPENDENCIES
+= libdvdnav
136 ifeq ($(BR2_PACKAGE_MPLAYER_MPLAYER
),y
)
137 MPLAYER_CONF_OPTS
+= --enable-mplayer
139 MPLAYER_CONF_OPTS
+= --disable-mplayer
142 ifeq ($(BR2_PACKAGE_MPLAYER_MENCODER
),y
)
143 MPLAYER_CONF_OPTS
+= --enable-mencoder
145 MPLAYER_CONF_OPTS
+= --disable-mencoder
148 ifeq ($(BR2_PACKAGE_FAAD2
),y
)
149 MPLAYER_DEPENDENCIES
+= faad2
150 MPLAYER_CONF_OPTS
+= --enable-faad
152 MPLAYER_CONF_OPTS
+= --disable-faad
155 ifeq ($(BR2_PACKAGE_LAME
),y
)
156 MPLAYER_DEPENDENCIES
+= lame
157 MPLAYER_CONF_OPTS
+= --enable-mp3lame
159 MPLAYER_CONF_OPTS
+= --disable-mp3lame
162 # We intentionally don't pass --disable-ass-internal --enable-ass and
163 # let autodetection find which library to link with.
164 ifeq ($(BR2_PACKAGE_LIBASS
),y
)
165 MPLAYER_DEPENDENCIES
+= libass
168 # We intentionally don't pass --enable-libmpeg2 and let autodetection
169 # find which library to link with.
170 ifeq ($(BR2_PACKAGE_LIBMPEG2
),y
)
171 MPLAYER_DEPENDENCIES
+= libmpeg2
172 MPLAYER_CONF_OPTS
+= --disable-libmpeg2-internal
175 ifeq ($(BR2_PACKAGE_TREMOR
),y
)
176 MPLAYER_DEPENDENCIES
+= tremor
177 MPLAYER_CONF_OPTS
+= --enable-tremor
180 # We intentionally don't pass --enable-libvorbis, to let the
181 # autodetection find which library to link with.
182 ifeq ($(BR2_PACKAGE_LIBVORBIS
),y
)
183 MPLAYER_DEPENDENCIES
+= libvorbis
186 ifeq ($(BR2_PACKAGE_LIBMAD
),y
)
187 MPLAYER_DEPENDENCIES
+= libmad
188 MPLAYER_CONF_OPTS
+= --enable-mad
190 MPLAYER_CONF_OPTS
+= --disable-mad
193 ifeq ($(BR2_PACKAGE_LIVE555
),y
)
194 MPLAYER_DEPENDENCIES
+= live555
195 MPLAYER_CONF_OPTS
+= --enable-live
196 MPLAYER_LIVE555
= liveMedia groupsock UsageEnvironment BasicUsageEnvironment
198 $(addprefix -I
$(STAGING_DIR
)/usr
/include/,$(MPLAYER_LIVE555
))
199 MPLAYER_LDFLAGS
+= $(addprefix -l
,$(MPLAYER_LIVE555
)) -lstdc
++
201 MPLAYER_CONF_OPTS
+= --disable-live
204 ifeq ($(BR2_PACKAGE_GIFLIB
),y
)
205 MPLAYER_DEPENDENCIES
+= giflib
206 MPLAYER_CONF_OPTS
+= --enable-gif
208 MPLAYER_CONF_OPTS
+= --disable-gif
211 # We intentionally don't pass --enable-librtmp to let autodetection
212 # find which library to link with.
213 ifeq ($(BR2_PACKAGE_RTMPDUMP
),y
)
214 MPLAYER_DEPENDENCIES
+= rtmpdump
216 MPLAYER_CONF_OPTS
+= --disable-librtmp
219 ifeq ($(BR2_PACKAGE_SPEEX
),y
)
220 MPLAYER_DEPENDENCIES
+= speex
221 MPLAYER_CONF_OPTS
+= --enable-speex
223 MPLAYER_CONF_OPTS
+= --disable-speex
226 ifeq ($(BR2_PACKAGE_LZO
),y
)
227 MPLAYER_DEPENDENCIES
+= lzo
228 MPLAYER_CONF_OPTS
+= --enable-liblzo
230 MPLAYER_CONF_OPTS
+= --disable-liblzo
233 MPLAYER_DEPENDENCIES
+= $(if
$(BR2_PACKAGE_BZIP2
),bzip2
)
234 MPLAYER_DEPENDENCIES
+= $(if
$(BR2_PACKAGE_LIBTHEORA
),libtheora
)
235 MPLAYER_DEPENDENCIES
+= $(if
$(BR2_PACKAGE_LIBPNG
),libpng
)
236 MPLAYER_DEPENDENCIES
+= $(if
$(BR2_PACKAGE_JPEG
),jpeg
)
237 MPLAYER_DEPENDENCIES
+= $(if
$(BR2_PACKAGE_XLIB_LIBX11
),xlib_libX11
)
238 MPLAYER_DEPENDENCIES
+= $(if
$(BR2_PACKAGE_XLIB_LIBXEXT
),xlib_libXext
)
239 MPLAYER_DEPENDENCIES
+= $(if
$(BR2_PACKAGE_XLIB_LIBXINERAMA
),xlib_libXinerama
)
240 MPLAYER_DEPENDENCIES
+= $(if
$(BR2_PACKAGE_XLIB_LIBXV
),xlib_libXv
)
241 MPLAYER_DEPENDENCIES
+= $(if
$(BR2_PACKAGE_XLIB_LIBXXF86VM
),xlib_libXxf86vm
)
244 ifeq ($(BR2_ARM_CPU_ARMV5
),y
)
245 MPLAYER_CONF_OPTS
+= --enable-armv5te
248 ifeq ($(BR2_ARM_CPU_ARMV6
)$(BR2_ARM_CPU_ARMV7A
),y
)
249 MPLAYER_CONF_OPTS
+= --enable-armv6
252 ifeq ($(BR2_ARM_SOFT_FLOAT
),)
253 ifeq ($(BR2_ARM_CPU_HAS_NEON
),y
)
254 MPLAYER_CONF_OPTS
+= --enable-neon
255 MPLAYER_CFLAGS
+= -mfpu
=neon
260 # inline asm breaks with "can't find a register in class 'GENERAL_REGS'"
261 # inless we free up ebp
262 MPLAYER_CFLAGS
+= -fomit-frame-pointer
265 ifeq ($(BR2_X86_CPU_HAS_MMX
),y
)
266 MPLAYER_CONF_OPTS
+= --yasm
=$(HOST_DIR
)/usr
/bin
/yasm
267 MPLAYER_DEPENDENCIES
+= host-yasm
269 MPLAYER_CONF_OPTS
+= --yasm
=''
272 define MPLAYER_CONFIGURE_CMDS
273 (cd
$(@D
); rm -rf config.cache
; \
274 $(TARGET_CONFIGURE_OPTS
) \
275 $(TARGET_CONFIGURE_ARGS
) \
279 --target
=$(GNU_TARGET_NAME
) \
280 --host-cc
="$(HOSTCC)" \
281 --cc="$(TARGET_CC)" \
282 --as="$(TARGET_AS)" \
284 --extra-cflags
="$(MPLAYER_CFLAGS)" \
285 --extra-ldflags
="$(MPLAYER_LDFLAGS)" \
287 $(MPLAYER_CONF_OPTS
) \
288 --enable-cross-compile \
290 --enable-dynamic-plugins \
295 define MPLAYER_BUILD_CMDS
299 define MPLAYER_INSTALL_TARGET_CMDS
300 $(MAKE
) DESTDIR
=$(TARGET_DIR
) -C
$(@D
) install
303 $(eval
$(generic-package
))