dvbapp : TranscodingSetup update
[vuplus_openembedded] / recipes / mplayer / mplayer_svn.bb
1 DESCRIPTION = "Open Source multimedia player."
2 SECTION = "multimedia"
3 PRIORITY = "optional"
4 HOMEPAGE = "http://www.mplayerhq.hu/"
5 DEPENDS = "live555 libdvdread libtheora virtual/libsdl ffmpeg xsp zlib libpng jpeg liba52 freetype fontconfig alsa-lib lzo ncurses lame libxv virtual/libx11 virtual/kernel \
6            ${@base_conditional('ENTERPRISE_DISTRO', '1', '', 'libmad liba52 lame', d)}"
7
8 RDEPENDS = "mplayer-common"
9 LICENSE = "GPL"
10 SRC_URI = "svn://svn.mplayerhq.hu/mplayer;module=trunk \
11            file://makefile-nostrip-svn.patch;patch=1 \
12            file://mplayer-arm-pld.patch;patch=1 \
13            file://mplayer-lavc-arm.patch;patch=1 \
14        file://fix-exp.diff;patch=1;maxrev=30291 \
15            file://fix-addrinfo.patch;patch=1;maxrev=30302 \
16        file://fix-avconfig.diff;patch=1;maxrev=30376 \
17 "
18
19 SRCREV = "30165"
20 SRC_URI_append_armv7a = " \
21                 file://omapfb.patch;patch=1 \
22            file://vo_omapfb.c \
23            file://yuv.S \
24           "
25
26 # This is required for the collie machine only as all stacks in that
27 # machine seem to be set to executable by the toolchain. If someone
28 # discovers this is more general than please make this more general
29 # ie. for all armv4 machines.
30 SRC_URI_append_collie = "file://disable-executable-stack-test.patch;patch=1"
31
32 PACKAGE_ARCH_collie = "collie"
33 PACKAGE_ARCH_c7x0 = "c7x0"
34 PACKAGE_ARCH_hx4700 = "hx4700"
35
36 ARM_INSTRUCTION_SET = "ARM"
37
38 RCONFLICTS_${PN} = "mplayer-atty"
39 RREPLACES_${PN} = "mplayer-atty"
40
41 PV = "0.0+1.0rc3+svnr${SRCPV}"
42 PR = "r17"
43 DEFAULT_PREFERENCE = "-1"
44 DEFAULT_PREFERENCE_angstrom = "1"
45
46 PARALLEL_MAKE = ""
47
48 S = "${WORKDIR}/trunk"
49
50 PACKAGES =+ "mencoder"
51
52 FILES_${PN} = "${bindir}/mplayer ${libdir}"
53 FILES_mencoder = "${bindir}/mencoder"
54
55 inherit autotools pkgconfig
56
57 # We want a kernel header for armv7a, but we don't want to make mplayer machine specific for that
58 STAGING_KERNEL_DIR = "${STAGING_DIR}/${MACHINE_ARCH}${TARGET_VENDOR}-${TARGET_OS}/kernel"
59
60 EXTRA_OECONF = " \
61         --prefix=/usr \
62         --mandir=${mandir} \
63         --target=${SIMPLE_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         --enable-tv \
75         --enable-tv-v4l1 \       
76         --enable-tv-v4l2 \
77         --disable-tv-bsdbt848 \
78         --enable-rtc \
79         --enable-network \
80         --disable-smb \
81         --enable-live \
82         --disable-dvdnav \
83         --enable-dvdread \
84         --disable-dvdread-internal \
85         --enable-libdvdcss-internal \
86         --disable-cdparanoia \
87         --enable-freetype \
88         --enable-menu \
89         --enable-sortsub \
90         --disable-fribidi \
91         --disable-enca \
92         --disable-ftp \
93         --disable-vstream \
94         \
95         --disable-gif \
96         --enable-png \
97         --enable-jpeg \
98         --disable-libcdio \
99         --disable-liblzo \
100         --disable-qtx \
101         --disable-xanim \
102         --disable-real \
103         --disable-xvid \
104         --disable-x264 \
105         \
106         --disable-libavutil_so \
107         --disable-libavcodec_so \
108         --disable-libavformat_so \
109         --disable-libpostproc_so \
110         \
111         --enable-tremor-low \
112         \
113         --disable-speex \
114         --enable-theora \
115         --disable-faac \
116         --disable-ladspa \
117         --disable-libdv \
118         --enable-mad \
119         --disable-toolame \
120         --disable-twolame \
121         --disable-xmms \
122         --disable-mp3lib \
123         --enable-libmpeg2 \
124         --disable-musepack \
125         \
126         --disable-gl \
127         --disable-vesa \
128         --disable-svga \
129         --enable-sdl \
130         --disable-aa \
131         --disable-caca \
132         --disable-ggi \
133         --disable-ggiwmh \
134         --disable-directx \
135         --disable-dxr2 \
136         --disable-dxr3 \
137         --disable-dvb \
138         --enable-dvbhead \
139         --disable-mga \
140         --disable-xmga \
141         --enable-xv \
142         --disable-xvmc \
143         --disable-vm \
144         --disable-xinerama \
145         --enable-x11 \
146         --enable-fbdev \
147         --disable-mlib \
148         --disable-3dfx \
149         --disable-tdfxfb \
150         --disable-s3fb \
151         --disable-directfb \
152         --disable-zr \
153         --disable-bl \
154         --disable-tdfxvid \
155         --disable-tga \
156         --disable-pnm \
157         --disable-md5sum \
158         \
159         --enable-alsa \
160         --enable-ossaudio \
161         --disable-arts \
162         --disable-esd \
163         --disable-pulse \
164         --disable-jack \
165         --disable-openal \
166         --disable-nas \
167         --disable-sgiaudio \
168         --disable-sunaudio \
169         --disable-win32waveout \
170         --enable-select \
171         \
172         --extra-libs=' -lBasicUsageEnvironment -lUsageEnvironment -lgroupsock -lliveMedia -lstdc++' \
173     --enable-protocol='file_protocol pipe_protocol http_protocol rtmp_protocol tcp_protocol udp_protocol' \
174 "
175
176 EXTRA_OECONF_append_arm = " --disable-decoder=vorbis_decoder \
177                                 --disable-encoder=vorbis_encoder"
178
179 EXTRA_OECONF_append_armv6 = " --enable-armv6"
180 EXTRA_OECONF_append_armv7a = " --enable-armv6 --enable-neon"
181
182
183 #build with support for the iwmmxt instruction and pxa270fb overlay support (pxa270 and up)
184 #not every iwmmxt machine has the lcd connected to pxafb, but building the module doesn't hurt 
185 MY_ARCH := "${PACKAGE_ARCH}"
186 PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'iwmmxt', 'iwmmxt', '${MY_ARCH}',d)}"
187
188 MY_TARGET_CC_ARCH := "${TARGET_CC_ARCH}"
189 TARGET_CC_ARCH = "${@base_contains('MACHINE_FEATURES', 'iwmmxt', '-march=iwmmxt -mtune=iwmmxt', '${MY_TARGET_CC_ARCH}',d)}"
190
191 EXTRA_OECONF_append = " ${@base_contains('MACHINE_FEATURES', 'iwmmxt', ' --enable-iwmmxt', '',d)} "
192 EXTRA_OECONF_append = " ${@base_contains('MACHINE_FEATURES', 'x86', '--enable-runtime-cpudetection', '',d)} "
193
194 FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O4 -ffast-math"
195 FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations  -ftree-vectorize -fomit-frame-pointer -O4 -ffast-math"
196 BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
197 # FIXME: Temporarily disable debugging to work-around http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37987
198 DEBUG_OPTIMIZATION_spitz = "-O -fomit-frame-pointer -g"
199 DEBUG_OPTIMIZATION_akita = "-O -fomit-frame-pointer -g"
200
201 do_configure_prepend_armv7a() {
202         cp ${WORKDIR}/yuv.S ${S}/libvo
203         cp ${WORKDIR}/vo_omapfb.c ${S}/libvo
204         cp ${STAGING_KERNEL_DIR}/arch/arm/plat-omap/include/mach/omapfb.h ${S}/libvo/omapfb.h || true
205         cp ${STAGING_KERNEL_DIR}/include/asm-arm/arch-omap/omapfb.h ${S}/libvo/omapfb.h || true
206         cp ${STAGING_KERNEL_DIR}/include/linux/omapfb.h ${S}/libvo/omapfb.h || true
207         sed -e 's/__user//g' -i ${S}/libvo/omapfb.h || true
208 }
209
210 CFLAGS_append = " -I${S}/libdvdread4 "
211
212 do_configure() {
213         sed -i 's|/usr/include|${STAGING_INCDIR}|g' ${S}/configure
214         sed -i 's|/usr/lib|${STAGING_LIBDIR}|g' ${S}/configure
215         sed -i 's|/usr/\S*include[\w/]*||g' ${S}/configure
216         sed -i 's|/usr/\S*lib[\w/]*||g' ${S}/configure
217         sed -i 's|HOST_CC|BUILD_CC|' ${S}/Makefile
218
219         export SIMPLE_TARGET_SYS="$(echo ${TARGET_SYS} | sed s:${TARGET_VENDOR}::g)"
220         ./configure ${EXTRA_OECONF}
221         
222 }
223
224 do_compile () {
225         oe_runmake
226 }
227