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