2014-12-23 18:46:27 +01:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# kodi
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2016-04-24 14:23:04 +02:00
|
|
|
KODI_VERSION = 16.1-Jarvis
|
2014-12-23 18:46:27 +01:00
|
|
|
KODI_SITE = $(call github,xbmc,xbmc,$(KODI_VERSION))
|
|
|
|
KODI_LICENSE = GPLv2
|
|
|
|
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 = \
|
|
|
|
boost \
|
|
|
|
bzip2 \
|
|
|
|
expat \
|
|
|
|
ffmpeg \
|
|
|
|
fontconfig \
|
|
|
|
freetype \
|
|
|
|
giflib \
|
|
|
|
host-gawk \
|
|
|
|
host-gettext \
|
|
|
|
host-giflib \
|
|
|
|
host-gperf \
|
|
|
|
host-libjpeg \
|
|
|
|
host-libpng \
|
|
|
|
host-lzo \
|
|
|
|
host-nasm \
|
|
|
|
host-swig \
|
|
|
|
host-zip \
|
|
|
|
jasper \
|
|
|
|
jpeg \
|
|
|
|
libass \
|
|
|
|
libcdio \
|
|
|
|
libcrossguid \
|
|
|
|
libcurl \
|
|
|
|
libdcadec \
|
|
|
|
libfribidi \
|
|
|
|
libgcrypt \
|
|
|
|
libmpeg2 \
|
|
|
|
libogg \
|
|
|
|
libplist \
|
|
|
|
libpng \
|
|
|
|
libsamplerate \
|
|
|
|
libsquish \
|
|
|
|
libvorbis \
|
|
|
|
libxml2 \
|
|
|
|
libxslt \
|
|
|
|
lzo \
|
|
|
|
ncurses \
|
|
|
|
openssl \
|
|
|
|
pcre \
|
|
|
|
python \
|
|
|
|
readline \
|
|
|
|
sqlite \
|
|
|
|
taglib \
|
|
|
|
tiff \
|
|
|
|
tinyxml \
|
|
|
|
yajl \
|
|
|
|
zlib
|
2014-12-23 18:46:27 +01:00
|
|
|
|
|
|
|
KODI_CONF_ENV = \
|
|
|
|
PYTHON_VERSION="$(PYTHON_VERSION_MAJOR)" \
|
|
|
|
PYTHON_LDFLAGS="-lpython$(PYTHON_VERSION_MAJOR) -lpthread -ldl -lutil -lm" \
|
|
|
|
PYTHON_CPPFLAGS="-I$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR)" \
|
|
|
|
PYTHON_SITE_PKG="$(STAGING_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages" \
|
|
|
|
PYTHON_NOVERSIONCHECK="no-check" \
|
|
|
|
use_texturepacker_native=yes \
|
|
|
|
USE_TEXTUREPACKER_NATIVE_ROOT="$(HOST_DIR)/usr" \
|
|
|
|
TEXTUREPACKER_NATIVE_ROOT="$(HOST_DIR)/usr"
|
|
|
|
|
|
|
|
KODI_CONF_OPTS += \
|
2014-12-23 18:46:29 +01:00
|
|
|
--with-ffmpeg=shared \
|
2014-12-23 18:46:27 +01:00
|
|
|
--disable-joystick \
|
|
|
|
--disable-openmax \
|
|
|
|
--disable-pulse \
|
|
|
|
--disable-vtbdecoder \
|
|
|
|
--enable-optimizations
|
|
|
|
|
2016-07-11 20:09:02 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_MYSQL),y)
|
2015-03-04 04:32:05 +01:00
|
|
|
KODI_CONF_OPTS += --enable-mysql
|
|
|
|
KODI_CONF_ENV += ac_cv_path_MYSQL_CONFIG="$(STAGING_DIR)/usr/bin/mysql_config"
|
|
|
|
KODI_DEPENDENCIES += mysql
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += --disable-mysql
|
|
|
|
endif
|
|
|
|
|
2016-07-11 20:08:58 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_NONFREE),y)
|
|
|
|
KODI_CONF_OPTS += --enable-non-free
|
|
|
|
KODI_LICENSE := $(KODI_LICENSE), unrar
|
|
|
|
KODI_LICENSE_FILES += lib/UnrarXLib/license.txt
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += --disable-non-free
|
|
|
|
endif
|
|
|
|
|
2014-12-23 18:46:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_RPI_USERLAND),y)
|
|
|
|
KODI_DEPENDENCIES += rpi-userland
|
2016-05-08 09:44:42 +02:00
|
|
|
KODI_CONF_OPTS += --with-platform=raspberry-pi --enable-player=omxplayer
|
2016-11-09 20:07:33 +01:00
|
|
|
KODI_INCLUDES += \
|
|
|
|
-I$(STAGING_DIR)/usr/include/interface/vcos/pthreads \
|
|
|
|
-I$(STAGING_DIR)/usr/include/interface/vmcs_host/linux
|
|
|
|
KODI_LIBS = -lvcos -lvchostif
|
2014-12-23 18:46:27 +01:00
|
|
|
endif
|
|
|
|
|
2016-07-11 20:08:59 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
|
|
|
|
KODI_DEPENDENCIES += udev
|
|
|
|
KODI_CONF_OPTS += --enable-udev
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += --disable-udev
|
|
|
|
endif
|
|
|
|
|
2016-06-10 20:13:29 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_IMX_VPUWRAP),y)
|
|
|
|
KODI_DEPENDENCIES += imx-vpuwrap
|
2015-03-04 19:37:22 +01:00
|
|
|
KODI_CONF_OPTS += --enable-codec=imxvpu
|
|
|
|
endif
|
|
|
|
|
2016-11-09 20:07:33 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBAMCODEC),y)
|
|
|
|
KODI_DEPENDENCIES += libamcodec
|
|
|
|
KODI_CONF_OPTS += --enable-codec=amcodec
|
|
|
|
KODI_INCLUDES += -I$(STAGING_DIR)/usr/include/amcodec
|
|
|
|
endif
|
|
|
|
|
|
|
|
KODI_CONF_ENV += \
|
|
|
|
INCLUDES="$(KODI_INCLUDES)" \
|
|
|
|
LIBS="$(KODI_LIBS)"
|
|
|
|
|
2014-12-23 18:46:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBCAP),y)
|
|
|
|
KODI_CONF_OPTS += --enable-libcap
|
|
|
|
KODI_DEPENDENCIES += libcap
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += --disable-libcap
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_KODI_DBUS),y)
|
|
|
|
KODI_DEPENDENCIES += dbus
|
|
|
|
KODI_CONF_OPTS += --enable-dbus
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += --disable-dbus
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_KODI_ALSA_LIB),y)
|
|
|
|
KODI_DEPENDENCIES += alsa-lib
|
|
|
|
KODI_CONF_OPTS += --enable-alsa
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += --disable-alsa
|
|
|
|
endif
|
|
|
|
|
|
|
|
# quote from kodi/configure.in: "GLES overwrites GL if both set to yes."
|
|
|
|
# we choose the opposite because opengl offers more features, like libva support
|
2015-01-19 00:13:30 +01:00
|
|
|
# GL means X11, and under X11, Kodi needs libdrm; libdrm is forcefully selected
|
|
|
|
# by a modular Xorg server, which Kodi already depends on.
|
2014-12-23 18:46:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_GL),y)
|
2015-07-22 22:30:26 +02:00
|
|
|
KODI_DEPENDENCIES += libglew libglu libgl xlib_libX11 xlib_libXext \
|
2015-01-19 00:13:30 +01:00
|
|
|
xlib_libXmu xlib_libXrandr xlib_libXt libdrm
|
2015-07-22 22:30:26 +02:00
|
|
|
KODI_CONF_OPTS += --enable-gl --enable-x11 --disable-gles
|
2016-02-20 23:09:07 +01:00
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += --disable-gl --disable-x11
|
2014-12-23 18:46:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_EGL_GLES),y)
|
|
|
|
KODI_DEPENDENCIES += libegl libgles
|
2015-07-25 16:19:53 +02:00
|
|
|
KODI_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) `$(PKG_CONFIG_HOST_BINARY) --cflags --libs egl`"
|
|
|
|
KODI_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) `$(PKG_CONFIG_HOST_BINARY) --cflags --libs egl`"
|
2014-12-23 18:46:27 +01:00
|
|
|
KODI_CONF_OPTS += --enable-gles
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += --disable-gles
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_KODI_LIBUSB),y)
|
|
|
|
KODI_DEPENDENCIES += libusb-compat
|
|
|
|
KODI_CONF_OPTS += --enable-libusb
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += --disable-libusb
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_KODI_LIBMICROHTTPD),y)
|
|
|
|
KODI_DEPENDENCIES += libmicrohttpd
|
|
|
|
KODI_CONF_OPTS += --enable-webserver
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += --disable-webserver
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_KODI_LIBSMBCLIENT),y)
|
2015-03-06 13:50:31 +01:00
|
|
|
KODI_DEPENDENCIES += samba4
|
2014-12-23 18:46:27 +01:00
|
|
|
KODI_CONF_OPTS += --enable-samba
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += --disable-samba
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_KODI_LIBNFS),y)
|
|
|
|
KODI_DEPENDENCIES += libnfs
|
|
|
|
KODI_CONF_OPTS += --enable-nfs
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += --disable-nfs
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_KODI_RTMPDUMP),y)
|
|
|
|
KODI_DEPENDENCIES += rtmpdump
|
|
|
|
KODI_CONF_OPTS += --enable-rtmp
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += --disable-rtmp
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_KODI_LIBBLURAY),y)
|
|
|
|
KODI_DEPENDENCIES += libbluray
|
|
|
|
KODI_CONF_OPTS += --enable-libbluray
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += --disable-libbluray
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_KODI_LIBSHAIRPLAY),y)
|
|
|
|
KODI_DEPENDENCIES += libshairplay
|
|
|
|
KODI_CONF_OPTS += --enable-airplay
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += --disable-airplay
|
|
|
|
endif
|
|
|
|
|
2015-10-20 21:42:26 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_LIBSSH),y)
|
|
|
|
KODI_DEPENDENCIES += libssh
|
|
|
|
KODI_CONF_OPTS += --enable-ssh
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += --disable-ssh
|
|
|
|
endif
|
|
|
|
|
2014-12-23 18:46:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_AVAHI),y)
|
|
|
|
KODI_DEPENDENCIES += avahi
|
|
|
|
KODI_CONF_OPTS += --enable-avahi
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += --disable-avahi
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_KODI_LIBCEC),y)
|
|
|
|
KODI_DEPENDENCIES += libcec
|
|
|
|
KODI_CONF_OPTS += --enable-libcec
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += --disable-libcec
|
|
|
|
endif
|
|
|
|
|
2015-07-22 22:30:27 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_LIRC),y)
|
|
|
|
KODI_CONF_OPTS += --enable-lirc
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += --disable-lirc
|
|
|
|
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
|
|
|
|
KODI_CONF_OPTS += --enable-vaapi
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += --disable-vaapi
|
|
|
|
endif
|
|
|
|
|
2016-07-11 20:09:01 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_LIBVDPAU),y)
|
|
|
|
KODI_DEPENDENCIES += libvdpau
|
|
|
|
KODI_CONF_OPTS += --enable-vdpau
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += --disable-vdpau
|
|
|
|
endif
|
|
|
|
|
2016-07-11 20:08:57 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_UPNP),y)
|
|
|
|
KODI_CONF_OPTS += --enable-upnp
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += --disable-upnp
|
|
|
|
endif
|
|
|
|
|
2014-12-23 18:46:36 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_KODI_OPTICALDRIVE),y)
|
|
|
|
KODI_CONF_OPTS += --enable-optical-drive --enable-dvdcss
|
|
|
|
else
|
|
|
|
KODI_CONF_OPTS += --disable-optical-drive --disable-dvdcss
|
|
|
|
endif
|
|
|
|
|
2014-12-23 18:46:27 +01:00
|
|
|
# Add HOST_DIR to PATH for codegenerator.mk to find swig
|
|
|
|
define KODI_BOOTSTRAP
|
2015-07-22 22:30:26 +02:00
|
|
|
$(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D)/tools/depends/native/JsonSchemaBuilder
|
|
|
|
$(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D)/tools/depends/native/TexturePacker
|
2014-12-23 18:46:27 +01:00
|
|
|
cd $(@D) && PATH=$(BR_PATH) ./bootstrap
|
|
|
|
endef
|
|
|
|
KODI_PRE_CONFIGURE_HOOKS += KODI_BOOTSTRAP
|
|
|
|
|
|
|
|
define KODI_CLEAN_UNUSED_ADDONS
|
2014-12-28 16:05:42 +01:00
|
|
|
rm -Rf $(TARGET_DIR)/usr/share/kodi/addons/visualization.milkdrop
|
|
|
|
rm -Rf $(TARGET_DIR)/usr/share/kodi/addons/visualization.projectm
|
|
|
|
rm -Rf $(TARGET_DIR)/usr/share/kodi/addons/visualization.itunes
|
2014-12-23 18:46:27 +01:00
|
|
|
endef
|
|
|
|
KODI_POST_INSTALL_TARGET_HOOKS += KODI_CLEAN_UNUSED_ADDONS
|
|
|
|
|
|
|
|
define KODI_CLEAN_CONFLUENCE_SKIN
|
2014-12-28 16:05:42 +01:00
|
|
|
find $(TARGET_DIR)/usr/share/kodi/addons/skin.confluence/media -name *.png -delete
|
|
|
|
find $(TARGET_DIR)/usr/share/kodi/addons/skin.confluence/media -name *.jpg -delete
|
2014-12-23 18:46:27 +01:00
|
|
|
endef
|
|
|
|
KODI_POST_INSTALL_TARGET_HOOKS += KODI_CLEAN_CONFLUENCE_SKIN
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
$(eval $(autotools-package))
|