File cmake-binary-addons.patch of Package kodi.binary-addons

--- cmake/addons/bootstrap/CMakeLists.txt.orig	2019-01-02 06:30:44.411256266 +0200
+++ cmake/addons/bootstrap/CMakeLists.txt	2019-01-02 06:32:13.036349247 +0200
@@ -41,8 +41,8 @@
 function(bootstrap_repo repo_id repo_url repo_revision)
   message(STATUS "Bootstrapping addons from ${repo_id} (${repo_url} ${repo_revision})...")
   externalproject_add(${repo_id}
-                      GIT_REPOSITORY ${repo_url}
-                      GIT_TAG ${repo_revision}
+                      URL ${repo_url}
+                      # GIT_TAG ${repo_revision}
                       PREFIX ${BUILD_DIR}/${repo_id}
                       CONFIGURE_COMMAND ""
                       BUILD_COMMAND ""
--- cmake/addons/bootstrap/repositories/binary-addons.txt.orig	2019-01-02 06:26:28.785086899 +0200
+++ cmake/addons/bootstrap/repositories/binary-addons.txt	2019-01-02 06:28:44.099306053 +0200
@@ -1 +1 @@
-binary-addons https://github.com/xbmc/repo-binary-addons.git Leia
+binary-addons file://repo-binary-addons.Leia.tar.bz2 Leia
--- cmake/scripts/common/HandleDepends.cmake.orig	2019-01-07 21:13:40.019077286 +0200
+++ cmake/scripts/common/HandleDepends.cmake	2019-01-07 21:13:46.843195249 +0200
@@ -246,7 +246,7 @@
 
             externalproject_add(${id}
                                 URL ${url}
-                                "${URL_HASH_COMMAND}"
+                                ${URL_HASH_COMMAND}
                                 DOWNLOAD_DIR ${DOWNLOAD_DIR}
                                 CONFIGURE_COMMAND ${CONFIGURE_COMMAND}
                                 "${EXTERNALPROJECT_SETUP}")
--- cmake/addons/CMakeLists.txt.orig	2019-07-10 20:36:48.837364578 +0300
+++ cmake/addons/CMakeLists.txt	2019-07-10 20:37:25.965756704 +0300
@@ -164,16 +164,19 @@
 include(${CORE_SOURCE_DIR}/cmake/scripts/common/CheckTargetPlatform.cmake)
 
 set(ADDON_INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
-if(NOT WIN32)
-  # check install permissions
-  check_install_permissions(${CMAKE_INSTALL_PREFIX} can_write)
-  if(NOT ${can_write} AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
-    set(NEED_SUDO TRUE)
-    set(ADDON_INSTALL_DIR ${CMAKE_BINARY_DIR}/.install)
-    list(APPEND BUILD_ARGS -DOVERRIDE_PATHS=ON)
-    message(STATUS "NEED_SUDO: ${NEED_SUDO} (no write permission for ${CMAKE_INSTALL_PREFIX})")
-  endif()
-endif()
+message(STATUS "ADDON_INSTALL_DIR: ${ADDON_INSTALL_DIR}")
+message(STATUS "NEED_SUDO: ${NEED_SUDO}")
+list(APPEND BUILD_ARGS -DOVERRIDE_PATHS=ON)
+#if(NOT WIN32)
+#  # check install permissions
+#  check_install_permissions(${CMAKE_INSTALL_PREFIX} can_write)
+#  if(NOT ${can_write} AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
+#    set(NEED_SUDO TRUE)
+#    set(ADDON_INSTALL_DIR ${CMAKE_BINARY_DIR}/.install)
+#    list(APPEND BUILD_ARGS -DOVERRIDE_PATHS=ON)
+#    message(STATUS "NEED_SUDO: ${NEED_SUDO} (no write permission for ${CMAKE_INSTALL_PREFIX})")
+#  endif()
+#endif()
 
 ### prepare the build environment for the binary addons
 # copy the PrepareEnv.cmake script to the depends path so that we can include it
@@ -232,6 +235,7 @@
 set(SUPPORTED_ADDON_FOUND FALSE)
 
 foreach(addon ${addons})
+  message(STATUS "Building addon: ${addon}")
   if(NOT (addon MATCHES platforms.txt))
     file(STRINGS ${addon} def)
     string(REPLACE " " ";" def ${def})
@@ -279,10 +283,12 @@
           list(GET def 2 revision)
 
           # we need access to a git executable
-          find_package(Git REQUIRED)
+          find_package(Git)
 
           # resolve revision to git hash
-          execute_process(COMMAND ${GIT_EXECUTABLE} ls-remote ${url} ${revision} OUTPUT_VARIABLE revision_hash)
+	  if(Git_FOUND)
+               execute_process(COMMAND ${GIT_EXECUTABLE} ls-remote ${url} ${revision} OUTPUT_VARIABLE revision_hash)
+	  endif()
           # git ls-remote only works on branches and tag names but not on revisions
           if(NOT "${revision_hash}" STREQUAL "")
             string(REPLACE "\t" ";" revision_list ${revision_hash})
@@ -342,9 +348,11 @@
             endif()
           endif()
 
+	  message(STAUTS " REMOVING ${BUILD_DIR}/${id}")
           # remove any previously extracted version of the addon
           file(REMOVE_RECURSE "${BUILD_DIR}/${id}")
 
+	  message(STAUTS " EXTRACT ${BUILD_DIR}/download/${archive_name}.tar.gz")
           # extract the addon from the archive
           execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzvf ${BUILD_DIR}/download/${archive_name}.tar.gz
                           WORKING_DIRECTORY ${BUILD_DIR})
@@ -379,14 +387,19 @@
           # add "kodi-platform" as a dependency to every addon
           add_dependencies(${id} kodi-platform)
 
+	  # add "rapidxml" as a dependency to pvr.iptvsimple
+          if(${id} STREQUAL "pvr.iptvsimple")
+	    add_dependencies(${id} rapidxml)
+          endif()
+
           set(${id}_DEPENDS_DIR ${SOURCE_DIR}/depends)
 
           if(EXISTS ${${id}_DEPENDS_DIR})
-            include(${CORE_SOURCE_DIR}/cmake/scripts/common/HandleDepends.cmake)
-            add_addon_depends(${id} ${${id}_DEPENDS_DIR})
+            # include(${CORE_SOURCE_DIR}/cmake/scripts/common/HandleDepends.cmake)
+            # add_addon_depends(${id} ${${id}_DEPENDS_DIR})
             if(${id}_DEPS AND NOT "${${id}_DEPS}" STREQUAL "")
               message(STATUS "${id} DEPENDENCIES: ${${id}_DEPS}")
-              add_dependencies(${id} ${${id}_DEPS})
+              # add_dependencies(${id} ${${id}_DEPS})
             endif()
           endif()