Makefile 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  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:= ff25ea118e3580bb1ebcbb7c450ed933da1782be
  6. PKG_RELEASE:= 4
  7. PKG_DESCR:= software media player
  8. PKG_SECTION:= mm/video
  9. PKG_DEPENDS:= boost python2 libstdcxx glibc-gconv libsquish
  10. PKG_DEPENDS+= libass libmpeg2 libmad libdbus libglew mesa
  11. PKG_DEPENDS+= libjpeg-turbo libogg libvorbis libmodplug libcurl
  12. PKG_DEPENDS+= libflac libbz2 libtiff liblzo libopenssl libnettle
  13. PKG_DEPENDS+= yajl tinyxml libsqlite libpcrecpp libpng libncurses
  14. PKG_DEPENDS+= libpcre libcdio libfreetype libsamplerate libuuid
  15. PKG_DEPENDS+= taglib libjasper libmp3lame libmicrohttpd libgtk2
  16. PKG_DEPENDS+= libgpg-error libudev python2-mod-sqlite libffmpeg
  17. PKG_DEPENDS+= libxslt libvorbisenc alsa-lib glib libglu librt
  18. PKG_BUILDDEP:= boost python2 libass ffmpeg openssl libglew
  19. PKG_BUILDDEP+= libmpeg2 libmad libjpeg-turbo libogg libvorbis
  20. PKG_BUILDDEP+= curl flac bzip2 libtiff liblzo yajl mesa
  21. PKG_BUILDDEP+= tinyxml sqlite pcre libpng libcdio freetype
  22. PKG_BUILDDEP+= libsamplerate taglib libjasper lame libmicrohttpd
  23. PKG_BUILDDEP+= eudev alsa-lib glib glu libmodplug libgtk2
  24. PKG_BUILDDEP+= libgpg-error dbus libxslt libvorbis
  25. PKG_BUILDDEP+= swig-host liblzo-host libpng-host libjpeg-turbo-host
  26. PKG_BUILDDEP+= zip-host unzip-host libsquish giflib-host
  27. PKG_URL:= http://kodi.tv/
  28. PKG_SITES:= https://github.com/xbmc/xbmc.git
  29. PKG_FLAVOURS_KODI:= WITH_SMB WITH_SMB3 WITH_NFS WITH_SSH WITH_AVAHI WITH_CEC
  30. PKG_FLAVOURS_KODI+= WITH_WEBSERVER WITH_RTMP WITH_BLURAY WITH_LIRC
  31. PKGFD_WITH_SMB:= enable samba4 support
  32. PKGFB_WITH_SMB:= samba
  33. PKGFS_WITH_SMB:= samba
  34. PKGFD_WITH_SMB3:= enable samba3 support
  35. PKGFB_WITH_SMB3:= samba3
  36. PKGFS_WITH_SMB3:= samba3
  37. PKGFD_WITH_NFS:= enable nfs support
  38. PKGFB_WITH_NFS:= libnfs
  39. PKGFS_WITH_NFS:= libnfs
  40. PKGFD_WITH_SSH:= enable ssh support
  41. PKGFB_WITH_SSH:= libssh
  42. PKGFS_WITH_SSH:= libssh
  43. PKGFD_WITH_AVAHI:= enable avahi support
  44. PKGFB_WITH_AVAHI:= avahi
  45. PKGFS_WITH_AVAHI:= libavahi
  46. PKGFD_WITH_CEC:= enable cec support
  47. PKGFB_WITH_CEC:= libcec
  48. PKGFS_WITH_CEC:= libcec
  49. PKGFD_WITH_RTMP:= enable rtmp support
  50. PKGFB_WITH_RTMP:= rtmpdump
  51. PKGFS_WITH_RTMP:= librtmp
  52. PKGFD_WITH_BLURAY:= enable bluray support
  53. PKGFB_WITH_BLURAY:= libbluray
  54. PKGFS_WITH_BLURAY:= libbluray
  55. PKGFD_WITH_LIRC:= enable lirc support
  56. PKGFB_WITH_LIRC:= lirc
  57. PKGFS_WITH_LIRC:= lirc
  58. PKGFD_WITH_WEBSERVER:= enable internal webserver support
  59. # libiconv missing, freescale GL libraries linked against glibc
  60. PKG_LIBC_DEPENDS:= glibc uclibc-ng
  61. PKG_DEPENDS_RASPBERRY_PI:= bcm28xx-vc bcm28xx-vc-gl-libs bcm28xx-vc-libs
  62. PKG_BUILDDEP_RASPBERRY_PI:= bcm28xx-vc
  63. PKG_DEPENDS_RASPBERRY_PI2:= bcm28xx-vc bcm28xx-vc-gl-libs bcm28xx-vc-libs
  64. PKG_BUILDDEP_RASPBERRY_PI2:= bcm28xx-vc
  65. PKG_DEPENDS_SOLIDRUN_IMX6:= libfslvpuwrap imx-gpu-viv
  66. PKG_BUILDDEP_SOLIDRUN_IMX6:= libfslvpuwrap imx-gpu-viv
  67. PKG_SYSTEM_DEPENDS:= raspberry-pi raspberry-pi2 solidrun-imx6
  68. DIFF_IGNOREFILES:= configure missing depcomp install-sh INSTALL \
  69. aclocal.m4 config.h.in
  70. include $(ADK_TOPDIR)/mk/package.mk
  71. $(eval $(call PKG_template,KODI,kodi,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  72. HOST_CXXFLAGS+= $(HOST_CPPFLAGS)
  73. XAKE_FLAGS+= V=1 TIXML_USE_STL=1 GCC_HONOUR_COPTS=s
  74. TARGET_CPPFLAGS+= -I. -I./utils \
  75. -I$(STAGING_TARGET_DIR)/usr/include/afpfs-ng \
  76. -DTIXML_USE_STL=1 -DLINUX
  77. ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y)
  78. TARGET_CPPFLAGS+= -I$(STAGING_TARGET_DIR)/opt/vc/include \
  79. -I$(STAGING_TARGET_DIR)/opt/vc/include/interface/vcos/pthreads \
  80. -I$(STAGING_TARGET_DIR)/opt/vc/include/interface/vmcs_host/linux
  81. TARGET_LDFLAGS+= -L$(STAGING_TARGET_DIR)/opt/vc/lib
  82. endif
  83. ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI2),y)
  84. TARGET_CPPFLAGS+= -I$(STAGING_TARGET_DIR)/opt/vc/include \
  85. -I$(STAGING_TARGET_DIR)/opt/vc/include/interface/vcos/pthreads \
  86. -I$(STAGING_TARGET_DIR)/opt/vc/include/interface/vmcs_host/linux
  87. TARGET_LDFLAGS+= -L$(STAGING_TARGET_DIR)/opt/vc/lib
  88. endif
  89. AUTOTOOL_STYLE:= autoreconf
  90. CONFIGURE_ENV+= DESTDIR='${WRKINST}' \
  91. TEXTUREPACKER_NATIVE_ROOT='$(STAGING_HOST_DIR)/usr'
  92. CONFIGURE_ARGS+= --disable-optical-drive \
  93. --disable-optimizations \
  94. --disable-mysql \
  95. --disable-rsxs \
  96. --disable-projectm \
  97. --disable-mdnsembedded \
  98. --disable-libusb \
  99. --disable-libcap \
  100. --disable-joystick \
  101. --disable-dvdcss \
  102. --disable-gtest \
  103. --disable-ccache \
  104. --disable-wayland \
  105. --disable-pulse \
  106. --disable-mid \
  107. --enable-debug \
  108. --enable-alsa \
  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_SMB),)
  118. CONFIGURE_ARGS+= --enable-samba
  119. else
  120. CONFIGURE_ARGS+= --disable-samba
  121. endif
  122. ifneq ($(ADK_PACKAGE_KODI_WITH_SMB3),)
  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_LIRC),)
  148. CONFIGURE_ARGS+= --enable-lirc
  149. else
  150. CONFIGURE_ARGS+= --disable-lirc
  151. endif
  152. ifneq ($(ADK_PACKAGE_KODI_WITH_AVAHI),)
  153. CONFIGURE_ARGS+= --enable-avahi
  154. else
  155. CONFIGURE_ARGS+= --disable-avahi
  156. endif
  157. ifneq ($(ADK_PACKAGE_KODI_WITH_WEBSERVER),)
  158. CONFIGURE_ARGS+= --enable-webserver
  159. else
  160. CONFIGURE_ARGS+= --disable-webserver
  161. endif
  162. ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI),y)
  163. CONFIGURE_ARGS+= --with-platform=raspberry-pi \
  164. --enable-player=omxplayer \
  165. --enable-gles \
  166. --disable-x11
  167. endif
  168. ifeq ($(ADK_TARGET_SYSTEM_RASPBERRY_PI2),y)
  169. CONFIGURE_ARGS+= --with-platform=raspberry-pi \
  170. --enable-player=omxplayer \
  171. --enable-gles \
  172. --disable-x11
  173. endif
  174. ifeq ($(ADK_TARGET_SYSTEM_SOLIDRUN_IMX6),y)
  175. CONFIGURE_ARGS+= --disable-x11 \
  176. --enable-gles \
  177. --enable-codec=imxvpu
  178. endif
  179. pre-configure:
  180. (cd $(WRKBUILD)/lib/cpluff && env PATH='$(AUTOTOOL_PATH)' ./autogen.sh)
  181. PATH='$(HOST_PATH)' \
  182. make CXX="${HOST_CXX}" CC="${HOST_CC}" CFLAGS="${HOST_CFLAGS}" \
  183. CXXFLAGS="${HOST_CXXFLAGS}" LDFLAGS="${HOST_LDFLAGS}" \
  184. -C $(WRKBUILD)/tools/depends/native/JsonSchemaBuilder
  185. PATH='$(HOST_PATH)' \
  186. make CXX="${HOST_CXX}" CC="${HOST_CC}" CFLAGS="${HOST_CFLAGS}" \
  187. CXXFLAGS="${HOST_CXXFLAGS}" LDFLAGS="${HOST_LDFLAGS}" \
  188. -C $(WRKBUILD)/tools/depends/native/TexturePacker
  189. kodi-install:
  190. $(INSTALL_DIR) $(IDIR_KODI)/usr/lib/kodi/addons
  191. $(CP) $(WRKINST)/usr/lib/kodi/* \
  192. $(IDIR_KODI)/usr/lib/kodi
  193. $(INSTALL_DIR) $(IDIR_KODI)/usr/share/kodi
  194. $(CP) $(WRKINST)/usr/share/kodi/* \
  195. $(IDIR_KODI)/usr/share/kodi
  196. $(INSTALL_DIR) $(IDIR_KODI)/usr/bin
  197. $(INSTALL_BIN) $(WRKINST)/usr/bin/kodi-standalone \
  198. $(IDIR_KODI)/usr/bin
  199. $(INSTALL_BIN) $(WRKINST)/usr/bin/kodi \
  200. $(IDIR_KODI)/usr/bin
  201. include ${ADK_TOPDIR}/mk/pkg-bottom.mk