Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into...
[openembedded.git] / recipes / mplayer / mplayer_0.0+1.0rc1.bb
1 DESCRIPTION = "Open Source multimedia player."
2 SECTION = "multimedia"
3 PRIORITY = "optional"
4 HOMEPAGE = "http://www.mplayerhq.hu/"
5 DEPENDS = "virtual/libsdl zlib libpng jpeg freetype fontconfig alsa-lib lzo ncurses libxv virtual/libx11 \
6            ${@base_conditional('ENTERPRISE_DISTRO', '1', '', 'libmad liba52 lame', d)}"
7 RDEPENDS = "mplayer-common"
8 LICENSE = "GPL"
9 SRC_URI = "http://www1.mplayerhq.hu/MPlayer/releases/MPlayer-1.0rc1.tar.bz2 \
10            file://vo_w100.c \
11            file://vo_w100_api.h \
12            file://vo_w100_fb.h \
13            file://vo_pxa.c \
14            file://vo_pxa.h \
15            file://Makefile.patch;patch=1 \
16            file://w100-configure.patch;patch=1 \
17            file://w100-Makefile.patch;patch=1 \
18            file://w100-video_out.patch;patch=1 \
19            file://w100-mplayer.patch;patch=1 \
20            file://pld-onlyarm5.patch;patch=1 \
21            file://makefile-nostrip.patch;patch=1 \
22            ${SOURCEFORGE_MIRROR}/libw100/mplayer-imageon.patch;patch=1 \
23            file://imageon-video_out.patch;patch=1 \
24            file://powerpc-is-ppc.diff;patch=1 \
25            file://pxa_configure.patch;patch=1 \
26            file://pxa-video_out.patch;patch=1 \
27           "
28
29 SRC_URI_append_avr32 = " file://mplayer-1.0rc1-atmel.2.patch;patch=1 \
30                        "
31
32 # This is required for the collie machine only as all stacks in that
33 # machine seem to be set to executable by the toolchain. If someone
34 # discovers this is more general than please make this more general
35 # ie. for all armv4 machines.
36 SRC_URI_append_collie = "file://disable-executable-stack-test.patch;patch=1"
37 PACKAGE_ARCH_mplayer_collie = "collie"
38 PACKAGE_ARCH_mencoder_collie = "collie"
39
40 ARM_INSTRUCTION_SET = "ARM"
41
42 RCONFLICTS_${PN} = "mplayer-atty"
43 RREPLACES_${PN} = "mplayer-atty"
44 PR = "r18"
45
46 PARALLEL_MAKE = ""
47
48 DEPENDS_append_c7x0 = " sharp-aticore-oss libw100 "
49 DEPENDS_append_hx4700 = " libw100 "
50
51 S = "${WORKDIR}/MPlayer-1.0rc1"
52
53 PACKAGES =+ "mencoder"
54
55 FILES_${PN} = "${bindir}/mplayer ${libdir}"
56 FILES_mencoder = "${bindir}/mencoder"
57
58 inherit autotools pkgconfig
59
60 FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O4 -ffast-math"
61 BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
62
63 EXTRA_OECONF = " \
64         --prefix=/usr \
65         --mandir=${mandir} \
66         --target=${TARGET_SYS} \
67         \
68         --enable-mencoder \
69         --disable-gui \
70         --enable-largefiles \
71         --disable-linux-devfs \
72         --disable-lirc \
73         --disable-lircc \
74         --disable-joystick \
75         --disable-vm \
76         --disable-xf86keysym \
77         --disable-tv \
78         --disable-tv-v4l2 \
79         --disable-tv-bsdbt848 \
80         --enable-rtc \
81         --enable-network \
82         --disable-winsock2 \
83         --disable-smb \
84         --disable-live \
85         --disable-dvdread \
86         --disable-mpdvdkit \
87         --disable-cdparanoia \
88         --enable-freetype \
89         --disable-unrarlib \
90         --disable-menu \
91         --enable-sortsub \
92         --disable-fribidi \
93         --disable-enca \
94         --disable-macosx \
95         --disable-macosx-finder-support \
96         --disable-macosx-bundle \
97         --disable-ftp \
98         --disable-vstream \
99         \
100         --disable-gif \
101         --enable-png \
102         --enable-jpeg \
103         --disable-libcdio \
104         --enable-liblzo \
105         --disable-win32 \
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         --disable-libfame \
117         \
118         --enable-tremor-low \
119         \
120         --disable-speex \
121         --disable-theora \
122         --disable-faac \
123         --disable-ladspa \
124         --disable-libdv \
125         --enable-mad \
126         --disable-toolame \
127         --disable-twolame \
128         --disable-xmms \
129         --disable-mp3lib \
130         --disable-libdts \
131         --enable-libmpeg2 \
132         --disable-musepack \
133         --disable-amr_nb \
134         --disable-amr_nb-fixed \
135         --disable-amr_wb \
136         \
137         --disable-gl \
138         --disable-dga \
139         --disable-vesa \
140         --disable-svga \
141         --enable-sdl \
142         --disable-aa \
143         --disable-caca \
144         --disable-ggi \
145         --disable-ggiwmh \
146         --disable-directx \
147         --disable-dxr2 \
148         --disable-dxr3 \
149         --disable-dvb \
150         --disable-dvbhead \
151         --disable-mga \
152         --disable-xmga \
153         --enable-xv \
154         --disable-xvmc \
155         --disable-vm \
156         --disable-xinerama \
157         --enable-x11 \
158         --enable-fbdev \
159         --disable-mlib \
160         --disable-3dfx \
161         --disable-tdfxfb \
162         --disable-s3fb \
163         --disable-directfb \
164         --disable-zr \
165         --disable-bl \
166         --disable-tdfxvid \
167         --disable-tga \
168         --disable-pnm \
169         --disable-md5sum \
170         \
171         --enable-alsa \
172         --enable-ossaudio \
173         --disable-arts \
174         --disable-esd \
175         --disable-polyp \
176         --disable-jack \
177         --disable-openal \
178         --disable-nas \
179         --disable-sgiaudio \
180         --disable-sunaudio \
181         --disable-win32waveout \
182         --enable-select \
183         \
184         --disable-runtime-cpudetection \
185         "
186
187 EXTRA_OECONF_append_arm = " --disable-decoder=vorbis_decoder \
188                             --disable-encoder=vorbis_encoder"
189
190 EXTRA_OECONF_append_progear = " --disable-sse --disable-3dnow --disable-mmxext --disable-sse2"
191
192 #enable support for the ati imageon series (w100 and w3220)
193 EXTRA_OECONF_append_c7x0 = " --enable-w100 "
194 EXTRA_OECONF_append_hx4700 = " --enable-imageon "
195
196 #enable pxa270 overlay support
197 EXTRA_OECONF_append_spitz = " --enable-pxa "
198 EXTRA_OECONF_append_akita = " --enable-pxa "
199 EXTRA_OECONF_append_a780 = " --enable-pxa "
200 EXTRA_OECONF_append_magician = " --enable-pxa "
201 EXTRA_OECONF_append_htcuniversal = " --enable-pxa "
202 EXTRA_OECONF_append_palmld = " --enable-pxa "
203
204 #build with support for the iwmmxt instruction support (pxa270 and up)
205 TARGET_CC_ARCH_spitz = "-march=iwmmxt -mtune=iwmmxt"
206 PACKAGE_ARCH_spitz = "iwmmxt"
207 TARGET_CC_ARCH_akita = "-march=iwmmxt -mtune=iwmmxt"
208 PACKAGE_ARCH_akita = "iwmmxt"
209 TARGET_CC_ARCH_a780 = "-march=iwmmxt -mtune=iwmmxt"
210 PACKAGE_ARCH_a780 = "iwmmxt"
211 TARGET_CC_ARCH_hx4700 = "-march=iwmmxt -mtune=iwmmxt"
212 PACKAGE_ARCH_hx4700 = "iwmmxt"
213 TARGET_CC_ARCH_magician = "-march=iwmmxt -mtune=iwmmxt"
214 PACKAGE_ARCH_magician = "iwmmxt"
215 TARGET_CC_ARCH_htcuniversal = "-march=iwmmxt -mtune=iwmmxt"
216 PACKAGE_ARCH_htcuniversal = "iwmmxt"
217 TARGET_CC_ARCH_palmld = "-march=iwmmxt -mtune=iwmmxt"
218 PACKAGE_ARCH_palmld = "iwmmxt"
219
220 do_configure() {
221         cp ${WORKDIR}/vo_w100.c ${S}/libvo
222         cp ${WORKDIR}/vo_w100_api.h ${S}/libvo
223         cp ${WORKDIR}/vo_w100_fb.h ${S}/libvo
224     cp ${WORKDIR}/vo_pxa.c ${S}/libvo
225     cp ${WORKDIR}/vo_pxa.h ${S}/libvo
226
227         sed -i 's|/usr/include|${STAGING_INCDIR}|g' ${S}/configure
228         sed -i 's|/usr/lib|${STAGING_LIBDIR}|g' ${S}/configure
229         sed -i 's|/usr/\S*include[\w/]*||g' ${S}/configure
230         sed -i 's|/usr/\S*lib[\w/]*||g' ${S}/configure
231
232         ./configure ${EXTRA_OECONF}
233 }
234
235 do_compile () {
236         oe_runmake
237 }
238