blob: 295618914b5bf06a9e72ad37148a9befa4b7e447 [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 = " \
Brad Bishop316dfdd2018-06-25 12:45:53 -04009 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 crossguid \
22 curl \
23 dcadec \
24 enca \
25 expat \
26 faad2 \
27 ffmpeg \
28 fontconfig \
29 fribidi \
30 giflib \
31 jasper \
32 libass \
33 libcdio \
34 libcec \
35 libmad \
36 libmicrohttpd \
37 libmms \
38 libmms \
39 libmodplug \
40 libpcre \
41 libplist \
42 libsamplerate0 \
43 libsdl-image \
44 libsdl-mixer \
45 libsquish \
46 libssh \
47 libtinyxml \
48 libusb1 \
49 libxslt \
50 lzo \
51 mpeg2dec \
52 python \
53 sqlite3 \
54 taglib \
55 virtual/egl \
56 virtual/libsdl \
57 wavpack \
58 yajl \
59 zlib \
60 ${@enable_glew(bb, d)} \
61"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050062
63PROVIDES = "xbmc"
64
Brad Bishopd7bf8c12018-02-25 22:55:05 -050065SRCREV = "6abeebd5ba371547c8f04272296433f5e4e28e86"
66PV = "17.3+gitr${SRCPV}"
67ADDONSPV = "17.1"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050068SRC_URI = "git://github.com/xbmc/xbmc.git;branch=Krypton \
Brad Bishop316dfdd2018-06-25 12:45:53 -040069 https://repo.voidlinux.eu/distfiles/${BPN}-${ADDONSPV}-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 \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050082"
83
84SRC_URI_append_libc-musl = " \
Brad Bishop316dfdd2018-06-25 12:45:53 -040085 file://0001-Fix-file_Emu-on-musl.patch \
86 file://0002-Remove-FILEWRAP.patch \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050087"
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
Brad Bishop316dfdd2018-06-25 12:45:53 -0400104PACKAGECONFIG ??= "${ACCEL} opengl \
105 ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'openglesv2', d)} \
106 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'samba', '', d)} \
107"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500108
109PACKAGECONFIG[opengl] = "--enable-gl,--enable-gles,"
110PACKAGECONFIG[openglesv2] = "--enable-gles,--enable-gl,virtual/egl"
111PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
112PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
113PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5"
114PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,libxinerama libxmu libxrandr libxtst"
115PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio"
116PACKAGECONFIG[lcms] = "--enable-lcms2,--disable-lcms2,lcms"
Brad Bishop316dfdd2018-06-25 12:45:53 -0400117PACKAGECONFIG[samba] = "--enable-samba,--disable-samba,samba"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500118
119EXTRA_OECONF = " \
120 --disable-debug \
121 --disable-libcap \
122 --disable-ccache \
123 --disable-mid \
124 --enable-libusb \
125 --enable-alsa \
126 --enable-airplay \
127 --disable-optical-drive \
128 --with-ffmpeg=shared \
129 --enable-texturepacker=no \
130 ac_cv_path_JAVA_EXE=/bin/true \
131"
132
133FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O3 -ffast-math"
134FULL_OPTIMIZATION_armv7ve = "-fexpensive-optimizations -fomit-frame-pointer -O3 -ffast-math"
135BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
136
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500137LDFLAGS_append_mips = " -latomic"
138LDFLAGS_append_mipsel = " -latomic"
139LDFLAGS_append_powerpc = " -latomic"
140LDFLAGS_append_arm = " -latomic"
141
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500142EXTRA_OECONF_append = " LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"
143
144# for python modules
145export HOST_SYS
146export BUILD_SYS
147export STAGING_LIBDIR
148export STAGING_INCDIR
149export PYTHON_DIR
150
151def enable_glew(bb, d):
152 if bb.utils.contains('PACKAGECONFIG', 'x11', True, False, d) and bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d):
153 return "glew"
154 return ""
155
156do_configure() {
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500157 tar xf ${WORKDIR}/${BPN}-${ADDONSPV}-generated-addons.tar.xz -C ${S}/
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500158
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500159 ( for i in $(find ${S} -name configure.ac -or -name configure.in|grep -v ".pc") ; do
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500160 cd $(dirname $i) && gnu-configize --force || true
161 done )
162 ( for f in ${S}/xbmc/interfaces/python/generated/*.cpp; do
163 touch `echo $f|sed -e 's/.cpp$/.xml/g'`
164 done )
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500165
166 BOOTSTRAP_STANDALONE=1 make -f bootstrap.mk JSON_BUILDER="${STAGING_BINDIR_NATIVE}/JsonSchemaBuilder"
167 BOOTSTRAP_STANDALONE=1 make JAVA=/bin/true -f codegenerator.mk JSON_BUILDER="${STAGING_BINDIR_NATIVE}/JsonSchemaBuilder"
168 oe_runconf
169}
170
171do_compile_prepend() {
172 for i in $(find . -name "Makefile") ; do
173 sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' $i
174 done
175
176 for i in $(find . -name "*.mak*" -o -name "Makefile") ; do
177 sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' -e 's:-rpath \$(libdir):-rpath ${libdir}:g' $i
178 done
179}
180
181INSANE_SKIP_${PN} = "rpaths"
182
183FILES_${PN} += "${datadir}/xsessions ${datadir}/icons ${libdir}/xbmc ${datadir}/xbmc"
184FILES_${PN}-dbg += "${libdir}/kodi/.debug ${libdir}/kodi/*/.debug ${libdir}/kodi/*/*/.debug ${libdir}/kodi/*/*/*/.debug"
185
186# kodi uses some kind of dlopen() method for libcec so we need to add it manually
187# OpenGL builds need glxinfo, that's in mesa-demos
Brad Bishop316dfdd2018-06-25 12:45:53 -0400188RRECOMMENDS_${PN}_append = " \
189 libcec \
190 python \
191 python-ctypes \
192 python-lang \
193 python-re \
194 python-netclient \
195 python-html \
196 python-difflib \
197 python-json \
198 python-zlib \
199 python-shell \
200 python-sqlite3 \
201 python-compression \
202 libcurl \
203 ${@bb.utils.contains('PACKAGECONFIG', 'x11', 'xrandr xdpyinfo', '', d)} \
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500204"
Brad Bishop316dfdd2018-06-25 12:45:53 -0400205RRECOMMENDS_${PN}_append_libc-glibc = " \
206 glibc-charmap-ibm850 \
207 glibc-gconv-ibm850 \
208 glibc-gconv-unicode \
209 glibc-gconv-utf-32 \
210 glibc-charmap-utf-8 \
211 glibc-localedata-en-us \
212"
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500213
214RPROVIDES_${PN} += "xbmc"
215
216TOOLCHAIN = "gcc"