Merge branch 'org.openembedded.dev' of git@git.openembedded.net:/openembedded into...
[vuplus_openembedded] / packages / 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
33 # This is required for the collie machine only as all stacks in that
34 # machine seem to be set to executable by the toolchain. If someone
35 # discovers this is more general than please make this more general
36 # ie. for all armv4 machines.
37 SRC_URI_append_collie = "file://disable-executable-stack-test.patch;patch=1"
38
39 PACKAGE_ARCH_collie = "collie"
40 PACKAGE_ARCH_c7x0 = "c7x0"
41 PACKAGE_ARCH_hx4700 = "hx4700"
42
43 RCONFLICTS_${PN} = "mplayer-atty"
44 RREPLACES_${PN} = "mplayer-atty"
45
46 PR = "r9"
47
48 PARALLEL_MAKE = ""
49
50 S = "${WORKDIR}/MPlayer-1.0rc2"
51
52 PACKAGES =+ "mencoder"
53
54 FILES_${PN} = "${bindir}/mplayer ${libdir}"
55 FILES_mencoder = "${bindir}/mencoder"
56
57 inherit autotools pkgconfig
58
59 EXTRA_OECONF = " \
60         --prefix=/usr \
61         --mandir=${mandir} \
62         --target=${TARGET_SYS} \
63         \
64         --enable-mencoder \
65         --disable-gui \
66         --enable-largefiles \
67         --disable-linux-devfs \
68         --disable-lirc \
69         --disable-lircc \
70         --disable-joystick \
71         --disable-vm \
72         --disable-xf86keysym \
73         --disable-tv \
74         --disable-tv-v4l2 \
75         --enable-v4l2 \
76         --disable-tv-bsdbt848 \
77         --enable-rtc \
78         --enable-network \
79         --disable-winsock2 \
80         --disable-smb \
81         --disable-live \
82         --disable-dvdnav \
83         --disable-dvdread \
84         --disable-libdvdcss-internal \
85         --disable-dvdread-internal \
86         --disable-cdparanoia \
87         --enable-freetype \
88         --disable-unrarlib \
89         --disable-menu \
90         --enable-sortsub \
91         --disable-fribidi \
92         --disable-enca \
93         --disable-macosx \
94         --disable-macosx-finder-support \
95         --disable-macosx-bundle \
96         --disable-ftp \
97         --disable-vstream \
98         \
99         --disable-gif \
100         --enable-png \
101         --enable-jpeg \
102         --disable-libcdio \
103         --disable-liblzo \
104         --disable-qtx \
105         --disable-xanim \
106         --disable-real \
107         --disable-xvid \
108         --disable-x264 \
109         \
110         --disable-libavutil_so \
111         --disable-libavcodec_so \
112         --disable-libavformat_so \
113         --disable-libpostproc_so \
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         --enable-libmpeg2 \
128         --disable-musepack \
129         \
130         --disable-gl \
131         --disable-vesa \
132         --disable-svga \
133         --enable-sdl \
134         --disable-aa \
135         --disable-caca \
136         --disable-ggi \
137         --disable-ggiwmh \
138         --disable-directx \
139         --disable-dxr2 \
140         --disable-dxr3 \
141         --disable-dvb \
142         --disable-dvbhead \
143         --disable-mga \
144         --disable-xmga \
145         --enable-xv \
146         --disable-xvmc \
147         --disable-vm \
148         --disable-xinerama \
149         --enable-x11 \
150         --enable-fbdev \
151         --disable-mlib \
152         --disable-3dfx \
153         --disable-tdfxfb \
154         --disable-s3fb \
155         --disable-directfb \
156         --disable-zr \
157         --disable-bl \
158         --disable-tdfxvid \
159         --disable-tga \
160         --disable-pnm \
161         --disable-md5sum \
162         \
163         --enable-alsa \
164         --enable-ossaudio \
165         --disable-arts \
166         --disable-esd \
167         --disable-polyp \
168         --disable-jack \
169         --disable-openal \
170         --disable-nas \
171         --disable-sgiaudio \
172         --disable-sunaudio \
173         --disable-win32waveout \
174         --enable-select \
175         \
176         --disable-ass \
177         "
178
179 EXTRA_OECONF_append_arm = " --disable-decoder=vorbis_decoder \
180                             --disable-encoder=vorbis_encoder"
181 EXTRA_OECONF_append_c7x0 = " --enable-imageon "
182 EXTRA_OECONF_append_hx4700 = " --enable-imageon "
183
184 EXTRA_OECONF_append_armv6 = " --enable-armv6 "
185 EXTRA_OECONF_append_armv7a = "--enable-armv6 "
186
187 #build with support for the iwmmxt instruction and pxa270fb overlay support (pxa270 and up)
188 #not every iwmmxt machine has the lcd connected to pxafb, but building the module doesn't hurt 
189 MY_ARCH := "${PACKAGE_ARCH}"
190 PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'iwmmxt', 'iwmmxt', '${MY_ARCH}',d)}"
191
192 MY_TARGET_CC_ARCH := "${TARGET_CC_ARCH}"
193 TARGET_CC_ARCH = "${@base_contains('MACHINE_FEATURES', 'iwmmxt', '-march=iwmmxt -mtune=iwmmxt', '${MY_TARGET_CC_ARCH}',d)}"
194
195 EXTRA_OECONF_append = " ${@base_contains('MACHINE_FEATURES', 'iwmmxt', '--enable-pxa --enable-iwmmxt', '',d)} "
196 EXTRA_OECONF_append = " ${@base_contains('MACHINE_FEATURES', 'x86', '--enable-runtime-cpudetection', '',d)} "
197
198 FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O4 -ffast-math"
199 FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations  -ftree-vectorize -fomit-frame-pointer -O4 -ffast-math"
200 BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
201
202
203 do_configure() {
204         cp ${WORKDIR}/vo_w100.c ${S}/libvo
205         cp ${WORKDIR}/vo_w100_api.h ${S}/libvo
206         cp ${WORKDIR}/vo_w100_fb.h ${S}/libvo
207         cp ${WORKDIR}/vo_pxa.c ${S}/libvo
208         cp ${WORKDIR}/vo_pxa.h ${S}/libvo
209         cp ${WORKDIR}/simple_idct_armv5te.S ${S}/libavcodec/armv4l/
210
211         sed -i 's|/usr/include|${STAGING_INCDIR}|g' ${S}/configure
212         sed -i 's|/usr/lib|${STAGING_LIBDIR}|g' ${S}/configure
213         sed -i 's|/usr/\S*include[\w/]*||g' ${S}/configure
214         sed -i 's|/usr/\S*lib[\w/]*||g' ${S}/configure
215
216         ./configure ${EXTRA_OECONF}
217 }
218
219 do_compile () {
220         oe_runmake
221 }
222