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