Makefile 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include $(ADK_TOPDIR)/rules.mk
  4. PKG_NAME:= kodi
  5. PKG_VERSION:= 16.0
  6. PKG_RELEASE:= 2
  7. PKG_HASH:= 0421ea1337cdee674f8a36d995f54152b5ddc4100e53410b3aeeb3b3f7d53946
  8. PKG_DESCR:= software media player
  9. PKG_SECTION:= mm/video
  10. PKG_DEPENDS:= boost python2 libsquish libbluray
  11. PKG_DEPENDS+= libass libmpeg2 libmad libdbus libglew mesa
  12. PKG_DEPENDS+= libjpeg-turbo libogg libvorbis libmodplug libcurl
  13. PKG_DEPENDS+= libflac libbz2 libtiff liblzo libnettle librtmp
  14. PKG_DEPENDS+= yajl tinyxml libsqlite libpcrecpp libpng libncurses
  15. PKG_DEPENDS+= libpcre libcdio libfreetype libsamplerate libuuid
  16. PKG_DEPENDS+= taglib libjasper libmp3lame libmicrohttpd libgtk2
  17. PKG_DEPENDS+= libgpg-error libudev python2-mod-sqlite libffmpeg
  18. PKG_DEPENDS+= libxslt libvorbisenc alsa-lib glib libglu libdcadec
  19. PKG_BUILDDEP:= boost python2 libass ffmpeg libglew rtmpdump
  20. PKG_BUILDDEP+= libmpeg2 libmad libjpeg-turbo libogg libvorbis
  21. PKG_BUILDDEP+= curl flac bzip2 libtiff liblzo yajl mesa
  22. PKG_BUILDDEP+= tinyxml sqlite pcre libpng libcdio freetype
  23. PKG_BUILDDEP+= libsamplerate taglib libjasper lame libmicrohttpd
  24. PKG_BUILDDEP+= eudev alsa-lib glib glu libmodplug libgtk2
  25. PKG_BUILDDEP+= libgpg-error dbus libxslt libvorbis libbluray
  26. PKG_BUILDDEP+= swig-host liblzo-host libpng-host libjpeg-turbo-host
  27. PKG_BUILDDEP+= zip-host unzip-host giflib-host libsquish libdcadec
  28. PKG_BUILDDEP+= libcrossguid
  29. PKG_NEEDS:= threads rt c++
  30. PKG_URL:= http://kodi.tv/
  31. PKG_SITES:= http://mirrors.kodi.tv/releases/source/
  32. PKG_CFLINE_KODI:= select ADK_PACKAGE_GPU_VIV_BIN_MX6Q if ADK_TARGET_SYSTEM_SOLIDRUN_IMX6
  33. DISTFILES:= $(PKG_VERSION)-Jarvis.tar.gz
  34. WRKDIST= ${WRKDIR}/xbmc-$(PKG_VERSION)-Jarvis
  35. PKG_CHOICES_KODI:= WITH_LIBRESSL WITH_OPENSSL
  36. PKGCD_WITH_OPENSSL:= use openssl for crypto
  37. PKGCS_WITH_OPENSSL:= libopenssl
  38. PKGCB_WITH_OPENSSL:= openssl
  39. PKGCD_WITH_LIBRESSL:= use libressl for crypto
  40. PKGCS_WITH_LIBRESSL:= libressl
  41. PKGCB_WITH_LIBRESSL:= libressl
  42. PKG_FLAVOURS_KODI:= WITH_SMB WITH_NFS WITH_SSH WITH_AVAHI WITH_CEC
  43. PKG_FLAVOURS_KODI+= WITH_WEBSERVER WITH_LIRC
  44. PKGFD_WITH_SMB:= enable samba4 support
  45. PKGFB_WITH_SMB:= samba
  46. PKGFS_WITH_SMB:= samba
  47. PKGFD_WITH_NFS:= enable nfs support
  48. PKGFB_WITH_NFS:= libnfs
  49. PKGFS_WITH_NFS:= libnfs
  50. PKGFD_WITH_SSH:= enable ssh support
  51. PKGFB_WITH_SSH:= libssh
  52. PKGFS_WITH_SSH:= libssh
  53. PKGFD_WITH_AVAHI:= enable avahi support
  54. PKGFB_WITH_AVAHI:= avahi
  55. PKGFS_WITH_AVAHI:= libavahi
  56. PKGFD_WITH_CEC:= enable cec support
  57. PKGFB_WITH_CEC:= libcec
  58. PKGFS_WITH_CEC:= libcec
  59. PKGFD_WITH_LIRC:= enable lirc support
  60. PKGFB_WITH_LIRC:= lirc
  61. PKGFS_WITH_LIRC:= lirc
  62. PKGFD_WITH_WEBSERVER:= enable internal webserver support
  63. PKG_BUILDDEP_SOLIDRUN_IMX6:= gpu-viv-bin-mx6q
  64. PKG_SYSTEM_DEPENDS:= raspberry-pi raspberry-pi2 solidrun-imx6
  65. DIFF_IGNOREFILES:= configure missing depcomp install-sh INSTALL \
  66. aclocal.m4 config.h.in
  67. include $(ADK_TOPDIR)/mk/package.mk
  68. $(eval $(call PKG_template,KODI,kodi,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  69. HOST_CXXFLAGS+= $(HOST_CPPFLAGS)
  70. XAKE_FLAGS+= V=1 TIXML_USE_STL=1 GCC_HONOUR_COPTS=s
  71. TARGET_CPPFLAGS+= -I. -I./utils \
  72. -I$(STAGING_TARGET_DIR)/usr/include/afpfs-ng \
  73. -DTIXML_USE_STL=1 -DLINUX
  74. ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y)
  75. TARGET_CPPFLAGS+= -I$(STAGING_TARGET_DIR)/opt/vc/include \
  76. -I$(STAGING_TARGET_DIR)/opt/vc/include/interface/vcos/pthreads \
  77. -I$(STAGING_TARGET_DIR)/opt/vc/include/interface/vmcs_host/linux
  78. TARGET_LDFLAGS+= -L$(STAGING_TARGET_DIR)/opt/vc/lib
  79. endif
  80. ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI2),y)
  81. TARGET_CPPFLAGS+= -I$(STAGING_TARGET_DIR)/opt/vc/include \
  82. -I$(STAGING_TARGET_DIR)/opt/vc/include/interface/vcos/pthreads \
  83. -I$(STAGING_TARGET_DIR)/opt/vc/include/interface/vmcs_host/linux
  84. TARGET_LDFLAGS+= -L$(STAGING_TARGET_DIR)/opt/vc/lib
  85. endif
  86. AUTOTOOL_STYLE:= autoreconf
  87. CONFIGURE_ENV+= DESTDIR='${WRKINST}' \
  88. TEXTUREPACKER_NATIVE_ROOT='$(STAGING_HOST_DIR)/usr'
  89. CONFIGURE_ARGS+= --disable-optical-drive \
  90. --disable-optimizations \
  91. --disable-mysql \
  92. --disable-rsxs \
  93. --disable-projectm \
  94. --disable-mdnsembedded \
  95. --disable-libusb \
  96. --disable-libcap \
  97. --disable-joystick \
  98. --disable-dvdcss \
  99. --disable-gtest \
  100. --disable-ccache \
  101. --disable-wayland \
  102. --disable-pulse \
  103. --disable-mid \
  104. --disable-debug \
  105. --enable-alsa \
  106. --enable-rtmp \
  107. --enable-libbluray \
  108. --enable-texturepacker \
  109. --enable-udev \
  110. --with-ffmpeg=shared
  111. ifneq ($(ADK_PACKAGE_KODI_WITH_SMB),)
  112. CONFIGURE_ARGS+= --enable-samba
  113. else
  114. CONFIGURE_ARGS+= --disable-samba
  115. endif
  116. ifneq ($(ADK_PACKAGE_KODI_WITH_SSH),)
  117. CONFIGURE_ARGS+= --enable-ssh
  118. else
  119. CONFIGURE_ARGS+= --disable-ssh
  120. endif
  121. ifneq ($(ADK_PACKAGE_KODI_WITH_NFS),)
  122. CONFIGURE_ARGS+= --enable-nfs
  123. else
  124. CONFIGURE_ARGS+= --disable-nfs
  125. endif
  126. ifneq ($(ADK_PACKAGE_KODI_WITH_CEC),)
  127. CONFIGURE_ARGS+= --enable-libcec
  128. else
  129. CONFIGURE_ARGS+= --disable-libcec
  130. endif
  131. ifneq ($(ADK_PACKAGE_KODI_WITH_LIRC),)
  132. CONFIGURE_ARGS+= --enable-lirc
  133. else
  134. CONFIGURE_ARGS+= --disable-lirc
  135. endif
  136. ifneq ($(ADK_PACKAGE_KODI_WITH_AVAHI),)
  137. CONFIGURE_ARGS+= --enable-avahi
  138. else
  139. CONFIGURE_ARGS+= --disable-avahi
  140. endif
  141. ifneq ($(ADK_PACKAGE_KODI_WITH_WEBSERVER),)
  142. CONFIGURE_ARGS+= --enable-webserver
  143. else
  144. CONFIGURE_ARGS+= --disable-webserver
  145. endif
  146. ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y)
  147. CONFIGURE_ARGS+= --with-platform=raspberry-pi \
  148. --enable-player=omxplayer \
  149. --enable-gles \
  150. --disable-x11
  151. endif
  152. ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI2),y)
  153. CONFIGURE_ARGS+= --with-platform=raspberry-pi \
  154. --enable-player=omxplayer \
  155. --enable-gles \
  156. --disable-x11
  157. endif
  158. ifeq ($(ADK_TARGET_SYSTEM_SOLIDRUN_IMX6),y)
  159. CONFIGURE_ARGS+= --disable-x11 \
  160. --enable-gles \
  161. --enable-codec=imxvpu
  162. endif
  163. pre-configure:
  164. (cd $(WRKBUILD)/lib/cpluff && env PATH='$(AUTOTOOL_PATH)' ./autogen.sh)
  165. PATH='$(HOST_PATH)' \
  166. make CXX="${HOST_CXX}" CC="${HOST_CC}" CFLAGS="${HOST_CFLAGS}" \
  167. CXXFLAGS="${HOST_CXXFLAGS}" LDFLAGS="${HOST_LDFLAGS}" \
  168. -C $(WRKBUILD)/tools/depends/native/JsonSchemaBuilder
  169. PATH='$(HOST_PATH)' \
  170. make CXX="${HOST_CXX}" CC="${HOST_CC}" CFLAGS="${HOST_CFLAGS}" \
  171. CXXFLAGS="${HOST_CXXFLAGS}" LDFLAGS="${HOST_LDFLAGS}" \
  172. -C $(WRKBUILD)/tools/depends/native/TexturePacker
  173. kodi-install:
  174. $(INSTALL_DIR) $(IDIR_KODI)/usr/lib/kodi/addons
  175. $(CP) $(WRKINST)/usr/lib/kodi/* \
  176. $(IDIR_KODI)/usr/lib/kodi
  177. $(INSTALL_DIR) $(IDIR_KODI)/usr/share/kodi
  178. $(CP) $(WRKINST)/usr/share/kodi/* \
  179. $(IDIR_KODI)/usr/share/kodi
  180. $(INSTALL_DIR) $(IDIR_KODI)/usr/bin
  181. $(INSTALL_BIN) $(WRKINST)/usr/bin/kodi-standalone \
  182. $(IDIR_KODI)/usr/bin
  183. $(INSTALL_BIN) $(WRKINST)/usr/bin/kodi \
  184. $(IDIR_KODI)/usr/bin
  185. include ${ADK_TOPDIR}/mk/pkg-bottom.mk