Makefile 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  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.1
  6. PKG_RELEASE:= 2
  7. PKG_HASH:= a38059e292cf8523918834e49fcc2d688525ceb7951ddf7f5ee535f4147255d6
  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.1-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_RASPBERRY_PI2:= bcm2835-vc
  71. PKG_BUILDDEP_RASPBERRY_PI2:= bcm2835-vc
  72. PKG_DEPENDS_SOLIDRUN_IMX6:= libfslvpuwrap gpu-viv-bin-mx6q
  73. PKG_BUILDDEP_SOLIDRUN_IMX6:= libfslvpuwrap gpu-viv-bin-mx6q
  74. PKG_SYSTEM_DEPENDS:= raspberry-pi raspberry-pi2 solidrun-imx6
  75. DIFF_IGNOREFILES:= configure missing depcomp install-sh INSTALL \
  76. aclocal.m4 config.h.in
  77. include $(ADK_TOPDIR)/mk/package.mk
  78. $(eval $(call PKG_template,KODI,kodi,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  79. HOST_CXXFLAGS+= $(HOST_CPPFLAGS)
  80. XAKE_FLAGS+= V=1 TIXML_USE_STL=1 GCC_HONOUR_COPTS=s
  81. TARGET_CPPFLAGS+= -I. -I./utils \
  82. -I$(STAGING_TARGET_DIR)/usr/include/afpfs-ng \
  83. -DTIXML_USE_STL=1 -DLINUX
  84. ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y)
  85. TARGET_CPPFLAGS+= -I$(STAGING_TARGET_DIR)/opt/vc/include \
  86. -I$(STAGING_TARGET_DIR)/opt/vc/include/interface/vcos/pthreads \
  87. -I$(STAGING_TARGET_DIR)/opt/vc/include/interface/vmcs_host/linux
  88. TARGET_LDFLAGS+= -L$(STAGING_TARGET_DIR)/opt/vc/lib
  89. endif
  90. ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI2),y)
  91. TARGET_CPPFLAGS+= -I$(STAGING_TARGET_DIR)/opt/vc/include \
  92. -I$(STAGING_TARGET_DIR)/opt/vc/include/interface/vcos/pthreads \
  93. -I$(STAGING_TARGET_DIR)/opt/vc/include/interface/vmcs_host/linux
  94. TARGET_LDFLAGS+= -L$(STAGING_TARGET_DIR)/opt/vc/lib
  95. endif
  96. AUTOTOOL_STYLE:= autoreconf
  97. CONFIGURE_ENV+= DESTDIR='${WRKINST}' \
  98. TEXTUREPACKER_NATIVE_ROOT='$(STAGING_HOST_DIR)/usr'
  99. CONFIGURE_ARGS+= --disable-optical-drive \
  100. --disable-optimizations \
  101. --disable-mysql \
  102. --disable-rsxs \
  103. --disable-projectm \
  104. --disable-mdnsembedded \
  105. --disable-libusb \
  106. --disable-libcap \
  107. --disable-joystick \
  108. --disable-dvdcss \
  109. --disable-gtest \
  110. --disable-ccache \
  111. --disable-wayland \
  112. --disable-pulse \
  113. --disable-mid \
  114. --disable-debug \
  115. --enable-alsa \
  116. --enable-texturepacker \
  117. --enable-udev \
  118. --with-ffmpeg=shared
  119. ifneq ($(ADK_PACKAGE_KODI_WITH_BLURAY),)
  120. CONFIGURE_ARGS+= --enable-libbluray
  121. else
  122. CONFIGURE_ARGS+= --disable-libbluray
  123. endif
  124. ifneq ($(ADK_PACKAGE_KODI_WITH_AFP),)
  125. CONFIGURE_ARGS+= --enable-afpclient
  126. else
  127. CONFIGURE_ARGS+= --disable-afpclient
  128. endif
  129. ifneq ($(ADK_PACKAGE_KODI_WITH_SMB),)
  130. CONFIGURE_ARGS+= --enable-samba
  131. else
  132. CONFIGURE_ARGS+= --disable-samba
  133. endif
  134. ifneq ($(ADK_PACKAGE_KODI_WITH_SSH),)
  135. CONFIGURE_ARGS+= --enable-ssh
  136. else
  137. CONFIGURE_ARGS+= --disable-ssh
  138. endif
  139. ifneq ($(ADK_PACKAGE_KODI_WITH_NFS),)
  140. CONFIGURE_ARGS+= --enable-nfs
  141. else
  142. CONFIGURE_ARGS+= --disable-nfs
  143. endif
  144. ifneq ($(ADK_PACKAGE_KODI_WITH_CEC),)
  145. CONFIGURE_ARGS+= --enable-libcec
  146. else
  147. CONFIGURE_ARGS+= --disable-libcec
  148. endif
  149. ifneq ($(ADK_PACKAGE_KODI_WITH_RTMP),)
  150. CONFIGURE_ARGS+= --enable-rtmp
  151. else
  152. CONFIGURE_ARGS+= --disable-rtmp
  153. endif
  154. ifneq ($(ADK_PACKAGE_KODI_WITH_AVAHI),)
  155. CONFIGURE_ARGS+= --enable-avahi
  156. else
  157. CONFIGURE_ARGS+= --disable-avahi
  158. endif
  159. ifneq ($(ADK_PACKAGE_KODI_WITH_WEBSERVER),)
  160. CONFIGURE_ARGS+= --enable-webserver
  161. else
  162. CONFIGURE_ARGS+= --disable-webserver
  163. endif
  164. ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y)
  165. CONFIGURE_ARGS+= --with-platform=raspberry-pi \
  166. --enable-player=omxplayer \
  167. --enable-gles \
  168. --disable-sdl \
  169. --disable-x11
  170. endif
  171. ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI2),y)
  172. CONFIGURE_ARGS+= --with-platform=raspberry-pi \
  173. --enable-player=omxplayer \
  174. --enable-gles \
  175. --disable-sdl \
  176. --disable-x11
  177. endif
  178. ifeq ($(ADK_TARGET_SYSTEM_SOLIDRUN_IMX6),y)
  179. CONFIGURE_ARGS+= --disable-x11 \
  180. --disable-sdl \
  181. --enable-gles \
  182. --enable-codec=imxvpu
  183. endif
  184. pre-configure:
  185. (cd $(WRKBUILD)/lib/cpluff && env PATH='$(AUTOTOOL_PATH)' ./autogen.sh)
  186. pre-build:
  187. $(SED) "s#@@STAGING_HOST_DIR@@#$(STAGING_HOST_DIR)#" \
  188. $(WRKBUILD)/tools/TexturePacker/Makefile.in
  189. PATH='$(HOST_PATH)' \
  190. make CXX="${HOST_CXX}" CC="${HOST_CC}" CFLAGS="${HOST_CFLAGS}" \
  191. CXXFLAGS="${HOST_CXXFLAGS}" LDFLAGS="${HOST_LDFLAGS}" \
  192. -C $(WRKBUILD)/tools/depends/native/JsonSchemaBuilder
  193. kodi-install:
  194. $(INSTALL_DIR) $(IDIR_KODI)/usr/lib/kodi/addons
  195. $(CP) $(WRKINST)/usr/lib/kodi/* \
  196. $(IDIR_KODI)/usr/lib/kodi
  197. $(INSTALL_DIR) $(IDIR_KODI)/usr/share/kodi
  198. $(CP) $(WRKINST)/usr/share/kodi/* \
  199. $(IDIR_KODI)/usr/share/kodi
  200. $(INSTALL_DIR) $(IDIR_KODI)/usr/bin
  201. $(INSTALL_BIN) $(WRKINST)/usr/bin/kodi-standalone \
  202. $(IDIR_KODI)/usr/bin
  203. $(INSTALL_BIN) $(WRKINST)/usr/bin/kodi \
  204. $(IDIR_KODI)/usr/bin
  205. include ${ADK_TOPDIR}/mk/pkg-bottom.mk