new file mode 100644
@@ -0,0 +1,43 @@
+From f7291b1decd24a4e9530f98d7723fb55f38223ea Mon Sep 17 00:00:00 2001
+From: Davide Viti <zinosat@tiscali.it>
+Date: Thu, 14 Jul 2016 10:14:59 +0100
+Subject: [PATCH] rename cmake rootfile
+
+ctest fails on the target, because it cannot find CMake.cmake inside
+CMAKE_DATA_DIR (typically set to "/usr/share/cmake-3.0"): all *.cmake
+files are removed at build time via the target-finalize rule.
+
+This buildroot-specific patch makes sure ctest looks also for
+"Modules/CMake.cmake.ctest" before complaining
+
+[Vincent: tweak patch for 3.6.3]
+[James: tweak patch for 3.15.3]
+
+Signed-off-by: Davide Viti <zinosat@tiscali.it>
+Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
+Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
+---
+ Source/cmake.cxx | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/Source/cmake.cxx b/Source/cmake.cxx
+index 3772f09985..c317e4af38 100644
+--- a/Source/cmake.cxx
++++ b/Source/cmake.cxx
+@@ -1009,7 +1009,12 @@ int cmake::AddCMakePaths()
+ "Path to cpack program executable.", cmStateEnums::INTERNAL);
+ #endif
+ if (!cmSystemTools::FileExists(
+- (cmSystemTools::GetCMakeRoot() + "/Modules/CMake.cmake"))) {
++ (cmSystemTools::GetCMakeRoot() + "/Modules/CMake.cmake")) &&
++ !cmSystemTools::FileExists(
++ (cmSystemTools::GetCMakeRoot()+"/Modules/CMake.cmake.ctest")
++ )
++ )
++ {
+ // couldn't find modules
+ cmSystemTools::Error(
+ "Could not find CMAKE_ROOT !!!\n"
+--
+2.20.1
+
similarity index 100%
rename from package/cmake/0001-rename_cmake_rootfile.patch
rename to package/cmake/3.8.2/0001-rename_cmake_rootfile.patch
similarity index 100%
rename from package/cmake/0002-FindLibUV-Also-check-uv-version-h-for-version-detection.patch
rename to package/cmake/3.8.2/0002-FindLibUV-Also-check-uv-version-h-for-version-detection.patch
@@ -1,5 +1,7 @@
-# From http://www.cmake.org/files/v3.8/cmake-3.8.2-SHA-256.txt
+# From https://cmake.org/files/v3.15/cmake-3.15.3-SHA-256.txt
sha256 da3072794eb4c09f2d782fcee043847b99bb4cf8d4573978d9b2024214d6e92d cmake-3.8.2.tar.gz
+sha256 13958243a01365b05652fa01b21d40fa834f70a9e30efa69c02604e64f58b8f5 cmake-3.15.3.tar.gz
# Locally calculated
sha256 af3030e1bf1af2f534430fdfe3cfc5a617966648a2a7f0c06a631adc92be1e5f Copyright.txt
+sha256 dc628fb936a5d229296d42083f9a8218aa32204c016919e784404c9ec58776e9 Copyright.txt
@@ -4,8 +4,13 @@
#
################################################################################
+ifeq ($(BR2_HOST_GCC_AT_LEAST_4_8),y)
+CMAKE_VERSION_MAJOR = 3.15
+CMAKE_VERSION = $(CMAKE_VERSION_MAJOR).3
+else
CMAKE_VERSION_MAJOR = 3.8
CMAKE_VERSION = $(CMAKE_VERSION_MAJOR).2
+endif
CMAKE_SITE = https://cmake.org/files/v$(CMAKE_VERSION_MAJOR)
CMAKE_LICENSE = BSD-3-Clause
CMAKE_LICENSE_FILES = Copyright.txt