blob: 5158f05b66d6b11eb8e379fa61ba7bb7a12437b6 [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 \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050021 crossguid \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050022 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 samba \
54 sqlite3 \
55 taglib \
56 virtual/egl \
57 virtual/libsdl \
58 wavpack \
59 yajl \
60 zlib \
61 ${@enable_glew(bb, d)} \
62 "
63
64PROVIDES = "xbmc"
65
Brad Bishopd7bf8c12018-02-25 22:55:05 -050066SRCREV = "6abeebd5ba371547c8f04272296433f5e4e28e86"
67PV = "17.3+gitr${SRCPV}"
68ADDONSPV = "17.1"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050069SRC_URI = "git://github.com/xbmc/xbmc.git;branch=Krypton \
Brad Bishopd7bf8c12018-02-25 22:55:05 -050070 https://repo.voidlinux.eu/distfiles/${BPN}-${ADDONSPV}-generated-addons.tar.xz;name=addons;unpack=0 \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050071 file://0003-configure-don-t-try-to-run-stuff-to-find-tinyxml.patch \
72 file://0004-handle-SIGTERM.patch \
73 file://0005-add-support-to-read-frequency-output-if-using-intel-.patch \
74 file://0006-Disable-DVD-support.patch \
75 file://0007-Always-compile-libcpluff-as-PIC.patch \
76 file://0008-kodi-config.cmake-use-CMAKE_FIND_ROOT_PATH-to-fix-cr.patch \
77 file://0009-build-Add-support-for-musl-triplets.patch \
78 file://0010-RssReader-Fix-compiler-warning-comparing-pointer-to-.patch \
79 file://0011-Let-configure-pass-on-unknown-architectures-setting-.patch \
80 file://0012-Revert-droid-fix-builds-with-AML-disabled.patch \
81 file://0001-change-order-of-detecting-libegl-and-libgles2.patch \
82 file://0013-FTPParse.cpp-use-std-string.patch \
83"
84
85SRC_URI_append_libc-musl = " \
86 file://0001-Fix-file_Emu-on-musl.patch \
87 file://0002-Remove-FILEWRAP.patch \
88"
89SRC_URI[addons.md5sum] = "719614fa764011a18665d08af5c8c92f"
90SRC_URI[addons.sha256sum] = "350da57408c27473eaf40e7f544bc94841bf101dc4346085260c5c4af0adac97"
91
92inherit autotools-brokensep gettext pythonnative distro_features_check
93
94REQUIRED_DISTRO_FEATURES += "opengl"
95
96S = "${WORKDIR}/git"
97
98# breaks compilation
99ASNEEDED = ""
100
101ACCEL ?= ""
102ACCEL_x86 = "vaapi vdpau"
103ACCEL_x86-64 = "vaapi vdpau"
104
105PACKAGECONFIG ??= "${ACCEL} opengl"
106PACKAGECONFIG_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' x11', ' openglesv2', d)}"
107
108PACKAGECONFIG[opengl] = "--enable-gl,--enable-gles,"
109PACKAGECONFIG[openglesv2] = "--enable-gles,--enable-gl,virtual/egl"
110PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva"
111PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau"
112PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5"
113PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,libxinerama libxmu libxrandr libxtst"
114PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio"
115PACKAGECONFIG[lcms] = "--enable-lcms2,--disable-lcms2,lcms"
116
117EXTRA_OECONF = " \
118 --disable-debug \
119 --disable-libcap \
120 --disable-ccache \
121 --disable-mid \
122 --enable-libusb \
123 --enable-alsa \
124 --enable-airplay \
125 --disable-optical-drive \
126 --with-ffmpeg=shared \
127 --enable-texturepacker=no \
128 ac_cv_path_JAVA_EXE=/bin/true \
129"
130
131FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O3 -ffast-math"
132FULL_OPTIMIZATION_armv7ve = "-fexpensive-optimizations -fomit-frame-pointer -O3 -ffast-math"
133BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}"
134
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500135LDFLAGS_append_mips = " -latomic"
136LDFLAGS_append_mipsel = " -latomic"
137LDFLAGS_append_powerpc = " -latomic"
138LDFLAGS_append_arm = " -latomic"
139
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500140EXTRA_OECONF_append = " LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool"
141
142# for python modules
143export HOST_SYS
144export BUILD_SYS
145export STAGING_LIBDIR
146export STAGING_INCDIR
147export PYTHON_DIR
148
149def enable_glew(bb, d):
150 if bb.utils.contains('PACKAGECONFIG', 'x11', True, False, d) and bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d):
151 return "glew"
152 return ""
153
154do_configure() {
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500155 tar xf ${WORKDIR}/${BPN}-${ADDONSPV}-generated-addons.tar.xz -C ${S}/
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500156
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500157 ( for i in $(find ${S} -name configure.ac -or -name configure.in|grep -v ".pc") ; do
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500158 cd $(dirname $i) && gnu-configize --force || true
159 done )
160 ( for f in ${S}/xbmc/interfaces/python/generated/*.cpp; do
161 touch `echo $f|sed -e 's/.cpp$/.xml/g'`
162 done )
Brad Bishop6e60e8b2018-02-01 10:27:11 -0500163
164 BOOTSTRAP_STANDALONE=1 make -f bootstrap.mk JSON_BUILDER="${STAGING_BINDIR_NATIVE}/JsonSchemaBuilder"
165 BOOTSTRAP_STANDALONE=1 make JAVA=/bin/true -f codegenerator.mk JSON_BUILDER="${STAGING_BINDIR_NATIVE}/JsonSchemaBuilder"
166 oe_runconf
167}
168
169do_compile_prepend() {
170 for i in $(find . -name "Makefile") ; do
171 sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' $i
172 done
173
174 for i in $(find . -name "*.mak*" -o -name "Makefile") ; do
175 sed -i -e 's:I/usr/include:I${STAGING_INCDIR}:g' -e 's:-rpath \$(libdir):-rpath ${libdir}:g' $i
176 done
177}
178
179INSANE_SKIP_${PN} = "rpaths"
180
181FILES_${PN} += "${datadir}/xsessions ${datadir}/icons ${libdir}/xbmc ${datadir}/xbmc"
182FILES_${PN}-dbg += "${libdir}/kodi/.debug ${libdir}/kodi/*/.debug ${libdir}/kodi/*/*/.debug ${libdir}/kodi/*/*/*/.debug"
183
184# kodi uses some kind of dlopen() method for libcec so we need to add it manually
185# OpenGL builds need glxinfo, that's in mesa-demos
186RRECOMMENDS_${PN}_append = " libcec \
187 python \
188 python-ctypes \
189 python-lang \
190 python-re \
191 python-netclient \
192 python-html \
193 python-difflib \
194 python-json \
195 python-zlib \
196 python-shell \
197 python-sqlite3 \
198 python-compression \
199 libcurl \
200 ${@bb.utils.contains('PACKAGECONFIG', 'x11', 'xrandr xdpyinfo', '', d)} \
201"
202RRECOMMENDS_${PN}_append_libc-glibc = " glibc-charmap-ibm850 \
203 glibc-gconv-ibm850 \
204 glibc-gconv-unicode \
205 glibc-gconv-utf-32 \
206 glibc-charmap-utf-8 \
207 glibc-localedata-en-us \
208 "
209
210RPROVIDES_${PN} += "xbmc"
211
212TOOLCHAIN = "gcc"