Revert "autoconf.inc: Use 'which' to find m4"
[openembedded.git] / recipes / mplayer / mplayer_git.bb
bloba762da81a58d6f3d0d3cf5f26092573db6223015
1 DESCRIPTION = "Open Source multimedia player."
2 SECTION = "multimedia"
3 PRIORITY = "optional"
4 HOMEPAGE = "http://www.mplayerhq.hu/"
5 DEPENDS = "libvpx 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_${PN} = "mplayer-common"
9 LICENSE = "GPL"
10 SRC_URI = "git://repo.or.cz/mplayer/glamo.git;protocol=git;branch=master \
13 SRC_URI_append_armv7a = " \
14 file://0001-video-out-for-omapfb-support.patch \
17 # This is required for the collie machine only as all stacks in that
18 # machine seem to be set to executable by the toolchain. If someone
19 # discovers this is more general than please make this more general
20 # ie. for all armv4 machines.
21 SRC_URI_append_collie = "file://disable-executable-stack-test.patch"
23 SRCREV = "81f0b8dacff926d46438faedb1a56da3946a8d2a"
25 PACKAGE_ARCH_collie = "collie"
26 PACKAGE_ARCH_c7x0 = "c7x0"
27 PACKAGE_ARCH_hx4700 = "hx4700"
29 ARM_INSTRUCTION_SET = "ARM"
31 RCONFLICTS_${PN} = "mplayer-atty"
32 RREPLACES_${PN} = "mplayer-atty"
34 PV = "0.0+1.0rc4+gitr${SRCPV}"
35 PR = "r6"
36 DEFAULT_PREFERENCE = "-1"
37 DEFAULT_PREFERENCE_shr = "2"
39 PARALLEL_MAKE = ""
41 S = "${WORKDIR}/git"
43 FILES_${PN} = "${bindir}/mplayer ${libdir} /usr/etc/mplayer/"
44 CONFFILES_${PN} += "/usr/etc/mplayer/input.conf \
45 /usr/etc/mplayer/example.conf \
46 /usr/etc/mplayer/codecs.conf \
49 inherit autotools pkgconfig
51 # We want a kernel header for armv7a, but we don't want to make mplayer machine specific for that
52 STAGING_KERNEL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${TARGET_VENDOR}-${TARGET_OS}/kernel"
54 EXTRA_OECONF = " \
55 --prefix=/usr \
56 --mandir=${mandir} \
57 --target=${SIMPLE_TARGET_SYS} \
59 --disable-gui \
60 --enable-largefiles \
61 --disable-lirc \
62 --disable-lircc \
63 --disable-joystick \
64 --disable-vm \
65 --disable-xf86keysym \
66 --enable-tv \
67 --enable-tv-v4l1 \
68 --enable-tv-v4l2 \
69 --disable-tv-bsdbt848 \
70 --enable-rtc \
71 --enable-networking \
72 --disable-smb \
73 --enable-live \
74 --disable-dvdnav \
75 --enable-dvdread \
76 --disable-dvdread-internal \
77 --enable-libdvdcss-internal \
78 --disable-cdparanoia \
79 --enable-freetype \
80 --enable-menu \
81 --enable-sortsub \
82 --disable-fribidi \
83 --disable-enca \
84 --disable-ftp \
85 --disable-vstream \
87 --disable-gif \
88 --enable-png \
89 --enable-jpeg \
90 --disable-libcdio \
91 --disable-liblzo \
92 --disable-qtx \
93 --disable-xanim \
94 --disable-real \
95 --disable-xvid \
96 --disable-x264 \
98 --enable-tremor-low \
100 --disable-speex \
101 --enable-theora \
102 --disable-faac \
103 --disable-ladspa \
104 --disable-libdv \
105 --enable-mad \
106 --disable-toolame \
107 --disable-twolame \
108 --disable-xmms \
109 --disable-mp3lib \
110 --enable-libmpeg2 \
111 --disable-musepack \
113 --disable-gl \
114 --disable-vesa \
115 --disable-svga \
116 --enable-sdl \
117 --disable-aa \
118 --disable-caca \
119 --disable-ggi \
120 --disable-ggiwmh \
121 --disable-directx \
122 --disable-dxr2 \
123 --disable-dxr3 \
124 --disable-dvb \
125 --disable-mga \
126 --disable-xmga \
127 --enable-xv \
128 --disable-xvmc \
129 --disable-vm \
130 --disable-xinerama \
131 --enable-x11 \
132 --enable-fbdev \
133 --disable-mlib \
134 --disable-3dfx \
135 --disable-tdfxfb \
136 --disable-s3fb \
137 --disable-directfb \
138 --disable-zr \
139 --disable-bl \
140 --disable-tdfxvid \
141 --disable-tga \
142 --disable-pnm \
143 --disable-md5sum \
145 --enable-alsa \
146 --enable-ossaudio \
147 --disable-arts \
148 --disable-esd \
149 --disable-pulse \
150 --disable-jack \
151 --disable-openal \
152 --disable-nas \
153 --disable-sgiaudio \
154 --disable-sunaudio \
155 --disable-win32waveout \
156 --enable-select \
158 --extra-libs=' -lBasicUsageEnvironment -lUsageEnvironment -lgroupsock -lliveMedia -lstdc++' \
161 EXTRA_OECONF_append_armv6 = " --enable-armv6"
162 EXTRA_OECONF_append_armv7a = " --enable-armv6 --enable-neon"
164 EXTRA_OECONF_append_om-gta02 = " --enable-glamo"
166 #build with support for the iwmmxt instruction and pxa270fb overlay support (pxa270 and up)
167 #not every iwmmxt machine has the lcd connected to pxafb, but building the module doesn't hurt
168 MY_ARCH := "${PACKAGE_ARCH}"
169 PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'iwmmxt', 'iwmmxt', '${MY_ARCH}',d)}"
171 MY_TARGET_CC_ARCH := "${TARGET_CC_ARCH}"
172 TARGET_CC_ARCH = "${@base_contains('MACHINE_FEATURES', 'iwmmxt', '-march=iwmmxt -mtune=iwmmxt', '${MY_TARGET_CC_ARCH}',d)}"
174 EXTRA_OECONF_append = " ${@base_contains('MACHINE_FEATURES', 'iwmmxt', ' --enable-iwmmxt', '',d)} "
175 EXTRA_OECONF_append = " ${@base_contains('MACHINE_FEATURES', 'x86', '--enable-runtime-cpudetection', '',d)} "
177 FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O4 -ffast-math"
178 FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -ftree-vectorize -fomit-frame-pointer -O4 -ffast-math"
179 BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
181 do_configure_prepend_armv7a() {
182 cp ${STAGING_KERNEL_DIR}/arch/arm/plat-omap/include/mach/omapfb.h ${S}/libvo/omapfb.h || true
183 cp ${STAGING_KERNEL_DIR}/include/asm-arm/arch-omap/omapfb.h ${S}/libvo/omapfb.h || true
184 cp ${STAGING_KERNEL_DIR}/include/linux/omapfb.h ${S}/libvo/omapfb.h || true
185 sed -e 's/__user//g' -i ${S}/libvo/omapfb.h || true
188 CFLAGS_append = " -I${S}/libdvdread4 "
190 do_configure() {
191 sed -i 's|/usr/include|${STAGING_INCDIR}|g' ${S}/configure
192 sed -i 's|/usr/lib|${STAGING_LIBDIR}|g' ${S}/configure
193 sed -i 's|/usr/\S*include[\w/]*||g' ${S}/configure
194 sed -i 's|/usr/\S*lib[\w/]*||g' ${S}/configure
195 sed -i 's|_install_strip="-s"|_install_strip=""|g' ${S}/configure
196 sed -i 's|HOST_CC|BUILD_CC|' ${S}/Makefile
198 export SIMPLE_TARGET_SYS="$(echo ${TARGET_SYS} | sed s:${TARGET_VENDOR}::g)"
199 ./configure ${EXTRA_OECONF}
203 do_compile () {
204 oe_runmake
207 do_install_append() {
208 install -d ${D}/usr/etc/mplayer
209 install ${S}/etc/input.conf ${D}/usr/etc/mplayer/
210 install ${S}/etc/example.conf ${D}/usr/etc/mplayer/
211 install ${S}/etc/codecs.conf ${D}/usr/etc/mplayer/