Fix SRC_URI from archive.vuplus.com to code.vuplus.com
[vuplus_openvuplus_3.0] / meta-bsp / recipes-multimedia / xbmc / xbmc.inc
1 SUMMARY = "XBMC Media Center"
2
3 LICENSE = "GPLv2"
4 LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=6eb631b6da7fdb01508a80213ffc35ff"
5
6 DEPENDS = "libgles libxslt libusb1 libcec libplist expat yajl gperf-native fribidi mpeg2dec samba fontconfig curl python libass libmodplug libmicrohttpd wavpack libmms cmake-native libsdl-image libsdl-mixer mysql5 sqlite3 libmms faad2 libcdio libpcre boost lzo enca avahi libsamplerate0  bzip2 virtual/libsdl jasper zip-native zlib libtinyxml taglib libbluray libshairport librtmp zlib libnfs libxslt"
7
8 PROVIDES += "xbmc"
9 RPROVIDES_${PN} += "xbmc"
10
11 RDEPENDS_${PN} = "python"
12 RDEPENDS_${PN} += "\
13         python-distutils \
14         python-subprocess \
15         python-robotparser \
16         python-mechanize \
17         python-threading \
18         python-shell \
19         python-zlib \
20         python-sqlite3 \
21         python-json \
22         python-xml \
23         python-html \
24         python-netserver \
25         python-misc \
26         python-pygobject \
27         python-pygobject-lib \
28         python-textutils \
29         python-simplejson \
30         python-xmlrpc   \
31         python-pprint \
32         python-difflib \
33         python-email \
34         python-compression \
35         python-compile \
36         python-compiler \
37         python-numbers \
38         nfs-utils-client \
39         libshairport \
40         glibc-gconv-utf-32 \
41         xz \
42         tiff \
43         yajl \
44         libxslt \
45         libupnp \
46         libplist \
47         librtmp \
48         libbluray \
49         libnfs \
50 "
51
52 BRANCH = "gotham_vuplus"
53 SRCREV = "5ae20573a048d4ae67e23c0957b7efaa62179c34"
54
55 PV = "13.2"
56 PR = "${BUILD_PR}_${GLPR}_${SRCREV}"
57
58 SRC_URI = "git://code.vuplus.com/git/xbmc.git;protocol=http;branch=${BRANCH};tag=${SRCREV} \
59         http://code.vuplus.com/download/release/support/xbmc-support_${GLPR}${GLARCH}.tar.gz;name=xbmc-support \
60 "
61
62 inherit autotools-brokensep gettext python-dir
63
64 S = "${WORKDIR}/git"
65
66 CACHED_CONFIGUREVARS += " \
67  ac_cv_path_PYTHON="${STAGING_BINDIR_NATIVE}/python-native/python" \
68 "
69
70 EXTRA_OECONF = " \
71         --enable-gles \
72         --enable-libusb \
73         --enable-airplay \
74         --disable-optical-drive \
75         --enable-external-libraries \
76         --disable-ssh \
77         --disable-x11 \
78         --disable-sdl \
79         --disable-joystick \
80         --disable-alsa \
81         --disable-libcec \
82         --enable-rtmp   \
83         --disable-texturepacker \
84 "
85 #EXTRA_OECONF_append_armv7a = " --cpu=cortex-a8 "
86
87 FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O4 -ffast-math"
88 BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
89
90 # for python modules
91 export HOST_SYS
92 export BUILD_SYS
93 export STAGING_LIBDIR
94 export STAGING_INCDIR
95 export PYTHON_DIR
96
97 do_configure() {
98         cp -av ${WORKDIR}/xbmc-support/gles_init.* ${WORKDIR}/git/xbmc/windowing/egl/
99         ./bootstrap
100         oe_runconf
101 }
102
103 #PARALLEL_MAKE = " -j8 "
104
105 do_compile_prepend() {
106         for i in $(find . -name "Makefile") ; do
107                 sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' $i
108         done
109
110         for i in $(find . -name "*.mak*" -o     -name "Makefile") ; do
111                 sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' -e 's:-rpath \$(libdir):-rpath ${libdir}:g' $i
112         done
113 }
114
115 INSANE_SKIP_${PN} = "rpaths"
116
117 # on ARM architectures xbmc will use GLES which will make the regular wrapper fail, so start it directly
118 #do_install_append_arm() {
119 #       sed -i -e 's:Exec=xbmc:Exec=${libdir}/xbmc/xbmc.bin:g' ${D}${datadir}/applications/xbmc.desktop
120 #}
121
122 do_install_append(){
123         install -d ${D}${bindir}
124         install -m 0755 ${WORKDIR}/xbmc-support/xbmc.helper ${D}${bindir}
125 }
126
127 do_package_qa(){
128 }
129
130 FILES_${PN} += "${datadir}/xsessions ${datadir}/icons"
131 FILES_${PN} += "/usr/bin /usr/share /usr/lib"
132 FILES_${PN}-dbg += "${libdir}/xbmc/.debug ${libdir}/xbmc/*/.debug ${libdir}/xbmc/*/*/.debug ${libdir}/xbmc/*/*/*/.debug"
133
134 # xbmc uses some kind of dlopen() method for libcec so we need to add it manually
135 RRECOMMENDS_${PN}_append = " libcec \
136                              python \
137                              python-lang \
138                              python-re \
139                              python-netclient \
140                              libcurl \
141                              "
142 RRECOMMENDS_${PN}_append_libc-glibc = " glibc-charmap-ibm850 glibc-gconv-ibm850"
143
144 INSANE_SKIP_${PN} = "already-stripped"
145
146 PACKAGE_ARCH := "${MACHINE_ARCH}"
147