Makefile 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  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:= 15.0
  6. PKG_RELEASE:= 2
  7. PKG_HASH:= 27dba173cfe74b323f4dbaa72ae2bfe5961f76c27bddcd5210253be91cae0dff
  8. PKG_DESCR:= software media player
  9. PKG_SECTION:= mm/video
  10. PKG_DEPENDS:= boost python2 libstdcxx libsquish
  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 libopenssl libnettle
  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 librt
  19. PKG_BUILDDEP:= boost python2 libass ffmpeg openssl libglew
  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
  26. PKG_BUILDDEP+= swig-host liblzo-host libpng-host libjpeg-turbo-host
  27. PKG_BUILDDEP+= zip-host unzip-host giflib-host libsquish
  28. PKG_URL:= http://kodi.tv/
  29. PKG_SITES:= https://github.com/xbmc/xbmc/archive/
  30. DISTFILES:= $(PKG_VERSION)-Isengard.tar.gz
  31. WRKDIST= ${WRKDIR}/xbmc-$(PKG_VERSION)-Isengard
  32. PKG_FLAVOURS_KODI:= WITH_SMB WITH_SMB3 WITH_NFS WITH_SSH WITH_AVAHI WITH_CEC
  33. PKG_FLAVOURS_KODI+= WITH_WEBSERVER WITH_RTMP WITH_BLURAY WITH_LIRC
  34. PKGFD_WITH_SMB:= enable samba4 support
  35. PKGFB_WITH_SMB:= samba
  36. PKGFS_WITH_SMB:= samba
  37. PKGFD_WITH_SMB3:= enable samba3 support
  38. PKGFB_WITH_SMB3:= samba3
  39. PKGFS_WITH_SMB3:= samba3
  40. PKGFD_WITH_NFS:= enable nfs support
  41. PKGFB_WITH_NFS:= libnfs
  42. PKGFS_WITH_NFS:= libnfs
  43. PKGFD_WITH_SSH:= enable ssh support
  44. PKGFB_WITH_SSH:= libssh
  45. PKGFS_WITH_SSH:= libssh
  46. PKGFD_WITH_AVAHI:= enable avahi support
  47. PKGFB_WITH_AVAHI:= avahi
  48. PKGFS_WITH_AVAHI:= libavahi
  49. PKGFD_WITH_CEC:= enable cec support
  50. PKGFB_WITH_CEC:= libcec
  51. PKGFS_WITH_CEC:= libcec
  52. PKGFD_WITH_RTMP:= enable rtmp support
  53. PKGFB_WITH_RTMP:= rtmpdump
  54. PKGFS_WITH_RTMP:= librtmp
  55. PKGFD_WITH_BLURAY:= enable bluray support
  56. PKGFB_WITH_BLURAY:= libbluray
  57. PKGFS_WITH_BLURAY:= libbluray
  58. PKGFD_WITH_LIRC:= enable lirc support
  59. PKGFB_WITH_LIRC:= lirc
  60. PKGFS_WITH_LIRC:= lirc
  61. PKGFD_WITH_WEBSERVER:= enable internal webserver support
  62. # freescale GL libraries linked against glibc
  63. PKG_LIBC_DEPENDS:= glibc uclibc-ng
  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-texturepacker \
  107. --enable-udev \
  108. --with-ffmpeg=shared
  109. ifneq ($(ADK_PACKAGE_KODI_WITH_BLURAY),)
  110. CONFIGURE_ARGS+= --enable-libbluray
  111. else
  112. CONFIGURE_ARGS+= --disable-libbluray
  113. endif
  114. ifneq ($(ADK_PACKAGE_KODI_WITH_SMB),)
  115. CONFIGURE_ARGS+= --enable-samba
  116. else
  117. CONFIGURE_ARGS+= --disable-samba
  118. endif
  119. ifneq ($(ADK_PACKAGE_KODI_WITH_SMB3),)
  120. CONFIGURE_ARGS+= --enable-samba
  121. else
  122. CONFIGURE_ARGS+= --disable-samba
  123. endif
  124. ifneq ($(ADK_PACKAGE_KODI_WITH_SSH),)
  125. CONFIGURE_ARGS+= --enable-ssh
  126. else
  127. CONFIGURE_ARGS+= --disable-ssh
  128. endif
  129. ifneq ($(ADK_PACKAGE_KODI_WITH_NFS),)
  130. CONFIGURE_ARGS+= --enable-nfs
  131. else
  132. CONFIGURE_ARGS+= --disable-nfs
  133. endif
  134. ifneq ($(ADK_PACKAGE_KODI_WITH_CEC),)
  135. CONFIGURE_ARGS+= --enable-libcec
  136. else
  137. CONFIGURE_ARGS+= --disable-libcec
  138. endif
  139. ifneq ($(ADK_PACKAGE_KODI_WITH_RTMP),)
  140. CONFIGURE_ARGS+= --enable-rtmp
  141. else
  142. CONFIGURE_ARGS+= --disable-rtmp
  143. endif
  144. ifneq ($(ADK_PACKAGE_KODI_WITH_LIRC),)
  145. CONFIGURE_ARGS+= --enable-lirc
  146. else
  147. CONFIGURE_ARGS+= --disable-lirc
  148. endif
  149. ifneq ($(ADK_PACKAGE_KODI_WITH_AVAHI),)
  150. CONFIGURE_ARGS+= --enable-avahi
  151. else
  152. CONFIGURE_ARGS+= --disable-avahi
  153. endif
  154. ifneq ($(ADK_PACKAGE_KODI_WITH_WEBSERVER),)
  155. CONFIGURE_ARGS+= --enable-webserver
  156. else
  157. CONFIGURE_ARGS+= --disable-webserver
  158. endif
  159. ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y)
  160. CONFIGURE_ARGS+= --with-platform=raspberry-pi \
  161. --enable-player=omxplayer \
  162. --enable-gles \
  163. --disable-x11
  164. endif
  165. ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI2),y)
  166. CONFIGURE_ARGS+= --with-platform=raspberry-pi \
  167. --enable-player=omxplayer \
  168. --enable-gles \
  169. --disable-x11
  170. endif
  171. ifeq ($(ADK_TARGET_SYSTEM_SOLIDRUN_IMX6),y)
  172. CONFIGURE_ARGS+= --disable-x11 \
  173. --enable-gles \
  174. --enable-codec=imxvpu
  175. endif
  176. pre-configure:
  177. (cd $(WRKBUILD)/lib/cpluff && env PATH='$(AUTOTOOL_PATH)' ./autogen.sh)
  178. PATH='$(HOST_PATH)' \
  179. make CXX="${HOST_CXX}" CC="${HOST_CC}" CFLAGS="${HOST_CFLAGS}" \
  180. CXXFLAGS="${HOST_CXXFLAGS}" LDFLAGS="${HOST_LDFLAGS}" \
  181. -C $(WRKBUILD)/tools/depends/native/JsonSchemaBuilder
  182. PATH='$(HOST_PATH)' \
  183. make CXX="${HOST_CXX}" CC="${HOST_CC}" CFLAGS="${HOST_CFLAGS}" \
  184. CXXFLAGS="${HOST_CXXFLAGS}" LDFLAGS="${HOST_LDFLAGS}" \
  185. -C $(WRKBUILD)/tools/depends/native/TexturePacker
  186. kodi-install:
  187. $(INSTALL_DIR) $(IDIR_KODI)/usr/lib/kodi/addons
  188. $(CP) $(WRKINST)/usr/lib/kodi/* \
  189. $(IDIR_KODI)/usr/lib/kodi
  190. $(INSTALL_DIR) $(IDIR_KODI)/usr/share/kodi
  191. $(CP) $(WRKINST)/usr/share/kodi/* \
  192. $(IDIR_KODI)/usr/share/kodi
  193. $(INSTALL_DIR) $(IDIR_KODI)/usr/bin
  194. $(INSTALL_BIN) $(WRKINST)/usr/bin/kodi-standalone \
  195. $(IDIR_KODI)/usr/bin
  196. $(INSTALL_BIN) $(WRKINST)/usr/bin/kodi \
  197. $(IDIR_KODI)/usr/bin
  198. include ${ADK_TOPDIR}/mk/pkg-bottom.mk