1 DESCRIPTION = "Open Source multimedia player."
4 HOMEPAGE = "http://www.mplayerhq.hu/"
5 DEPENDS = "live555 libdvdread libtheora virtual/libsdl ffmpeg xsp zlib libpng jpeg liba52 freetype fontconfig alsa-lib lzo ncurses lame libxv virtual/libx11 virtual/kernel \
6 ${@base_conditional('ENTERPRISE_DISTRO', '1', '', 'libmad liba52 lame', d)}"
8 RDEPENDS = "mplayer-common"
10 SRC_URI = "svn://svn.mplayerhq.hu/mplayer;module=trunk \
11 file://makefile-nostrip-svn.patch;patch=1 \
12 file://mplayer-arm-pld.patch;patch=1 \
13 file://mplayer-lavc-arm.patch;patch=1 \
14 file://fix-exp.diff;patch=1;maxrev=30291 \
15 file://fix-addrinfo.patch;patch=1;maxrev=30302 \
16 file://fix-avconfig.diff;patch=1;maxrev=30376 \
20 SRC_URI_append_armv7a = " \
21 file://omapfb.patch;patch=1 \
26 # This is required for the collie machine only as all stacks in that
27 # machine seem to be set to executable by the toolchain. If someone
28 # discovers this is more general than please make this more general
29 # ie. for all armv4 machines.
30 SRC_URI_append_collie = "file://disable-executable-stack-test.patch;patch=1"
32 PACKAGE_ARCH_collie = "collie"
33 PACKAGE_ARCH_c7x0 = "c7x0"
34 PACKAGE_ARCH_hx4700 = "hx4700"
36 ARM_INSTRUCTION_SET = "ARM"
38 RCONFLICTS_${PN} = "mplayer-atty"
39 RREPLACES_${PN} = "mplayer-atty"
41 PV = "0.0+1.0rc3+svnr${SRCPV}"
43 DEFAULT_PREFERENCE = "-1"
44 DEFAULT_PREFERENCE_angstrom = "1"
48 S = "${WORKDIR}/trunk"
50 PACKAGES =+ "mencoder"
52 FILES_${PN} = "${bindir}/mplayer ${libdir}"
53 FILES_mencoder = "${bindir}/mencoder"
55 inherit autotools pkgconfig
57 # We want a kernel header for armv7a, but we don't want to make mplayer machine specific for that
58 STAGING_KERNEL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${TARGET_VENDOR}-${TARGET_OS}/kernel"
63 --target=${SIMPLE_TARGET_SYS} \
68 --disable-linux-devfs \
73 --disable-xf86keysym \
77 --disable-tv-bsdbt848 \
84 --disable-dvdread-internal \
85 --enable-libdvdcss-internal \
86 --disable-cdparanoia \
106 --disable-libavutil_so \
107 --disable-libavcodec_so \
108 --disable-libavformat_so \
109 --disable-libpostproc_so \
111 --enable-tremor-low \
169 --disable-win32waveout \
172 --extra-libs=' -lBasicUsageEnvironment -lUsageEnvironment -lgroupsock -lliveMedia -lstdc++' \
173 --enable-protocol='file_protocol pipe_protocol http_protocol rtmp_protocol tcp_protocol udp_protocol' \
176 EXTRA_OECONF_append_arm = " --disable-decoder=vorbis_decoder \
177 --disable-encoder=vorbis_encoder"
179 EXTRA_OECONF_append_armv6 = " --enable-armv6"
180 EXTRA_OECONF_append_armv7a = " --enable-armv6 --enable-neon"
183 #build with support for the iwmmxt instruction and pxa270fb overlay support (pxa270 and up)
184 #not every iwmmxt machine has the lcd connected to pxafb, but building the module doesn't hurt
185 MY_ARCH := "${PACKAGE_ARCH}"
186 PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'iwmmxt', 'iwmmxt', '${MY_ARCH}',d)}"
188 MY_TARGET_CC_ARCH := "${TARGET_CC_ARCH}"
189 TARGET_CC_ARCH = "${@base_contains('MACHINE_FEATURES', 'iwmmxt', '-march=iwmmxt -mtune=iwmmxt', '${MY_TARGET_CC_ARCH}',d)}"
191 EXTRA_OECONF_append = " ${@base_contains('MACHINE_FEATURES', 'iwmmxt', ' --enable-iwmmxt', '',d)} "
192 EXTRA_OECONF_append = " ${@base_contains('MACHINE_FEATURES', 'x86', '--enable-runtime-cpudetection', '',d)} "
194 FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O4 -ffast-math"
195 FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -ftree-vectorize -fomit-frame-pointer -O4 -ffast-math"
196 BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
197 # FIXME: Temporarily disable debugging to work-around http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37987
198 DEBUG_OPTIMIZATION_spitz = "-O -fomit-frame-pointer -g"
199 DEBUG_OPTIMIZATION_akita = "-O -fomit-frame-pointer -g"
201 do_configure_prepend_armv7a() {
202 cp ${WORKDIR}/yuv.S ${S}/libvo
203 cp ${WORKDIR}/vo_omapfb.c ${S}/libvo
204 cp ${STAGING_KERNEL_DIR}/arch/arm/plat-omap/include/mach/omapfb.h ${S}/libvo/omapfb.h || true
205 cp ${STAGING_KERNEL_DIR}/include/asm-arm/arch-omap/omapfb.h ${S}/libvo/omapfb.h || true
206 cp ${STAGING_KERNEL_DIR}/include/linux/omapfb.h ${S}/libvo/omapfb.h || true
207 sed -e 's/__user//g' -i ${S}/libvo/omapfb.h || true
210 CFLAGS_append = " -I${S}/libdvdread4 "
213 sed -i 's|/usr/include|${STAGING_INCDIR}|g' ${S}/configure
214 sed -i 's|/usr/lib|${STAGING_LIBDIR}|g' ${S}/configure
215 sed -i 's|/usr/\S*include[\w/]*||g' ${S}/configure
216 sed -i 's|/usr/\S*lib[\w/]*||g' ${S}/configure
217 sed -i 's|HOST_CC|BUILD_CC|' ${S}/Makefile
219 export SIMPLE_TARGET_SYS="$(echo ${TARGET_SYS} | sed s:${TARGET_VENDOR}::g)"
220 ./configure ${EXTRA_OECONF}