Makefile 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  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:= 14.0
  6. PKG_RELEASE:= 3
  7. PKG_HASH:= 11746d95cc59361f36ce6ea9d0d36bbd9ec3376e991f5ec1720f8ff740b91192
  8. PKG_DESCR:= software media player
  9. PKG_SECTION:= mm/video
  10. PKG_DEPENDS:= boost python2 libstdcxx glibc-gconv
  11. PKG_DEPENDS+= libass libmpeg2 libmad libdbus libglew mesalib
  12. PKG_DEPENDS+= libjpeg-turbo libogg libvorbis libmodplug libcurl
  13. PKG_DEPENDS+= libflac libbz2 libtiff liblzo libressl
  14. PKG_DEPENDS+= yajl tinyxml libsqlite libpcrecpp libpng libncurses
  15. PKG_DEPENDS+= libpcre libcdio libfreetype libsamplerate libuuid
  16. PKG_DEPENDS+= taglib libjasper libmp3lame libmicrohttpd
  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 libressl libglew
  20. PKG_BUILDDEP+= libmpeg2 libmad libjpeg-turbo libogg libvorbis
  21. PKG_BUILDDEP+= curl flac bzip2 libtiff liblzo yajl mesalib
  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
  25. PKG_BUILDDEP+= libgpg-error dbus libxslt libvorbis
  26. PKG_BUILDDEP+= swig-host sdl-host sdl-image-host liblzo-host
  27. PKG_BUILDDEP+= zip-host unzip-host
  28. PKG_URL:= http://kodi.tv/
  29. PKG_SITES:= http://mirrors.kodi.tv/releases/source/
  30. DISTFILES:= $(PKG_VERSION)-Helix.tar.gz
  31. WRKDIST= $(WRKDIR)/xbmc-14.0-Helix
  32. PKG_CHOICES_KODI:= WITH_LIBRESSL WITH_OPENSSL
  33. PKGCD_WITH_LIBRESSL:= with libressl
  34. PKGCS_WITH_LIBRESSL:= libressl
  35. PKGCB_WITH_LIBRESSL:= libressl
  36. PKGCD_WITH_OPENSSL:= with openssl
  37. PKGCS_WITH_OPENSSL:= libopenssl
  38. PKGCB_WITH_OPENSSL:= openssl
  39. PKG_FLAVOURS_KODI:= WITH_SMB WITH_NFS WITH_SSH WITH_AVAHI WITH_CEC
  40. PKG_FLAVOURS_KODI+= WITH_AFP WITH_WEBSERVER WITH_RTMP WITH_BLURAY
  41. PKGFD_WITH_SMB:= enable samba support
  42. PKGFB_WITH_SMB:= samba
  43. PKGFS_WITH_SMB:= samba-lib
  44. PKGFD_WITH_NFS:= enable nfs support
  45. PKGFB_WITH_NFS:= libnfs
  46. PKGFS_WITH_NFS:= libnfs
  47. PKGFD_WITH_SSH:= enable ssh support
  48. PKGFB_WITH_SSH:= libssh
  49. PKGFS_WITH_SSH:= libssh
  50. PKGFD_WITH_AVAHI:= enable avahi support
  51. PKGFB_WITH_AVAHI:= avahi
  52. PKGFS_WITH_AVAHI:= libavahi
  53. PKGFD_WITH_CEC:= enable cec support
  54. PKGFB_WITH_CEC:= libcec
  55. PKGFS_WITH_CEC:= libcec
  56. PKGFD_WITH_AFP:= enable afp support
  57. PKGFB_WITH_AFP:= afpfs-ng
  58. PKGFS_WITH_AFP:= libafpclient
  59. PKGFD_WITH_RTMP:= enable rtmp support
  60. PKGFB_WITH_RTMP:= rtmpdump
  61. PKGFS_WITH_RTMP:= librtmp
  62. PKGFD_WITH_BLURAY:= enable bluray support
  63. PKGFB_WITH_BLURAY:= libbluray
  64. PKGFS_WITH_BLURAY:= libbluray
  65. PKGFD_WITH_WEBSERVER:= enable internal webserver support
  66. # libiconv missing, freescale GL libraries linked against glibc
  67. PKG_LIBC_DEPENDS:= glibc
  68. PKG_DEPENDS_RASPBERRY_PI:= bcm2835-vc
  69. PKG_BUILDDEP_RASPBERRY_PI:= bcm2835-vc
  70. PKG_DEPENDS_SOLIDRUN_IMX6:= libfslvpuwrap gpu-viv-bin-mx6q
  71. PKG_BUILDDEP_SOLIDRUN_IMX6:= libfslvpuwrap gpu-viv-bin-mx6q
  72. PKG_SYSTEM_DEPENDS:= raspberry-pi solidrun-imx6
  73. DIFF_IGNOREFILES:= configure missing depcomp install-sh INSTALL \
  74. aclocal.m4 config.h.in
  75. include $(ADK_TOPDIR)/mk/package.mk
  76. $(eval $(call PKG_template,KODI,kodi,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  77. HOST_CXXFLAGS+= $(HOST_CPPFLAGS)
  78. XAKE_FLAGS+= V=1 TIXML_USE_STL=1 GCC_HONOUR_COPTS=s
  79. TARGET_CPPFLAGS+= -I. -I./utils \
  80. -I$(STAGING_TARGET_DIR)/usr/include/afpfs-ng \
  81. -DTIXML_USE_STL=1 -DLINUX
  82. ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y)
  83. TARGET_CPPFLAGS+= -I$(STAGING_TARGET_DIR)/opt/vc/include \
  84. -I$(STAGING_TARGET_DIR)/opt/vc/include/interface/vcos/pthreads \
  85. -I$(STAGING_TARGET_DIR)/opt/vc/include/interface/vmcs_host/linux
  86. TARGET_LDFLAGS+= -L$(STAGING_TARGET_DIR)/opt/vc/lib
  87. endif
  88. AUTOTOOL_STYLE:= autoreconf
  89. CONFIGURE_ENV+= DESTDIR='${WRKINST}' \
  90. TEXTUREPACKER_NATIVE_ROOT='$(STAGING_HOST_DIR)/usr'
  91. CONFIGURE_ARGS+= --disable-optical-drive \
  92. --disable-optimizations \
  93. --disable-mysql \
  94. --disable-rsxs \
  95. --disable-projectm \
  96. --disable-mdnsembedded \
  97. --disable-libusb \
  98. --disable-libcap \
  99. --disable-joystick \
  100. --disable-dvdcss \
  101. --disable-gtest \
  102. --disable-ccache \
  103. --disable-wayland \
  104. --disable-pulse \
  105. --disable-mid \
  106. --disable-debug \
  107. --enable-alsa \
  108. --enable-libvorbisenc \
  109. --enable-texturepacker \
  110. --enable-udev \
  111. --with-ffmpeg=shared
  112. ifneq ($(ADK_PACKAGE_KODI_WITH_BLURAY),)
  113. CONFIGURE_ARGS+= --enable-libbluray
  114. else
  115. CONFIGURE_ARGS+= --disable-libbluray
  116. endif
  117. ifneq ($(ADK_PACKAGE_KODI_WITH_AFP),)
  118. CONFIGURE_ARGS+= --enable-afpclient
  119. else
  120. CONFIGURE_ARGS+= --disable-afpclient
  121. endif
  122. ifneq ($(ADK_PACKAGE_KODI_WITH_SMB),)
  123. CONFIGURE_ARGS+= --enable-samba
  124. else
  125. CONFIGURE_ARGS+= --disable-samba
  126. endif
  127. ifneq ($(ADK_PACKAGE_KODI_WITH_SSH),)
  128. CONFIGURE_ARGS+= --enable-ssh
  129. else
  130. CONFIGURE_ARGS+= --disable-ssh
  131. endif
  132. ifneq ($(ADK_PACKAGE_KODI_WITH_NFS),)
  133. CONFIGURE_ARGS+= --enable-nfs
  134. else
  135. CONFIGURE_ARGS+= --disable-nfs
  136. endif
  137. ifneq ($(ADK_PACKAGE_KODI_WITH_CEC),)
  138. CONFIGURE_ARGS+= --enable-libcec
  139. else
  140. CONFIGURE_ARGS+= --disable-libcec
  141. endif
  142. ifneq ($(ADK_PACKAGE_KODI_WITH_RTMP),)
  143. CONFIGURE_ARGS+= --enable-rtmp
  144. else
  145. CONFIGURE_ARGS+= --disable-rtmp
  146. endif
  147. ifneq ($(ADK_PACKAGE_KODI_WITH_AVAHI),)
  148. CONFIGURE_ARGS+= --enable-avahi
  149. else
  150. CONFIGURE_ARGS+= --disable-avahi
  151. endif
  152. ifneq ($(ADK_PACKAGE_KODI_WITH_WEBSERVER),)
  153. CONFIGURE_ARGS+= --enable-webserver
  154. else
  155. CONFIGURE_ARGS+= --disable-webserver
  156. endif
  157. ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y)
  158. CONFIGURE_ARGS+= --with-platform=raspberry-pi \
  159. --enable-player=omxplayer \
  160. --enable-gles \
  161. --disable-sdl \
  162. --disable-x11
  163. endif
  164. ifeq ($(ADK_TARGET_SYSTEM_SOLIDRUN_IMX6),y)
  165. CONFIGURE_ARGS+= --disable-x11 \
  166. --disable-sdl \
  167. --enable-gles \
  168. --enable-neon \
  169. --enable-codec=imxvpu
  170. endif
  171. pre-configure:
  172. (cd $(WRKBUILD)/lib/cpluff && env PATH='$(AUTOTOOL_PATH)' ./autogen.sh)
  173. pre-build:
  174. $(SED) "s#@@STAGING_HOST_DIR@@#$(STAGING_HOST_DIR)#" \
  175. $(WRKBUILD)/tools/TexturePacker/Makefile.in
  176. PATH='$(HOST_PATH)' \
  177. make CXX="${HOST_CXX}" CC="${HOST_CC}" CFLAGS="${HOST_CFLAGS}" \
  178. CXXFLAGS="${HOST_CXXFLAGS}" LDFLAGS="${HOST_LDFLAGS}" \
  179. -C $(WRKBUILD)/tools/depends/native/JsonSchemaBuilder
  180. kodi-install:
  181. $(INSTALL_DIR) $(IDIR_KODI)/usr/lib/kodi/addons
  182. $(CP) $(WRKINST)/usr/lib/kodi/* \
  183. $(IDIR_KODI)/usr/lib/kodi
  184. $(INSTALL_DIR) $(IDIR_KODI)/usr/share/kodi
  185. $(CP) $(WRKINST)/usr/share/kodi/* \
  186. $(IDIR_KODI)/usr/share/kodi
  187. $(INSTALL_DIR) $(IDIR_KODI)/usr/bin
  188. $(INSTALL_BIN) $(WRKINST)/usr/bin/kodi-standalone \
  189. $(IDIR_KODI)/usr/bin
  190. $(INSTALL_BIN) $(WRKINST)/usr/bin/kodi \
  191. $(IDIR_KODI)/usr/bin
  192. include ${ADK_TOPDIR}/mk/pkg-bottom.mk