Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | SUMMARY = "Kodi Media Center" |
| 2 | |
| 3 | LICENSE = "GPLv2" |
| 4 | LIC_FILES_CHKSUM = "file://LICENSE.GPL;md5=930e2a5f63425d8dd72dbd7391c43c46" |
| 5 | |
| 6 | FILESPATH =. "${FILE_DIRNAME}/kodi-17:" |
| 7 | |
| 8 | DEPENDS = " \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 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 | 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 Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 62 | |
| 63 | PROVIDES = "xbmc" |
| 64 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 65 | SRCREV = "6abeebd5ba371547c8f04272296433f5e4e28e86" |
| 66 | PV = "17.3+gitr${SRCPV}" |
| 67 | ADDONSPV = "17.1" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 68 | SRC_URI = "git://github.com/xbmc/xbmc.git;branch=Krypton \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 69 | 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 Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 82 | " |
| 83 | |
| 84 | SRC_URI_append_libc-musl = " \ |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 85 | file://0001-Fix-file_Emu-on-musl.patch \ |
| 86 | file://0002-Remove-FILEWRAP.patch \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 87 | " |
| 88 | SRC_URI[addons.md5sum] = "719614fa764011a18665d08af5c8c92f" |
| 89 | SRC_URI[addons.sha256sum] = "350da57408c27473eaf40e7f544bc94841bf101dc4346085260c5c4af0adac97" |
| 90 | |
| 91 | inherit autotools-brokensep gettext pythonnative distro_features_check |
| 92 | |
| 93 | REQUIRED_DISTRO_FEATURES += "opengl" |
| 94 | |
| 95 | S = "${WORKDIR}/git" |
| 96 | |
| 97 | # breaks compilation |
| 98 | ASNEEDED = "" |
| 99 | |
| 100 | ACCEL ?= "" |
| 101 | ACCEL_x86 = "vaapi vdpau" |
| 102 | ACCEL_x86-64 = "vaapi vdpau" |
| 103 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 104 | PACKAGECONFIG ??= "${ACCEL} opengl \ |
| 105 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', 'openglesv2', d)} \ |
| 106 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'samba', '', d)} \ |
| 107 | " |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 108 | |
| 109 | PACKAGECONFIG[opengl] = "--enable-gl,--enable-gles," |
| 110 | PACKAGECONFIG[openglesv2] = "--enable-gles,--enable-gl,virtual/egl" |
| 111 | PACKAGECONFIG[vaapi] = "--enable-vaapi,--disable-vaapi,libva" |
| 112 | PACKAGECONFIG[vdpau] = "--enable-vdpau,--disable-vdpau,libvdpau" |
| 113 | PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5" |
| 114 | PACKAGECONFIG[x11] = "--enable-x11,--disable-x11,libxinerama libxmu libxrandr libxtst" |
| 115 | PACKAGECONFIG[pulseaudio] = "--enable-pulse,--disable-pulse,pulseaudio" |
| 116 | PACKAGECONFIG[lcms] = "--enable-lcms2,--disable-lcms2,lcms" |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 117 | PACKAGECONFIG[samba] = "--enable-samba,--disable-samba,samba" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 118 | |
| 119 | EXTRA_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 | |
| 133 | FULL_OPTIMIZATION_armv7a = "-fexpensive-optimizations -fomit-frame-pointer -O3 -ffast-math" |
| 134 | FULL_OPTIMIZATION_armv7ve = "-fexpensive-optimizations -fomit-frame-pointer -O3 -ffast-math" |
| 135 | BUILD_OPTIMIZATION = "${FULL_OPTIMIZATION}" |
| 136 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 137 | LDFLAGS_append_mips = " -latomic" |
| 138 | LDFLAGS_append_mipsel = " -latomic" |
| 139 | LDFLAGS_append_powerpc = " -latomic" |
| 140 | LDFLAGS_append_arm = " -latomic" |
| 141 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 142 | EXTRA_OECONF_append = " LIBTOOL=${STAGING_BINDIR_CROSS}/${HOST_SYS}-libtool" |
| 143 | |
| 144 | # for python modules |
| 145 | export HOST_SYS |
| 146 | export BUILD_SYS |
| 147 | export STAGING_LIBDIR |
| 148 | export STAGING_INCDIR |
| 149 | export PYTHON_DIR |
| 150 | |
| 151 | def 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 | |
| 156 | do_configure() { |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 157 | tar xf ${WORKDIR}/${BPN}-${ADDONSPV}-generated-addons.tar.xz -C ${S}/ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 158 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 159 | ( for i in $(find ${S} -name configure.ac -or -name configure.in|grep -v ".pc") ; do |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 160 | 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 Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 165 | |
| 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 | |
| 171 | do_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 | |
| 181 | INSANE_SKIP_${PN} = "rpaths" |
| 182 | |
| 183 | FILES_${PN} += "${datadir}/xsessions ${datadir}/icons ${libdir}/xbmc ${datadir}/xbmc" |
| 184 | FILES_${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 Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 188 | RRECOMMENDS_${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 Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 204 | " |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 205 | RRECOMMENDS_${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 Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 213 | |
| 214 | RPROVIDES_${PN} += "xbmc" |
| 215 | |
| 216 | TOOLCHAIN = "gcc" |