mplayer_git: bump SRCREV and remove unsupported option
[openembedded.git] / recipes / mplayer / mplayer_0.0+1.0rc2.bb
1 DESCRIPTION = "Open Source multimedia player."
2 SECTION = "multimedia"
3 PRIORITY = "optional"
4 HOMEPAGE = "http://www.mplayerhq.hu/"
5 DEPENDS = "virtual/libsdl xsp zlib libpng jpeg freetype fontconfig alsa-lib lzo ncurses libxv virtual/libx11 \
6            ${@base_conditional('ENTERPRISE_DISTRO', '1', '', 'libmad liba52 lame', d)}"
7 DEPENDS_append_c7x0 = " libw100 "
8 DEPENDS_append_hx4700 = " libw100 "
9
10 DEFAULT_PREFERENCE_avr32 = "1"
11
12 RDEPENDS = "mplayer-common"
13 LICENSE = "GPL"
14 SRC_URI = "http://www1.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc2.tar.bz2 \
15            file://vo_w100.c \
16            file://vo_w100_api.h \
17            file://vo_w100_fb.h \
18            file://vo_pxa.c \
19            file://vo_pxa.h \
20            file://simple_idct_armv5te.S \
21            file://Makefile-codec-cfg.patch;patch=1 \
22            file://w100-configure-svn.patch;patch=1 \
23            file://w100-video_out.patch;patch=1 \
24            file://w100-mplayer.patch;patch= \
25            file://pld-onlyarm5.patch;patch=1 \
26            file://makefile-nostrip-rc2.patch;patch=1 \
27            file://mplayer-imageon-svn.patch;patch=1 \
28            file://imageon-video_out.patch;patch=1 \
29            file://pxa_configure.patch;patch=1 \
30            file://pxa-video_out.patch;patch=1 \
31            file://motion-comp-pld.patch;patch=1 \
32            file://ivtv-fix.patch;patch=1 "
33
34 # This is required for the collie machine only as all stacks in that
35 # machine seem to be set to executable by the toolchain. If someone
36 # discovers this is more general than please make this more general
37 # ie. for all armv4 machines.
38 SRC_URI_append_collie = "file://disable-executable-stack-test.patch;patch=1"
39
40 PACKAGE_ARCH_collie = "collie"
41 PACKAGE_ARCH_c7x0 = "c7x0"
42 PACKAGE_ARCH_hx4700 = "hx4700"
43
44 ARM_INSTRUCTION_SET = "ARM"
45
46 RCONFLICTS_${PN} = "mplayer-atty"
47 RREPLACES_${PN} = "mplayer-atty"
48
49 PR = "r14"
50
51 PARALLEL_MAKE = ""
52
53 S = "${WORKDIR}/MPlayer-1.0rc2"
54
55 PACKAGES =+ "mencoder"
56
57 FILES_${PN} = "${bindir}/mplayer ${libdir}"
58 FILES_mencoder = "${bindir}/mencoder"
59
60 inherit autotools pkgconfig
61
62 EXTRA_OECONF = " \
63         --prefix=${prefix} \
64         --target=${TARGET_SYS} \
65         \
66         --enable-mencoder \
67         --disable-gui \
68         --enable-largefiles \
69         --disable-linux-devfs \
70         --disable-lirc \
71         --disable-lircc \
72         --disable-joystick \
73         --disable-vm \
74         --disable-xf86keysym \
75         --disable-tv \
76         --disable-tv-v4l2 \
77         --enable-v4l2 \
78         --disable-tv-bsdbt848 \
79         --enable-rtc \
80         --enable-network \
81         --disable-winsock2 \
82         --disable-smb \
83         --disable-live \
84         --disable-dvdnav \
85         --disable-dvdread \
86         --disable-libdvdcss-internal \
87         --disable-dvdread-internal \
88         --disable-cdparanoia \
89         --enable-freetype \
90         --disable-unrarlib \
91         --disable-menu \
92         --enable-sortsub \
93         --disable-fribidi \
94         --disable-enca \
95         --disable-macosx \
96         --disable-macosx-finder-support \
97         --disable-macosx-bundle \
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         --disable-libavutil_so \
113         --disable-libavcodec_so \
114         --disable-libavformat_so \
115         --disable-libpostproc_so \
116         \
117         --enable-tremor-low \
118         \
119         --disable-speex \
120         --disable-theora \
121         --disable-faac \
122         --disable-ladspa \
123         --disable-libdv \
124         ${@base_conditional('ENTERPRISE_DISTRO', '1', '--disable-mad', '--enable-mad', d)} \
125         --disable-toolame \
126         --disable-twolame \
127         --disable-xmms \
128         --disable-mp3lib \
129         ${@base_conditional('ENTERPRISE_DISTRO', '1', '--disable-libmpeg2', '--enable-libmpeg2', d)} \
130         --disable-musepack \
131         \
132         --disable-gl \
133         --disable-vesa \
134         --disable-svga \
135         --enable-sdl \
136         --disable-aa \
137         --disable-caca \
138         --disable-ggi \
139         --disable-ggiwmh \
140         --disable-directx \
141         --disable-dxr2 \
142         --disable-dxr3 \
143         --disable-dvb \
144         --disable-dvbhead \
145         --disable-mga \
146         --disable-xmga \
147         --enable-xv \
148         --disable-xvmc \
149         --disable-vm \
150         --disable-xinerama \
151         --enable-x11 \
152         --enable-fbdev \
153         --disable-mlib \
154         --disable-3dfx \
155         --disable-tdfxfb \
156         --disable-s3fb \
157         --disable-directfb \
158         --disable-zr \
159         --disable-bl \
160         --disable-tdfxvid \
161         --disable-tga \
162         --disable-pnm \
163         --disable-md5sum \
164         \
165         --enable-alsa \
166         --enable-ossaudio \
167         --disable-arts \
168         --disable-esd \
169         --disable-polyp \
170         --disable-jack \
171         --disable-openal \
172         --disable-nas \
173         --disable-sgiaudio \
174         --disable-sunaudio \
175         --disable-win32waveout \
176         --enable-select \
177         \
178         --disable-ass \
179         "
180
181 EXTRA_OECONF_append_arm = " --disable-decoder=vorbis_decoder \
182                             --disable-encoder=vorbis_encoder"
183 EXTRA_OECONF_append_c7x0 = " --enable-imageon "
184 EXTRA_OECONF_append_hx4700 = " --enable-imageon "
185
186 EXTRA_OECONF_append_armv6 = " --enable-armv6 "
187 EXTRA_OECONF_append_armv7a = "--enable-armv6 "
188
189 #build with support for the iwmmxt instruction and pxa270fb overlay support (pxa270 and up)
190 #not every iwmmxt machine has the lcd connected to pxafb, but building the module doesn't hurt 
191 MY_ARCH := "${PACKAGE_ARCH}"
192 PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'iwmmxt', 'iwmmxt', '${MY_ARCH}',d)}"
193
194 MY_TARGET_CC_ARCH := "${TARGET_CC_ARCH}"
195 TARGET_CC_ARCH = "${@base_contains('MACHINE_FEATURES', 'iwmmxt', '-march=iwmmxt -mtune=iwmmxt', '${MY_TARGET_CC_ARCH}',d)}"
196
197 EXTRA_OECONF_append = " ${@base_contains('MACHINE_FEATURES', 'iwmmxt', '--enable-pxa --enable-iwmmxt', '',d)} "
198 EXTRA_OECONF_append = " ${@base_contains('MACHINE_FEATURES', 'x86', '--enable-runtime-cpudetection', '',d)} "
199
200 FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O4 -ffast-math"
201 FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations  -ftree-vectorize -fomit-frame-pointer -O4 -ffast-math"
202 BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
203 # FIXME: Temporarily disable debugging to work-around http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37987
204 DEBUG_OPTIMIZATION_spitz = "-O -fomit-frame-pointer -g"
205 DEBUG_OPTIMIZATION_akita = "-O -fomit-frame-pointer -g"
206
207 do_configure() {
208         cp ${WORKDIR}/vo_w100.c ${S}/libvo
209         cp ${WORKDIR}/vo_w100_api.h ${S}/libvo
210         cp ${WORKDIR}/vo_w100_fb.h ${S}/libvo
211         cp ${WORKDIR}/vo_pxa.c ${S}/libvo
212         cp ${WORKDIR}/vo_pxa.h ${S}/libvo
213         cp ${WORKDIR}/simple_idct_armv5te.S ${S}/libavcodec/armv4l/
214
215         sed -i 's|/usr/include|${STAGING_INCDIR}|g' ${S}/configure
216         sed -i 's|/usr/lib|${STAGING_LIBDIR}|g' ${S}/configure
217         sed -i 's|/usr/\S*include[\w/]*||g' ${S}/configure
218         sed -i 's|/usr/\S*lib[\w/]*||g' ${S}/configure
219
220         ./configure ${EXTRA_OECONF}
221 }
222
223 do_compile () {
224         oe_runmake
225 }
226