File cmake-binary-addons.patch of Package kodi.binary-addons (Revision 24)

Currently displaying revision 24 , Show latest

120
 
1
--- cmake/addons/bootstrap/CMakeLists.txt.orig  2019-01-02 06:30:44.411256266 +0200
2
+++ cmake/addons/bootstrap/CMakeLists.txt   2019-01-02 06:32:13.036349247 +0200
3
@@ -41,8 +41,8 @@
4
 function(bootstrap_repo repo_id repo_url repo_revision)
5
   message(STATUS "Bootstrapping addons from ${repo_id} (${repo_url} ${repo_revision})...")
6
   externalproject_add(${repo_id}
7
-                      GIT_REPOSITORY ${repo_url}
8
-                      GIT_TAG ${repo_revision}
9
+                      URL ${repo_url}
10
+                      # GIT_TAG ${repo_revision}
11
                       PREFIX ${BUILD_DIR}/${repo_id}
12
                       CONFIGURE_COMMAND ""
13
                       BUILD_COMMAND ""
14
--- cmake/addons/bootstrap/repositories/binary-addons.txt.orig  2019-01-02 06:26:28.785086899 +0200
15
+++ cmake/addons/bootstrap/repositories/binary-addons.txt   2019-01-02 06:28:44.099306053 +0200
16
@@ -1 +1 @@
17
-binary-addons https://github.com/xbmc/repo-binary-addons.git Leia
18
+binary-addons file://repo-binary-addons.Leia.tar.bz2 Leia
19
--- cmake/scripts/common/HandleDepends.cmake.orig   2019-01-07 21:13:40.019077286 +0200
20
+++ cmake/scripts/common/HandleDepends.cmake    2019-01-07 21:13:46.843195249 +0200
21
@@ -246,7 +246,7 @@
22
 
23
             externalproject_add(${id}
24
                                 URL ${url}
25
-                                "${URL_HASH_COMMAND}"
26
+                                ${URL_HASH_COMMAND}
27
                                 DOWNLOAD_DIR ${DOWNLOAD_DIR}
28
                                 CONFIGURE_COMMAND ${CONFIGURE_COMMAND}
29
                                 "${EXTERNALPROJECT_SETUP}")
30
--- cmake/addons/CMakeLists.txt.orig    2019-07-10 20:36:48.837364578 +0300
31
+++ cmake/addons/CMakeLists.txt 2019-07-10 20:37:25.965756704 +0300
32
@@ -164,16 +164,19 @@
33
 include(${CORE_SOURCE_DIR}/cmake/scripts/common/CheckTargetPlatform.cmake)
34
 
35
 set(ADDON_INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
36
-if(NOT WIN32)
37
-  # check install permissions
38
-  check_install_permissions(${CMAKE_INSTALL_PREFIX} can_write)
39
-  if(NOT ${can_write} AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
40
-    set(NEED_SUDO TRUE)
41
-    set(ADDON_INSTALL_DIR ${CMAKE_BINARY_DIR}/.install)
42
-    list(APPEND BUILD_ARGS -DOVERRIDE_PATHS=ON)
43
-    message(STATUS "NEED_SUDO: ${NEED_SUDO} (no write permission for ${CMAKE_INSTALL_PREFIX})")
44
-  endif()
45
-endif()
46
+message(STATUS "ADDON_INSTALL_DIR: ${ADDON_INSTALL_DIR}")
47
+message(STATUS "NEED_SUDO: ${NEED_SUDO}")
48
+list(APPEND BUILD_ARGS -DOVERRIDE_PATHS=ON)
49
+#if(NOT WIN32)
50
+#  # check install permissions
51
+#  check_install_permissions(${CMAKE_INSTALL_PREFIX} can_write)
52
+#  if(NOT ${can_write} AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
53
+#    set(NEED_SUDO TRUE)
54
+#    set(ADDON_INSTALL_DIR ${CMAKE_BINARY_DIR}/.install)
55
+#    list(APPEND BUILD_ARGS -DOVERRIDE_PATHS=ON)
56
+#    message(STATUS "NEED_SUDO: ${NEED_SUDO} (no write permission for ${CMAKE_INSTALL_PREFIX})")
57
+#  endif()
58
+#endif()
59
 
60
 ### prepare the build environment for the binary addons
61
 # copy the PrepareEnv.cmake script to the depends path so that we can include it
62
@@ -232,6 +235,7 @@
63
 set(SUPPORTED_ADDON_FOUND FALSE)
64
 
65
 foreach(addon ${addons})
66
+  message(STATUS "Building addon: ${addon}")
67
   if(NOT (addon MATCHES platforms.txt))
68
     file(STRINGS ${addon} def)
69
     string(REPLACE " " ";" def ${def})
70
@@ -279,10 +283,12 @@
71
           list(GET def 2 revision)
72
 
73
           # we need access to a git executable
74
-          find_package(Git REQUIRED)
75
+          find_package(Git)
76
 
77
           # resolve revision to git hash
78
-          execute_process(COMMAND ${GIT_EXECUTABLE} ls-remote ${url} ${revision} OUTPUT_VARIABLE revision_hash)
79
+     if(Git_FOUND)
80
+               execute_process(COMMAND ${GIT_EXECUTABLE} ls-remote ${url} ${revision} OUTPUT_VARIABLE revision_hash)
81
+     endif()
82
           # git ls-remote only works on branches and tag names but not on revisions
83
           if(NOT "${revision_hash}" STREQUAL "")
84
             string(REPLACE "\t" ";" revision_list ${revision_hash})
85
@@ -342,9 +348,11 @@
86
             endif()
87
           endif()
88
 
89
+     message(STAUTS " REMOVING ${BUILD_DIR}/${id}")
90
           # remove any previously extracted version of the addon
91
           file(REMOVE_RECURSE "${BUILD_DIR}/${id}")
92
 
93
+     message(STAUTS " EXTRACT ${BUILD_DIR}/download/${archive_name}.tar.gz")
94
           # extract the addon from the archive
95
           execute_process(COMMAND ${CMAKE_COMMAND} -E tar xzvf ${BUILD_DIR}/download/${archive_name}.tar.gz
96
                           WORKING_DIRECTORY ${BUILD_DIR})
97
@@ -379,14 +387,19 @@
98
           # add "kodi-platform" as a dependency to every addon
99
           add_dependencies(${id} kodi-platform)
100
 
101
+     # add "rapidxml" as a dependency to pvr.iptvsimple
102
+          if(${id} STREQUAL "pvr.iptvsimple")
103
+       add_dependencies(${id} rapidxml)
104
+          endif()
105
+
106
           set(${id}_DEPENDS_DIR ${SOURCE_DIR}/depends)
107
 
108
           if(EXISTS ${${id}_DEPENDS_DIR})
109
-            include(${CORE_SOURCE_DIR}/cmake/scripts/common/HandleDepends.cmake)
110
-            add_addon_depends(${id} ${${id}_DEPENDS_DIR})
111
+            # include(${CORE_SOURCE_DIR}/cmake/scripts/common/HandleDepends.cmake)
112
+            # add_addon_depends(${id} ${${id}_DEPENDS_DIR})
113
             if(${id}_DEPS AND NOT "${${id}_DEPS}" STREQUAL "")
114
               message(STATUS "${id} DEPENDENCIES: ${${id}_DEPS}")
115
-              add_dependencies(${id} ${${id}_DEPS})
116
+              # add_dependencies(${id} ${${id}_DEPS})
117
             endif()
118
           endif()
119
 
120