1
0

Makefile 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  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.1
  6. PKG_RELEASE:= 1
  7. PKG_HASH:= 7d82c8aff2715c83deecdf10c566e26105bec0473af530a1356d4c747ebdfd10
  8. PKG_DESCR:= software media player
  9. PKG_SECTION:= mm/video
  10. PKG_DEPENDS:= boost python2 libsquish libbluray libressl
  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 libressl
  29. PKG_NEEDS:= threads rt c++
  30. PKG_URL:= http://kodi.tv/
  31. PKG_SITES:= https://github.com/xbmc/xbmc/archive/
  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_FLAVOURS_KODI:= WITH_SMB WITH_NFS WITH_SSH WITH_AVAHI WITH_CEC
  36. PKG_FLAVOURS_KODI+= WITH_WEBSERVER WITH_LIRC
  37. PKGFD_WITH_SMB:= enable samba4 support
  38. PKGFB_WITH_SMB:= samba
  39. PKGFS_WITH_SMB:= samba
  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_LIRC:= enable lirc support
  53. PKGFB_WITH_LIRC:= lirc
  54. PKGFS_WITH_LIRC:= lirc
  55. PKGFD_WITH_WEBSERVER:= enable internal webserver support
  56. PKG_BUILDDEP_SOLIDRUN_IMX6:= gpu-viv-bin-mx6q
  57. PKG_SYSTEM_DEPENDS:= raspberry-pi raspberry-pi2 raspberry-pi3 solidrun-imx6
  58. DIFF_IGNOREFILES:= configure missing depcomp install-sh INSTALL \
  59. aclocal.m4 config.h.in
  60. include $(ADK_TOPDIR)/mk/package.mk
  61. $(eval $(call PKG_template,KODI,kodi,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  62. HOST_CXXFLAGS+= $(HOST_CPPFLAGS)
  63. XAKE_FLAGS+= V=1 TIXML_USE_STL=1 GCC_HONOUR_COPTS=s
  64. TARGET_CPPFLAGS+= -I. -I./utils \
  65. -I$(STAGING_TARGET_DIR)/usr/include/afpfs-ng \
  66. -DTIXML_USE_STL=1 -DLINUX
  67. ifeq ($(ADK_TARGET_BOARD_BCM28XX),y)
  68. TARGET_CPPFLAGS+= -I$(STAGING_TARGET_DIR)/opt/vc/include \
  69. -I$(STAGING_TARGET_DIR)/opt/vc/include/interface/vcos/pthreads \
  70. -I$(STAGING_TARGET_DIR)/opt/vc/include/interface/vmcs_host/linux
  71. TARGET_LDFLAGS+= -L$(STAGING_TARGET_DIR)/opt/vc/lib
  72. endif
  73. ifeq ($(ADK_TARGET_LIBICONV),y)
  74. TARGET_LDFLAGS+= -liconv
  75. endif
  76. AUTOTOOL_STYLE:= autoreconf
  77. CONFIGURE_ENV+= DESTDIR='${WRKINST}' \
  78. TEXTUREPACKER_NATIVE_ROOT='$(STAGING_HOST_DIR)/usr'
  79. CONFIGURE_ARGS+= --disable-optical-drive \
  80. --disable-optimizations \
  81. --disable-mysql \
  82. --disable-mdnsembedded \
  83. --disable-libusb \
  84. --disable-libcap \
  85. --disable-joystick \
  86. --disable-dvdcss \
  87. --disable-gtest \
  88. --disable-ccache \
  89. --disable-wayland \
  90. --disable-pulse \
  91. --disable-mid \
  92. --disable-debug \
  93. --enable-alsa \
  94. --enable-rtmp \
  95. --enable-libbluray \
  96. --enable-texturepacker \
  97. --enable-udev \
  98. --with-ffmpeg=shared
  99. ifneq ($(ADK_PACKAGE_KODI_WITH_SMB),)
  100. CONFIGURE_ARGS+= --enable-samba
  101. else
  102. CONFIGURE_ARGS+= --disable-samba
  103. endif
  104. ifneq ($(ADK_PACKAGE_KODI_WITH_SSH),)
  105. CONFIGURE_ARGS+= --enable-ssh
  106. else
  107. CONFIGURE_ARGS+= --disable-ssh
  108. endif
  109. ifneq ($(ADK_PACKAGE_KODI_WITH_NFS),)
  110. CONFIGURE_ARGS+= --enable-nfs
  111. else
  112. CONFIGURE_ARGS+= --disable-nfs
  113. endif
  114. ifneq ($(ADK_PACKAGE_KODI_WITH_CEC),)
  115. CONFIGURE_ARGS+= --enable-libcec
  116. else
  117. CONFIGURE_ARGS+= --disable-libcec
  118. endif
  119. ifneq ($(ADK_PACKAGE_KODI_WITH_LIRC),)
  120. CONFIGURE_ARGS+= --enable-lirc
  121. else
  122. CONFIGURE_ARGS+= --disable-lirc
  123. endif
  124. ifneq ($(ADK_PACKAGE_KODI_WITH_AVAHI),)
  125. CONFIGURE_ARGS+= --enable-avahi
  126. else
  127. CONFIGURE_ARGS+= --disable-avahi
  128. endif
  129. ifneq ($(ADK_PACKAGE_KODI_WITH_WEBSERVER),)
  130. CONFIGURE_ARGS+= --enable-webserver
  131. else
  132. CONFIGURE_ARGS+= --disable-webserver
  133. endif
  134. ifeq ($(ADK_TARGET_BOARD_BCM28XX),y)
  135. CONFIGURE_ARGS+= --with-platform=raspberry-pi \
  136. --enable-player=omxplayer \
  137. --enable-gles \
  138. --disable-x11
  139. endif
  140. ifeq ($(ADK_TARGET_SYSTEM_SOLIDRUN_IMX6),y)
  141. CONFIGURE_ARGS+= --disable-x11 \
  142. --enable-gles \
  143. --enable-codec=imxvpu
  144. endif
  145. pre-configure:
  146. (cd $(WRKBUILD)/lib/cpluff && env PATH='$(AUTOTOOL_PATH)' ./autogen.sh)
  147. PATH='$(HOST_PATH)' \
  148. make CXX="${HOST_CXX}" CC="${HOST_CC}" CFLAGS="${HOST_CFLAGS}" \
  149. CXXFLAGS="${HOST_CXXFLAGS}" LDFLAGS="${HOST_LDFLAGS}" \
  150. -C $(WRKBUILD)/tools/depends/native/JsonSchemaBuilder
  151. PATH='$(HOST_PATH)' \
  152. make CXX="${HOST_CXX}" CC="${HOST_CC}" CFLAGS="${HOST_CFLAGS}" \
  153. CXXFLAGS="${HOST_CXXFLAGS}" LDFLAGS="${HOST_LDFLAGS}" \
  154. -C $(WRKBUILD)/tools/depends/native/TexturePacker
  155. kodi-install:
  156. $(INSTALL_DIR) $(IDIR_KODI)/usr/lib/kodi/addons
  157. $(CP) $(WRKINST)/usr/lib/kodi/* \
  158. $(IDIR_KODI)/usr/lib/kodi
  159. $(INSTALL_DIR) $(IDIR_KODI)/usr/share/kodi
  160. $(CP) $(WRKINST)/usr/share/kodi/* \
  161. $(IDIR_KODI)/usr/share/kodi
  162. $(INSTALL_DIR) $(IDIR_KODI)/usr/bin
  163. $(INSTALL_BIN) $(WRKINST)/usr/bin/kodi-standalone \
  164. $(IDIR_KODI)/usr/bin
  165. $(INSTALL_BIN) $(WRKINST)/usr/bin/kodi \
  166. $(IDIR_KODI)/usr/bin
  167. include ${ADK_TOPDIR}/mk/pkg-bottom.mk