File fix_non_git_usage.patch of Package otb

--- CMake/OTBModuleRemote.cmake.orig	2017-11-21 11:56:52.159579062 +0100
+++ CMake/OTBModuleRemote.cmake	2017-11-21 12:20:37.262473283 +0100
@@ -24,18 +24,19 @@
 function(_git_clone git_executable git_repository git_tag module_dir)
   set(retryCount 0)
   set(error_code 1)
-  while(error_code AND (retryCount LESS 3))
-    execute_process(
-      COMMAND "${git_executable}" clone "${git_repository}" "${module_dir}"
-      RESULT_VARIABLE error_code
-      OUTPUT_QUIET
-      ERROR_QUIET
-      )
-    math(EXPR retryCount "${retryCount}+1")
-  endwhile()
-  if(error_code)
-    message(FATAL_ERROR "Failed to clone repository: '${git_repository}'")
-  endif()
+#   while(error_code AND (retryCount LESS 3))
+#     execute_process(
+#       COMMAND "${git_executable}" clone "${git_repository}" "${module_dir}"
+#       RESULT_VARIABLE error_code
+#       OUTPUT_QUIET
+#       ERROR_QUIET
+#       )
+#     math(EXPR retryCount "${retryCount}+1")
+#   endwhile()
+#   if(error_code)
+#     message(FATAL_ERROR "Failed to clone repository: '${git_repository}'")
+#   endif()
+   message(STATUS "NOT cloning repository: '${git_repository}', but using provided tarball instead")
 
   execute_process(
     COMMAND "${git_executable}" checkout ${git_tag}
@@ -91,14 +92,15 @@ function(_git_update git_executable git_
 
   # Is the hash checkout out that we want?
   if(NOT ("${tag_hash}" STREQUAL "${head_hash}"))
-    execute_process(
-      COMMAND "${git_executable}" fetch "${git_repository}"
-      WORKING_DIRECTORY "${module_dir}"
-      RESULT_VARIABLE error_code
-      )
-    if(error_code)
-      message(FATAL_ERROR "Failed to fetch repository '${git_repository}'")
-    endif()
+# DO NOT FETCH, we are offline
+#     execute_process(
+#       COMMAND "${git_executable}" fetch "${git_repository}"
+#       WORKING_DIRECTORY "${module_dir}"
+#       RESULT_VARIABLE error_code
+#       )
+#     if(error_code)
+#       message(FATAL_ERROR "Failed to fetch repository '${git_repository}'")
+#     endif()
 
     execute_process(
       COMMAND "${git_executable}" checkout ${git_tag}
openSUSE Build Service is sponsored by