2014-12-23 18:46:27 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# kodi
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2017-04-29 10:37:28 +02:00
|
|
|
# When updating the version, please also update kodi-jsonschemabuilder
|
|
|
|
# and kodi-texturepacker
|
2017-11-14 21:39:24 +01:00
|
|
|
KODI_VERSION = 17.6-Krypton
|
2014-12-23 18:46:27 +01:00
|
|
|
KODI_SITE = $(call github,xbmc,xbmc,$(KODI_VERSION))
|
2017-03-30 15:43:32 +02:00
|
|
|
KODI_LICENSE = GPL-2.0
|
2014-12-23 18:46:27 +01:00
|
|
|
KODI_LICENSE_FILES = LICENSE.GPL
|
2015-07-22 22:30:26 +02:00
|
|
|
# needed for binary addons
|
2014-12-23 18:46:37 +01:00
|
|
|
KODI_INSTALL_STAGING = YES
|
2016-07-11 20:08:56 +02:00
|
|
|
KODI_DEPENDENCIES = \
|
|
|
|
bzip2 \
|
|
|
|
expat \
|
|
|
|
ffmpeg \
|
|
|
|
fontconfig \
|
|
|
|
freetype \
|
|
|
|
host-gawk \
|
|
|
|
host-gperf \
|
2017-04-29 10:37:28 +02:00
|
|
|
host-kodi-jsonschemabuilder \
|
|
|
|
host-kodi-texturepacker \
|
2016-07-11 20:08:56 +02:00
|
|
|
host-nasm \
|
|
|
|
host-swig \
|
2017-04-29 10:37:28 +02:00
|
|
|
host-xmlstarlet \
|
2016-07-11 20:08:56 +02:00
|
|
|
host-zip \
|
|
|
|
libass \
|
|
|
|
libcdio \
|
|
|
|
libcrossguid \
|
|
|
|
libcurl \
|
|
|
|
libfribidi \
|
|
|
|
libplist \
|
|
|
|
libsamplerate \
|
|
|
|
lzo \
|
|
|
|
ncurses \
|
|
|
|
openssl \
|
|
|
|
pcre \
|
|
|
|
python \
|
|
|
|
readline \
|
|
|
|
sqlite \
|
|
|
|
taglib \
|
|
|
|
tinyxml \
|
|
|
|
yajl \
|
|
|
|
zlib
|
2014-12-23 18:46:27 +01:00
|
|
|
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_SUBDIR = project/cmake
|
|
|
|
|
|
|
|
KODI_LIBDVDCSS_VERSION = 2f12236
|
|
|
|
KODI_LIBDVDNAV_VERSION = 981488f
|
|
|
|
KODI_LIBDVDREAD_VERSION = 17d99db
|
|
|
|
|
|
|
|
KODI_EXTRA_DOWNLOADS = \
|
|
|
|
https://github.com/xbmc/libdvdcss/archive/$(KODI_LIBDVDCSS_VERSION).tar.gz \
|
|
|
|
https://github.com/xbmc/libdvdnav/archive/$(KODI_LIBDVDNAV_VERSION).tar.gz \
|
|
|
|
https://github.com/xbmc/libdvdread/archive/$(KODI_LIBDVDREAD_VERSION).tar.gz
|
2014-12-23 18:46:27 +01:00
|
|
|
|
2017-04-21 17:24:48 +02:00
|
|
|
KODI_CONF_OPTS += \
|
2017-08-02 18:29:42 +02:00
|
|
|
-DCMAKE_C_FLAGS="$(TARGET_CFLAGS) $(KODI_C_FLAGS)" \
|
|
|
|
-DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) $(KODI_CXX_FLAGS)" \
|
2017-04-29 10:37:28 +02:00
|
|
|
-DENABLE_CCACHE=OFF \
|
|
|
|
-DENABLE_DVDCSS=ON \
|
|
|
|
-DENABLE_INTERNAL_CROSSGUID=OFF \
|
|
|
|
-DENABLE_INTERNAL_FFMPEG=OFF \
|
|
|
|
-DKODI_DEPENDSBUILD=OFF \
|
|
|
|
-DENABLE_OPENSSL=ON \
|
2017-07-05 13:14:18 +02:00
|
|
|
-DNATIVEPREFIX=$(HOST_DIR) \
|
2017-04-29 10:37:28 +02:00
|
|
|
-DDEPENDS_PATH=$(@D) \
|
2017-08-22 22:15:24 +02:00
|
|
|
-DWITH_FFMPEG=$(STAGING_DIR)/usr \
|
2017-07-05 13:14:19 +02:00
|
|
|
-DWITH_TEXTUREPACKER=$(HOST_DIR)/bin/TexturePacker \
|
2017-07-04 11:40:39 +02:00
|
|
|
-DLIBDVDCSS_URL=$(DL_DIR)/$(KODI_LIBDVDCSS_VERSION).tar.gz \
|
|
|
|
-DLIBDVDNAV_URL=$(DL_DIR)/$(KODI_LIBDVDNAV_VERSION).tar.gz \
|
|
|
|
-DLIBDVDREAD_URL=$(DL_DIR)/$(KODI_LIBDVDREAD_VERSION).tar.gz
|
2017-04-29 10:37:28 +02:00
|
|
|
|
2017-11-10 07:33:10 +01:00
|
|
|
ifeq ($(BR2_ENABLE_LOCALE),)
|
|
|
|
KODI_DEPENDENCIES += libiconv
|
|
|
|
endif
|
|
|
|
|
2017-08-02 18:29:42 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
|
|
|
|
KODI_CONF_OPTS += -DCORE_SYSTEM_NAME=rbpi
|
|
|
|
KODI_DEPENDENCIES += rpi-userland
|
|
|
|
# These CPU-specific options are only used on rbpi:
|
|
|
|
# https://github.com/xbmc/xbmc/blob/Krypton/project/cmake/scripts/rbpi/ArchSetup.cmake#L13
|
|
|
|
ifeq ($(BR2_arm1176jzf_s)$(BR2_cortex_a7)$(BR2_cortex_a53),y)
|
|
|
|
KODI_CONF_OPTS += -DWITH_CPU=$(BR2_GCC_TARGET_CPU)
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
ifeq ($(BR2_arceb)$(BR2_arcle),y)
|
|
|
|
KODI_CONF_OPTS += -DWITH_ARCH=arc -DWITH_CPU=arc
|
|
|
|
else ifeq ($(BR2_armeb),y)
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DWITH_ARCH=arm -DWITH_CPU=arm
|
2017-08-02 18:29:42 +02:00
|
|
|
else ifeq ($(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el),y)
|
|
|
|
KODI_CONF_OPTS += \
|
|
|
|
-DWITH_ARCH=mips$(if $(BR2_ARCH_IS_64),64) \
|
|
|
|
-DWITH_CPU=mips$(if $(BR2_ARCH_IS_64),64)
|
|
|
|
else ifeq ($(BR2_powerpc)$(BR2_powerpc64le),y)
|
|
|
|
KODI_CONF_OPTS += \
|
|
|
|
-DWITH_ARCH=powerpc$(if $(BR2_ARCH_IS_64),64) \
|
|
|
|
-DWITH_CPU=powerpc$(if $(BR2_ARCH_IS_64),64)
|
|
|
|
else ifeq ($(BR2_powerpc64)$(BR2_sparc64)$(BR2_sh4)$(BR2_xtensa),y)
|
|
|
|
KODI_CONF_OPTS += -DWITH_ARCH=$(BR2_ARCH) -DWITH_CPU=$(BR2_ARCH)
|
|
|
|
else
|
|
|
|
# Kodi auto-detects ARCH, tested: arm, aarch64, i386, x86_64
|
|
|
|
# see project/cmake/scripts/linux/ArchSetup.cmake
|
|
|
|
KODI_CONF_OPTS += -DWITH_CPU=$(BR2_ARCH)
|
|
|
|
endif
|
2017-04-29 10:37:28 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_X86_CPU_HAS_SSE),y)
|
|
|
|
KODI_CONF_OPTS += -D_SSE_OK=ON -D_SSE_TRUE=ON
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += -D_SSE_OK=OFF -D_SSE_TRUE=OFF
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_X86_CPU_HAS_SSE2),y)
|
|
|
|
KODI_CONF_OPTS += -D_SSE2_OK=ON -D_SSE2_TRUE=ON
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += -D_SSE2_OK=OFF -D_SSE2_TRUE=OFF
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_X86_CPU_HAS_SSE3),y)
|
|
|
|
KODI_CONF_OPTS += -D_SSE3_OK=ON -D_SSE3_TRUE=ON
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += -D_SSE3_OK=OFF -D_SSE3_TRUE=OFF
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_X86_CPU_HAS_SSSE3),y)
|
|
|
|
KODI_CONF_OPTS += -D_SSSE3_OK=ON -D_SSSE3_TRUE=ON
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += -D_SSSE3_OK=OFF -D_SSSE3_TRUE=OFF
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_X86_CPU_HAS_SSE4),y)
|
|
|
|
KODI_CONF_OPTS += -D_SSE41_OK=ON -D_SSE41_TRUE=ON
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += -D_SSE41_OK=OFF -D_SSE41_TRUE=OFF
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_X86_CPU_HAS_SSE42),y)
|
|
|
|
KODI_CONF_OPTS += -D_SSE42_OK=ON -D_SSE42_TRUE=ON
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += -D_SSE42_OK=OFF -D_SSE42_TRUE=OFF
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_X86_CPU_HAS_AVX),y)
|
|
|
|
KODI_CONF_OPTS += -D_AVX_OK=ON -D_AVX_TRUE=ON
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += -D_AVX_OK=OFF -D_AVX_TRUE=OFF
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_X86_CPU_HAS_AVX2),y)
|
|
|
|
KODI_CONF_OPTS += -D_AVX2_OK=ON -D_AVX2_TRUE=ON
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += -D_AVX2_OK=OFF -D_AVX2_TRUE=OFF
|
|
|
|
endif
|
2014-12-23 18:46:27 +01:00
|
|
|
|
2017-08-02 18:29:42 +02:00
|
|
|
# mips: uses __atomic_load_8
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
|
|
|
|
KODI_CXX_FLAGS += -latomic
|
|
|
|
endif
|
|
|
|
|
2016-07-11 20:09:02 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_MYSQL),y)
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_MYSQLCLIENT=ON
|
2015-03-04 04:32:05 +01:00
|
|
|
KODI_DEPENDENCIES += mysql
|
|
|
|
else
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_MYSQLCLIENT=OFF
|
2015-03-04 04:32:05 +01:00
|
|
|
endif
|
|
|
|
|
2016-07-11 20:08:58 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_NONFREE),y)
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_NONFREE=ON
|
2016-07-11 20:08:58 +02:00
|
|
|
KODI_LICENSE := $(KODI_LICENSE), unrar
|
|
|
|
KODI_LICENSE_FILES += lib/UnrarXLib/license.txt
|
|
|
|
else
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_NONFREE=OFF
|
2016-07-11 20:08:58 +02:00
|
|
|
endif
|
|
|
|
|
2014-12-23 18:46:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DCORE_SYSTEM_NAME=rbpi
|
2014-12-23 18:46:27 +01:00
|
|
|
KODI_DEPENDENCIES += rpi-userland
|
2016-07-11 20:08:59 +02:00
|
|
|
else
|
2017-04-29 15:05:08 +02:00
|
|
|
# Kodi considers "rpbi" and "linux" as two separate platforms. The
|
|
|
|
# below options, defined in
|
|
|
|
# project/cmake/scripts/linux/ArchSetup.cmake are only valid for the
|
|
|
|
# "linux" platforms. The "rpbi" platform has a different set of
|
|
|
|
# options, defined in project/cmake/scripts/rbpi/
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_LDGOLD=OFF
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBAMCODEC),y)
|
|
|
|
KODI_CONF_OPTS += -DENABLE_AML=ON
|
|
|
|
KODI_DEPENDENCIES += libamcodec
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += -DENABLE_AML=OFF
|
2016-07-11 20:08:59 +02:00
|
|
|
endif
|
2016-06-10 20:13:29 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_IMX_VPUWRAP),y)
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_IMX=ON
|
2016-06-10 20:13:29 +02:00
|
|
|
KODI_DEPENDENCIES += imx-vpuwrap
|
2017-04-29 10:37:28 +02:00
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += -DENABLE_IMX=OFF
|
2015-03-04 19:37:22 +01:00
|
|
|
endif
|
2016-11-09 20:07:33 +01:00
|
|
|
endif
|
|
|
|
|
2017-04-29 10:37:28 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
|
|
|
|
KODI_CONF_OPTS += -DENABLE_UDEV=ON
|
|
|
|
KODI_DEPENDENCIES += udev
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += -DENABLE_UDEV=OFF
|
|
|
|
ifeq ($(BR2_PACKAGE_KODI_LIBUSB),y)
|
|
|
|
KODI_CONF_OPTS += -DENABLE_LIBUSB=ON
|
|
|
|
KODI_DEPENDENCIES += libusb-compat
|
|
|
|
endif
|
|
|
|
endif
|
2016-11-09 20:07:33 +01:00
|
|
|
|
2014-12-23 18:46:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBCAP),y)
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_CAP=ON
|
2014-12-23 18:46:27 +01:00
|
|
|
KODI_DEPENDENCIES += libcap
|
|
|
|
else
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_CAP=OFF
|
2014-12-23 18:46:27 +01:00
|
|
|
endif
|
|
|
|
|
2017-04-29 10:37:43 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBXML2)$(BR2_PACKAGE_LIBXSLT),yy)
|
|
|
|
KODI_CONF_OPTS += -DENABLE_XSLT=ON
|
|
|
|
KODI_DEPENDENCIES += libxml2 libxslt
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += -DENABLE_XSLT=OFF
|
|
|
|
endif
|
|
|
|
|
2017-04-29 10:37:42 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_BLUEZ),y)
|
|
|
|
KODI_CONF_OPTS += -DENABLE_BLUETOOTH=ON
|
|
|
|
KODI_DEPENDENCIES += bluez5_utils
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += -DENABLE_BLUETOOTH=OFF
|
|
|
|
endif
|
|
|
|
|
2014-12-23 18:46:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_DBUS),y)
|
|
|
|
KODI_DEPENDENCIES += dbus
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_DBUS=ON
|
2014-12-23 18:46:27 +01:00
|
|
|
else
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_DBUS=OFF
|
2014-12-23 18:46:27 +01:00
|
|
|
endif
|
|
|
|
|
2017-04-29 10:37:45 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_EVENTCLIENTS),y)
|
|
|
|
KODI_CONF_OPTS += -DENABLE_EVENTCLIENTS=ON
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += -DENABLE_EVENTCLIENTS=OFF
|
|
|
|
endif
|
|
|
|
|
2014-12-23 18:46:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_ALSA_LIB),y)
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_ALSA=ON
|
2014-12-23 18:46:27 +01:00
|
|
|
KODI_DEPENDENCIES += alsa-lib
|
|
|
|
else
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_ALSA=OFF
|
2014-12-23 18:46:27 +01:00
|
|
|
endif
|
|
|
|
|
2017-04-29 10:37:28 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_GL_EGL),y)
|
|
|
|
KODI_DEPENDENCIES += libegl libglu libgl xlib_libX11 xlib_libXext \
|
|
|
|
xlib_libXrandr libdrm
|
|
|
|
KODI_CONF_OPTS += -DENABLE_OPENGL=ON -DENABLE_X11=ON -DENABLE_OPENGLES=OFF
|
2016-02-20 23:09:07 +01:00
|
|
|
else
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_OPENGL=OFF -DENABLE_X11=OFF
|
2014-12-23 18:46:27 +01:00
|
|
|
endif
|
|
|
|
|
2017-04-29 10:37:28 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_EGL_GLES),y)
|
|
|
|
KODI_DEPENDENCIES += libegl libgles
|
|
|
|
KODI_CONF_OPTS += \
|
|
|
|
-DENABLE_OPENGLES=ON
|
2017-08-02 18:29:42 +02:00
|
|
|
KODI_C_FLAGS += `$(PKG_CONFIG_HOST_BINARY) --cflags --libs egl`
|
|
|
|
KODI_CXX_FLAGS += `$(PKG_CONFIG_HOST_BINARY) --cflags --libs egl`
|
2014-12-23 18:46:27 +01:00
|
|
|
else
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_OPENGLES=OFF
|
2014-12-23 18:46:27 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_KODI_LIBMICROHTTPD),y)
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_MICROHTTPD=ON
|
2014-12-23 18:46:27 +01:00
|
|
|
KODI_DEPENDENCIES += libmicrohttpd
|
|
|
|
else
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_MICROHTTPD=OFF
|
2014-12-23 18:46:27 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_KODI_LIBSMBCLIENT),y)
|
2015-03-06 13:50:31 +01:00
|
|
|
KODI_DEPENDENCIES += samba4
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_SMBCLIENT=ON
|
2014-12-23 18:46:27 +01:00
|
|
|
else
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_SMBCLIENT=OFF
|
2014-12-23 18:46:27 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_KODI_LIBNFS),y)
|
|
|
|
KODI_DEPENDENCIES += libnfs
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_NFS=ON
|
2014-12-23 18:46:27 +01:00
|
|
|
else
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_NFS=OFF
|
2014-12-23 18:46:27 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_KODI_LIBBLURAY),y)
|
|
|
|
KODI_DEPENDENCIES += libbluray
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_BLURAY=ON
|
2014-12-23 18:46:27 +01:00
|
|
|
else
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_BLURAY=OFF
|
2014-12-23 18:46:27 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_KODI_LIBSHAIRPLAY),y)
|
|
|
|
KODI_DEPENDENCIES += libshairplay
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_AIRTUNES=ON
|
2014-12-23 18:46:27 +01:00
|
|
|
else
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_AIRTUNES=OFF
|
2014-12-23 18:46:27 +01:00
|
|
|
endif
|
|
|
|
|
2015-10-20 21:42:26 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_LIBSSH),y)
|
|
|
|
KODI_DEPENDENCIES += libssh
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_SSH=ON
|
2015-10-20 21:42:26 +02:00
|
|
|
else
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_SSH=OFF
|
2015-10-20 21:42:26 +02:00
|
|
|
endif
|
|
|
|
|
2014-12-23 18:46:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_AVAHI),y)
|
|
|
|
KODI_DEPENDENCIES += avahi
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_AVAHI=ON
|
2014-12-23 18:46:27 +01:00
|
|
|
else
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_AVAHI=OFF
|
2014-12-23 18:46:27 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_KODI_LIBCEC),y)
|
|
|
|
KODI_DEPENDENCIES += libcec
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_CEC=ON
|
2014-12-23 18:46:27 +01:00
|
|
|
else
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_CEC=OFF
|
2014-12-23 18:46:27 +01:00
|
|
|
endif
|
|
|
|
|
2017-04-29 10:37:46 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_LCMS2),y)
|
|
|
|
KODI_DEPENDENCIES += lcms2
|
|
|
|
KODI_CONF_OPTS += -DENABLE_LCMS2=ON
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += -DENABLE_LCMS2=OFF
|
|
|
|
endif
|
|
|
|
|
2015-07-22 22:30:27 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_LIRC),y)
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_LIRC=ON
|
2015-07-22 22:30:27 +02:00
|
|
|
else
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_LIRC=OFF
|
2015-07-22 22:30:27 +02:00
|
|
|
endif
|
|
|
|
|
2014-12-23 18:46:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_LIBTHEORA),y)
|
|
|
|
KODI_DEPENDENCIES += libtheora
|
|
|
|
endif
|
|
|
|
|
|
|
|
# kodi needs libva & libva-glx
|
|
|
|
ifeq ($(BR2_PACKAGE_KODI_LIBVA)$(BR2_PACKAGE_MESA3D_DRI_DRIVER),yy)
|
|
|
|
KODI_DEPENDENCIES += mesa3d libva
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_VAAPI=ON
|
2014-12-23 18:46:27 +01:00
|
|
|
else
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_VAAPI=OFF
|
2014-12-23 18:46:27 +01:00
|
|
|
endif
|
|
|
|
|
2016-07-11 20:09:01 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_LIBVDPAU),y)
|
|
|
|
KODI_DEPENDENCIES += libvdpau
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_VDPAU=ON
|
2016-07-11 20:09:01 +02:00
|
|
|
else
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_VDPAU=OFF
|
2016-07-11 20:09:01 +02:00
|
|
|
endif
|
|
|
|
|
2016-07-11 20:08:57 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_UPNP),y)
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_UPNP=ON
|
2016-07-11 20:08:57 +02:00
|
|
|
else
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_UPNP=OFF
|
2016-07-11 20:08:57 +02:00
|
|
|
endif
|
|
|
|
|
2014-12-23 18:46:36 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_OPTICALDRIVE),y)
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_OPTICAL=ON
|
2014-12-23 18:46:36 +01:00
|
|
|
else
|
2017-04-29 10:37:28 +02:00
|
|
|
KODI_CONF_OPTS += -DENABLE_OPTICAL=OFF
|
2014-12-23 18:46:36 +01:00
|
|
|
endif
|
|
|
|
|
2017-04-29 13:14:10 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_PULSEAUDIO),y)
|
|
|
|
KODI_CONF_OPTS += -DENABLE_PULSEAUDIO=ON
|
|
|
|
KODI_DEPENDENCIES += pulseaudio
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += -DENABLE_PULSEAUDIO=OFF
|
|
|
|
endif
|
|
|
|
|
2017-04-29 10:37:28 +02:00
|
|
|
# Remove versioncheck addon, updating Kodi is done by building a new
|
|
|
|
# buildroot image.
|
|
|
|
KODI_ADDON_MANIFEST = $(TARGET_DIR)/usr/share/kodi/system/addon-manifest.xml
|
2014-12-23 18:46:27 +01:00
|
|
|
define KODI_CLEAN_UNUSED_ADDONS
|
2017-04-29 10:37:28 +02:00
|
|
|
rm -Rf $(TARGET_DIR)/usr/share/kodi/addons/service.xbmc.versioncheck
|
2017-07-05 13:14:19 +02:00
|
|
|
$(HOST_DIR)/bin/xml ed -L \
|
2017-04-29 10:37:28 +02:00
|
|
|
-d "/addons/addon[text()='service.xbmc.versioncheck']" \
|
|
|
|
$(KODI_ADDON_MANIFEST)
|
2014-12-23 18:46:27 +01:00
|
|
|
endef
|
|
|
|
KODI_POST_INSTALL_TARGET_HOOKS += KODI_CLEAN_UNUSED_ADDONS
|
|
|
|
|
|
|
|
define KODI_INSTALL_BR_WRAPPER
|
|
|
|
$(INSTALL) -D -m 0755 package/kodi/br-kodi \
|
|
|
|
$(TARGET_DIR)/usr/bin/br-kodi
|
|
|
|
endef
|
|
|
|
KODI_POST_INSTALL_TARGET_HOOKS += KODI_INSTALL_BR_WRAPPER
|
|
|
|
|
|
|
|
# When run from a startup script, Kodi has no $HOME where to store its
|
2014-12-28 16:05:42 +01:00
|
|
|
# configuration, so ends up storing it in /.kodi (yes, at the root of
|
2014-12-23 18:46:27 +01:00
|
|
|
# the rootfs). This is a problem for read-only filesystems. But we can't
|
2014-12-28 16:05:42 +01:00
|
|
|
# easily change that, so create /.kodi as a symlink where we want the
|
|
|
|
# config to eventually be. Add synlinks for the legacy XBMC name as well
|
2014-12-23 18:46:27 +01:00
|
|
|
define KODI_INSTALL_CONFIG_DIR
|
|
|
|
$(INSTALL) -d -m 0755 $(TARGET_DIR)/var/kodi
|
2014-12-28 16:05:42 +01:00
|
|
|
ln -sf /var/kodi $(TARGET_DIR)/.kodi
|
|
|
|
ln -sf /var/kodi $(TARGET_DIR)/var/xbmc
|
2014-12-23 18:46:27 +01:00
|
|
|
ln -sf /var/kodi $(TARGET_DIR)/.xbmc
|
|
|
|
endef
|
|
|
|
KODI_POST_INSTALL_TARGET_HOOKS += KODI_INSTALL_CONFIG_DIR
|
|
|
|
|
|
|
|
define KODI_INSTALL_INIT_SYSV
|
|
|
|
$(INSTALL) -D -m 755 package/kodi/S50kodi \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S50kodi
|
|
|
|
endef
|
|
|
|
|
|
|
|
define KODI_INSTALL_INIT_SYSTEMD
|
|
|
|
$(INSTALL) -D -m 644 package/kodi/kodi.service \
|
2015-03-20 20:14:05 +01:00
|
|
|
$(TARGET_DIR)/usr/lib/systemd/system/kodi.service
|
2014-12-23 18:46:27 +01:00
|
|
|
|
|
|
|
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
|
|
|
|
2015-03-20 20:14:05 +01:00
|
|
|
ln -fs ../../../../usr/lib/systemd/system/kodi.service \
|
2014-12-23 18:46:27 +01:00
|
|
|
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/kodi.service
|
|
|
|
endef
|
|
|
|
|
2017-04-29 10:37:28 +02:00
|
|
|
$(eval $(cmake-package))
|