blob: 43c32fbc5772f75549235b1c8749295157175c44 [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001SUMMARY = "Kodi Media Center"
2
3LICENSE = "GPLv2"
4LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=930e2a5f63425d8dd72dbd7391c43c46"
5
6FILESPATH =. "${FILE_DIRNAME}/kodi-17:"
7
8DEPENDS = " \
9 cmake-native \
10 curl-native \
11 gperf-native \
12 jsonschemabuilder-native \
13 nasm-native \
14 swig-native \
15 unzip-native \
16 yasm-native \
17 zip-native \
18 avahi \
19 boost \
20 bzip2 \
21 curl \
22 dcadec \
23 enca \
24 expat \
25 faad2 \
26 ffmpeg \
27 fontconfig \
28 fribidi \
29 giflib \
30 jasper \
31 libass \
32 libcdio \
33 libcec \
34 libmad \
35 libmicrohttpd \
36 libmms \
37 libmms \
38 libmodplug \
39 libpcre \
40 libplist \
41 libsamplerate0 \
42 libsdl-image \
43 libsdl-mixer \
44 libsquish \
45 libssh \
46 libtinyxml \
47 libusb1 \
48 libxslt \
49 lzo \
50 mpeg2dec \
51 python \
52 samba \
53 sqlite3 \
54 taglib \
55 virtual/egl \
56 virtual/libsdl \
57 wavpack \
58 yajl \
59 zlib \
60 ${@enable_glew(bb, d)} \
61 "
62
63PROVIDES = "xbmc"
64
65SRCREV = "661dd08d221f5b2bf509a696a6aca5ee7d45bb27"
66BASEPV = "17.1"
67PV = "${BASEPV}+gitr${SRCPV}"
68SRC_URI = "git://github.com/xbmc/xbmc.git;branch=Krypton \
69 https://repo.voidlinux.eu/distfiles/${BPN}-${BASEPV}-generated-addons.tar.xz;name=addons;unpack=0 \
70 file://0003-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch \
71 file://0004-handle-SIGTERM.patch \
72 file://0005-add-support-to-read-frequency-output-if-using-intel-.patch \
73 file://0006-Disable-DVD-support.patch \
74 file://0007-Always-compile-libcpluff-as-PIC.patch \
75 file://0008-kodi-config.cmake-use-CMAKE_FIND_ROOT_PATH-to-fix-cr.patch \
76 file://0009-build-Add-support-for-musl-triplets.patch \
77 file://0010-RssReader-Fix-compiler-warning-comparing-pointer-to-.patch \
78 file://0011-Let-configure-pass-on-unknown-architectures-setting-.patch \
79 file://0012-Revert-droid-fix-builds-with-AML-disabled.patch \
80 file://0001-change-order-of-detecting-libegl-and-libgles2.patch \
81 file://0013-FTPParse.cpp-use-std-string.patch \
82"
83
84SRC_URI_append_libc-musl = " \
85 file://0001-Fix-file_Emu-on-musl.patch \
86 file://0002-Remove-FILEWRAP.patch \
87"
88SRC_URI[addons.md5sum] = "719614fa764011a18665d08af5c8c92f"
89SRC_URI[addons.sha256sum] = "350da57408c27473eaf40e7f544bc94841bf101dc4346085260c5c4af0adac97"
90
91inherit autotools-brokensep gettext pythonnative distro_features_check
92
93REQUIRED_DISTRO_FEATURES += "opengl"
94
95S = "${WORKDIR}/git"
96
97# breaks compilation
98ASNEEDED = ""
99
100ACCEL ?= ""
101ACCEL_x86 = "vaapi vdpau"
102ACCEL_x86-64 = "vaapi vdpau"
103
104PACKAGECONFIG ??= "${ACCEL} opengl"
105PACKAGECONFIG_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' x11', ' openglesv2', d)}"
106
107PACKAGECONFIG[opengl] = "--enable-gl,--enable-gles,"
108PACKAGECONFIG[openglesv2] = "--enable-gles,--enable-gl,virtual/egl"
109PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
110PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
111PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5"
112PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,libxinerama libxmu libxrandr libxtst"
113PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio"
114PACKAGECONFIG[lcms] = "--enable-lcms2,--disable-lcms2,lcms"
115
116EXTRA_OECONF = " \
117 --disable-debug \
118 --disable-libcap \
119 --disable-ccache \
120 --disable-mid \
121 --enable-libusb \
122 --enable-alsa \
123 --enable-airplay \
124 --disable-optical-drive \
125 --with-ffmpeg=shared \
126 --enable-texturepacker=no \
127 ac_cv_path_JAVA_EXE=/bin/true \
128"
129
130FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O3 -ffast-math"
131FULL_OPTIMIZATION_armv7ve = "-fexpensive-optimizations -fomit-frame-pointer -O3 -ffast-math"
132BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
133
134EXTRA_OECONF_append = " LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"
135
136# for python modules
137export HOST_SYS
138export BUILD_SYS
139export STAGING_LIBDIR
140export STAGING_INCDIR
141export PYTHON_DIR
142
143def enable_glew(bb, d):
144 if bb.utils.contains('PACKAGECONFIG', 'x11', True, False, d) and bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d):
145 return "glew"
146 return ""
147
148do_configure() {
149 tar xf ${WORKDIR}/${BPN}-${BASEPV}-generated-addons.tar.xz -C ${S}/
150
151 ( for i in $(find ${S} -name "configure.*" ) ; do
152 cd $(dirname $i) && gnu-configize --force || true
153 done )
154 ( for f in ${S}/xbmc/interfaces/python/generated/*.cpp; do
155 touch `echo $f|sed -e 's/.cpp$/.xml/g'`
156 done )
157 make -C tools/depends/target/crossguid PREFIX=${STAGING_DIR_HOST}${prefix}
158
159 BOOTSTRAP_STANDALONE=1 make -f bootstrap.mk JSON_BUILDER="${STAGING_BINDIR_NATIVE}/JsonSchemaBuilder"
160 BOOTSTRAP_STANDALONE=1 make JAVA=/bin/true -f codegenerator.mk JSON_BUILDER="${STAGING_BINDIR_NATIVE}/JsonSchemaBuilder"
161 oe_runconf
162}
163
164do_compile_prepend() {
165 for i in $(find . -name "Makefile") ; do
166 sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' $i
167 done
168
169 for i in $(find . -name "*.mak*" -o -name "Makefile") ; do
170 sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' -e 's:-rpath \$(libdir):-rpath ${libdir}:g' $i
171 done
172}
173
174INSANE_SKIP_${PN} = "rpaths"
175
176FILES_${PN} += "${datadir}/xsessions ${datadir}/icons ${libdir}/xbmc ${datadir}/xbmc"
177FILES_${PN}-dbg += "${libdir}/kodi/.debug ${libdir}/kodi/*/.debug ${libdir}/kodi/*/*/.debug ${libdir}/kodi/*/*/*/.debug"
178
179# kodi uses some kind of dlopen() method for libcec so we need to add it manually
180# OpenGL builds need glxinfo, that's in mesa-demos
181RRECOMMENDS_${PN}_append = " libcec \
182 python \
183 python-ctypes \
184 python-lang \
185 python-re \
186 python-netclient \
187 python-html \
188 python-difflib \
189 python-json \
190 python-zlib \
191 python-shell \
192 python-sqlite3 \
193 python-compression \
194 libcurl \
195 ${@bb.utils.contains('PACKAGECONFIG', 'x11', 'xrandr xdpyinfo', '', d)} \
196"
197RRECOMMENDS_${PN}_append_libc-glibc = " glibc-charmap-ibm850 \
198 glibc-gconv-ibm850 \
199 glibc-gconv-unicode \
200 glibc-gconv-utf-32 \
201 glibc-charmap-utf-8 \
202 glibc-localedata-en-us \
203 "
204
205RPROVIDES_${PN} += "xbmc"
206
207TOOLCHAIN = "gcc"