kodi_17.bb 6.2 KB

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