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