package/kodi: bump version to 15.0 Isengard

- added libsquish as new dependency
  https://github.com/xbmc/xbmc/commit/f73653d62b09db8cab7662ae7c4b2dab596b4ab0#diff-3b3a6ec97232deb43dc14319a73872c1R2207

- updated build procedure for host version of texturepacker

- removed SDL dependencies
  http://kodi.wiki/view/Kodi_v15_%28Isengard%29_changelog#Linux_Specific
  "Removed dependencies of SDL (Simple DirectMedia Layer) for everything
   but hardware abstraction for input devices"

- added mips support:
  https://github.com/xbmc/xbmc/commit/5d1746ad5b2272ba5f906ad9a49a87b650bda14a

[Thomas:
 - don't do a manual fixup of kodi-config.cmake, and instead patch it
   to use CMAKE_FIND_ROOT_PATH. This will also avoid having to pass
   -DCMAKE_MODULE_PATH to all Kodi add-ons .mk files.]

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
diff --git a/package/kodi/kodi.mk b/package/kodi/kodi.mk
index 6052f15..e5304ab 100644
--- a/package/kodi/kodi.mk
+++ b/package/kodi/kodi.mk
@@ -4,22 +4,19 @@
 #
 ################################################################################
 
-KODI_VERSION = 14.2-Helix
+KODI_VERSION = 15.0-Isengard
 KODI_SITE = $(call github,xbmc,xbmc,$(KODI_VERSION))
 KODI_LICENSE = GPLv2
 KODI_LICENSE_FILES = LICENSE.GPL
-# needed for audioencoder addons
+# needed for binary addons
 KODI_INSTALL_STAGING = YES
-# Kodi needs host-sdl_image (and therefore host-sdl) for a host tools it builds
-# called TexturePacker. It is responsible to take all the images used in the
-# GUI and pack them in a blob.
-# http://wiki.xbmc.org/index.php?title=TexturePacker
-KODI_DEPENDENCIES = host-gawk host-gettext host-gperf host-infozip host-lzo \
-	host-nasm host-sdl_image host-swig
+KODI_DEPENDENCIES = host-gawk host-gettext host-gperf host-infozip host-giflib \
+	host-libjpeg host-lzo host-nasm host-libpng host-swig
 KODI_DEPENDENCIES += boost bzip2 expat ffmpeg fontconfig freetype jasper jpeg \
-	libass libcdio libcurl libfribidi libgcrypt libmad libmodplug libmpeg2 \
-	libogg libplist libpng libsamplerate libvorbis libxml2 libxslt lzo ncurses \
-	openssl pcre python readline sqlite taglib tiff tinyxml yajl zlib
+	libass libcdio libcurl libfribidi libgcrypt libmpeg2 \
+	libogg libplist libpng libsamplerate libsquish libvorbis libxml2 \
+	libxslt lzo ncurses openssl pcre python readline sqlite taglib tiff \
+	tinyxml yajl zlib
 
 KODI_CONF_ENV = \
 	PYTHON_VERSION="$(PYTHON_VERSION_MAJOR)" \
@@ -33,8 +30,6 @@
 
 KODI_CONF_OPTS +=  \
 	--with-ffmpeg=shared \
-	--disable-crystalhd \
-	--disable-hal \
 	--disable-joystick \
 	--disable-openmax \
 	--disable-projectm \
@@ -91,13 +86,15 @@
 # GL means X11, and under X11, Kodi needs libdrm; libdrm is forcefully selected
 # by a modular Xorg server, which Kodi already depends on.
 ifeq ($(BR2_PACKAGE_KODI_GL),y)
-KODI_DEPENDENCIES += libglew libglu libgl sdl_image xlib_libX11 xlib_libXext \
+KODI_DEPENDENCIES += libglew libglu libgl xlib_libX11 xlib_libXext \
 	xlib_libXmu xlib_libXrandr xlib_libXt libdrm
-KODI_CONF_OPTS += --enable-gl --enable-sdl --enable-x11 --enable-xrandr --disable-gles
+KODI_CONF_OPTS += --enable-gl --enable-x11 --disable-gles
 ifeq ($(BR2_PACKAGE_KODI_RSXS),y)
 # fix rsxs compile
+# gcc5: http://trac.kodi.tv/ticket/16006#comment:6
 # make sure target libpng-config is used, options taken from rsxs-0.9/acinclude.m4
 KODI_CONF_ENV += \
+	ac_cv_type__Bool=yes \
 	jm_cv_func_gettimeofday_clobber=no \
 	mac_cv_pkg_png=$(STAGING_DIR)/usr/bin/libpng-config \
 	mac_cv_pkg_cppflags="`$(STAGING_DIR)/usr/bin/libpng-config --I_opts --cppflags`" \
@@ -109,7 +106,7 @@
 KODI_CONF_OPTS += --disable-rsxs
 endif
 else
-KODI_CONF_OPTS += --disable-gl --disable-rsxs --disable-sdl --disable-x11 --disable-xrandr
+KODI_CONF_OPTS += --disable-gl --disable-rsxs --disable-x11
 ifeq ($(BR2_PACKAGE_KODI_EGL_GLES),y)
 KODI_DEPENDENCIES += libegl libgles
 KODI_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) `$(PKG_CONFIG_HOST_BINARY) --cflags --libs egl`"
@@ -213,6 +210,8 @@
 
 # Add HOST_DIR to PATH for codegenerator.mk to find swig
 define KODI_BOOTSTRAP
+	$(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D)/tools/depends/native/JsonSchemaBuilder
+	$(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D)/tools/depends/native/TexturePacker
 	cd $(@D) && PATH=$(BR_PATH) ./bootstrap
 endef
 KODI_PRE_CONFIGURE_HOOKS += KODI_BOOTSTRAP