Update tools/cmake from upstream
authorRISCi_ATOM <bob@bobcall.me>
Tue, 28 Nov 2017 22:38:53 +0000 (17:38 -0500)
committerRISCi_ATOM <bob@bobcall.me>
Fri, 1 Dec 2017 17:42:17 +0000 (12:42 -0500)
12 files changed:
tools/cmake/Makefile
tools/cmake/patches/010-backport-macos-fix.patch [new file with mode: 0644]
tools/cmake/patches/100-disable_qt_tests.patch
tools/cmake/patches/110-alpine_musl-compat.patch [new file with mode: 0644]
tools/cmake/patches/110-freebsd-compat.patch [deleted file]
tools/cmake/patches/120-alpine_musl-compat.patch [deleted file]
tools/cmake/patches/120-libarchive-fix-libressl-compat.patch [new file with mode: 0644]
tools/cmake/patches/130-curl-fix-libressl-linking.patch [new file with mode: 0644]
tools/cmake/patches/130-libarchive-fix-libressl-compat.patch [deleted file]
tools/cmake/patches/140-bootstrap_parallel_make_flag.patch [new file with mode: 0644]
tools/cmake/patches/140-curl-fix-libressl-linking.patch [deleted file]
tools/cmake/patches/150-bootstrap_parallel_make_flag.patch [deleted file]

index d6f03e42089264838c7cc202e42c8fe6294ab451..22e5d3e858ef797648dbe388d6a95e964e2f73d4 100644 (file)
@@ -7,12 +7,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cmake
-PKG_VERSION:=3.7.1
+PKG_VERSION:=3.9.3
+PKG_CPE_ID:=cpe:/a:kitware:cmake
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://cmake.org/files/v3.7/ \
+PKG_SOURCE_URL:=https://cmake.org/files/v3.9/ \
                https://fossies.org/linux/misc/
-PKG_HASH:=449a5bce64dbd4d5b9517ebd1a1248ed197add6ad27934478976fd5f1f9330e1
+PKG_HASH:=8eaf75e1e932159aae98ab5e7491499545554be62a08cbcbc7c75c84b999f28a
 
 HOST_BUILD_PARALLEL:=1
 HOST_CONFIGURE_PARALLEL:=1
diff --git a/tools/cmake/patches/010-backport-macos-fix.patch b/tools/cmake/patches/010-backport-macos-fix.patch
new file mode 100644 (file)
index 0000000..76e92dc
--- /dev/null
@@ -0,0 +1,15 @@
+--- a/Source/kwsys/kwsysPlatformTestsCXX.cxx
++++ b/Source/kwsys/kwsysPlatformTestsCXX.cxx
+@@ -265,6 +265,12 @@ int main()
+ #ifdef TEST_KWSYS_CXX_HAS_UTIMENSAT
+ #include <fcntl.h>
+ #include <sys/stat.h>
++#if defined(__APPLE__)
++#include <AvailabilityMacros.h>
++#if MAC_OS_X_VERSION_MIN_REQUIRED < 101300
++#error "utimensat not available on macOS < 10.13"
++#endif
++#endif
+ int main()
+ {
+   struct timespec times[2] = { { 0, UTIME_OMIT }, { 0, UTIME_NOW } };
index 6f28c435e018f53fedc3ba840298b6aaf8a07e9b..f8baafe3331bf91acf8c71fc1295ad1cbfcb298c 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Tests/RunCMake/CMakeLists.txt
 +++ b/Tests/RunCMake/CMakeLists.txt
-@@ -225,15 +225,6 @@ add_RunCMake_test(no_install_prefix)
+@@ -246,15 +246,6 @@ add_RunCMake_test(no_install_prefix)
  add_RunCMake_test(configure_file)
  add_RunCMake_test(CTestTimeoutAfterMatch)
  
@@ -18,7 +18,7 @@
    add_RunCMake_test(FindPkgConfig)
 --- a/Tests/CMakeLists.txt
 +++ b/Tests/CMakeLists.txt
-@@ -393,10 +393,6 @@ if(BUILD_TESTING)
+@@ -403,10 +403,6 @@ if(BUILD_TESTING)
  
    list(APPEND TEST_BUILD_DIRS ${CMake_TEST_INSTALL_PREFIX})
  
diff --git a/tools/cmake/patches/110-alpine_musl-compat.patch b/tools/cmake/patches/110-alpine_musl-compat.patch
new file mode 100644 (file)
index 0000000..ae93201
--- /dev/null
@@ -0,0 +1,17 @@
+--- a/Utilities/cmjsoncpp/include/json/assertions.h
++++ b/Utilities/cmjsoncpp/include/json/assertions.h
+@@ -6,12 +6,12 @@
+ #ifndef CPPTL_JSON_ASSERTIONS_H_INCLUDED
+ #define CPPTL_JSON_ASSERTIONS_H_INCLUDED
++#include <stdlib.h>
++
+ #if !defined(JSON_IS_AMALGAMATION)
+ #include "config.h"
+ #endif // if !defined(JSON_IS_AMALGAMATION)
+-#include <stdlib.h>
+-
+ #if JSON_USE_EXCEPTION
+ #include <stdexcept>
+ #define JSON_ASSERT(condition)                                                 \
diff --git a/tools/cmake/patches/110-freebsd-compat.patch b/tools/cmake/patches/110-freebsd-compat.patch
deleted file mode 100644 (file)
index c1d4a27..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-From 6eab64c3adc7a38c322cd4d9a1a1881f2d49cb9c Mon Sep 17 00:00:00 2001
-From: Raphael Kubo da Costa <rakuco@FreeBSD.org>
-Date: Tue, 15 Oct 2013 00:10:56 +0300
-Subject: [PATCH] SystemInformation: Include backtrace-related headers on
- FreeBSD
-
-This was probably broken for a long while, but the problem was not apparent
-because the check for execinfo.h would fail by default because
--I/usr/local/include was not being passed to the compiler when making the
-checks for the header's existence.
-
-Now that very recent FreeBSD versions (ie. 10-CURRENT) have NetBSD's
-libexecinfo in base (and it is thus installed into /usr), the
-backtrace-related checks would pass, but the required headers were not being
-included in SystemInformation.cxx.
-
-Change-Id: I3b91ed7ac0e6878035aee202b3336c536cc6d2ff
----
- Source/kwsys/SystemInformation.cxx |    9 +++++++++
- 1 file changed, 9 insertions(+)
-
---- a/Source/kwsys/SystemInformation.cxx
-+++ b/Source/kwsys/SystemInformation.cxx
-@@ -89,6 +89,15 @@ typedef int siginfo_t;
- #  include <ifaddrs.h>
- #  define KWSYS_SYSTEMINFORMATION_IMPLEMENT_FQDN
- # endif
-+# if defined(KWSYS_SYSTEMINFORMATION_HAS_BACKTRACE)
-+#  include <execinfo.h>
-+#  if defined(KWSYS_SYSTEMINFORMATION_HAS_CPP_DEMANGLE)
-+#    include <cxxabi.h>
-+#  endif
-+#  if defined(KWSYS_SYSTEMINFORMATION_HAS_SYMBOL_LOOKUP)
-+#    include <dlfcn.h>
-+#  endif
-+# endif
- #endif
- #if defined(KWSYS_SYS_HAS_MACHINE_CPU_H)
diff --git a/tools/cmake/patches/120-alpine_musl-compat.patch b/tools/cmake/patches/120-alpine_musl-compat.patch
deleted file mode 100644 (file)
index ae93201..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
---- a/Utilities/cmjsoncpp/include/json/assertions.h
-+++ b/Utilities/cmjsoncpp/include/json/assertions.h
-@@ -6,12 +6,12 @@
- #ifndef CPPTL_JSON_ASSERTIONS_H_INCLUDED
- #define CPPTL_JSON_ASSERTIONS_H_INCLUDED
-+#include <stdlib.h>
-+
- #if !defined(JSON_IS_AMALGAMATION)
- #include "config.h"
- #endif // if !defined(JSON_IS_AMALGAMATION)
--#include <stdlib.h>
--
- #if JSON_USE_EXCEPTION
- #include <stdexcept>
- #define JSON_ASSERT(condition)                                                 \
diff --git a/tools/cmake/patches/120-libarchive-fix-libressl-compat.patch b/tools/cmake/patches/120-libarchive-fix-libressl-compat.patch
new file mode 100644 (file)
index 0000000..a56ac2e
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/Utilities/cmlibarchive/libarchive/archive_openssl_evp_private.h
++++ b/Utilities/cmlibarchive/libarchive/archive_openssl_evp_private.h
+@@ -28,7 +28,7 @@
+ #include <openssl/evp.h>
+ #include <openssl/opensslv.h>
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ #include <stdlib.h> /* malloc, free */
+ #include <string.h> /* memset */
+ static inline EVP_MD_CTX *EVP_MD_CTX_new(void)
+--- a/Utilities/cmlibarchive/libarchive/archive_openssl_hmac_private.h
++++ b/Utilities/cmlibarchive/libarchive/archive_openssl_hmac_private.h
+@@ -28,7 +28,7 @@
+ #include <openssl/hmac.h>
+ #include <openssl/opensslv.h>
+-#if OPENSSL_VERSION_NUMBER < 0x10100000L
++#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+ #include <stdlib.h> /* malloc, free */
+ #include <string.h> /* memset */
+ static inline HMAC_CTX *HMAC_CTX_new(void)
diff --git a/tools/cmake/patches/130-curl-fix-libressl-linking.patch b/tools/cmake/patches/130-curl-fix-libressl-linking.patch
new file mode 100644 (file)
index 0000000..b5ee61b
--- /dev/null
@@ -0,0 +1,33 @@
+From: Jo-Philipp Wich <jo@mein.io>
+Date: Wed, 11 Jan 2017 03:36:04 +0100
+Subject: [PATCH] cmcurl: link librt
+
+When cmake is linked against LibreSSL, there might be an indirect
+dependency on librt on certain systems if LibreSSL's libcrypto uses
+clock_gettime() from librt:
+
+    [ 28%] Linking C executable LIBCURL
+    .../lib/libcrypto.a(getentropy_linux.o): In function `getentropy_fallback':
+    getentropy_linux.c:(.text+0x16d): undefined reference to `clock_gettime'
+    getentropy_linux.c:(.text+0x412): undefined reference to `clock_gettime'
+    collect2: error: ld returned 1 exit status
+    make[5]: *** [Utilities/cmcurl/LIBCURL] Error 1
+
+Modify the cmcurl CMakeLists.txt to check for clock_gettime() in librt
+and unconditionally link the rt library when the symbol is found.
+
+Signed-off-by: Jo-Philipp Wich <jo@mein.io>
+---
+--- a/Utilities/cmcurl/CMakeLists.txt
++++ b/Utilities/cmcurl/CMakeLists.txt
+@@ -456,6 +456,10 @@ if(CMAKE_USE_OPENSSL)
+   set(USE_OPENSSL ON)
+   set(HAVE_LIBCRYPTO ON)
+   set(HAVE_LIBSSL ON)
++  check_library_exists("rt" clock_gettime "" HAVE_LIBRT)
++  if(HAVE_LIBRT)
++    list(APPEND OPENSSL_LIBRARIES rt)
++  endif()
+   list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES})
+   include_directories(${OPENSSL_INCLUDE_DIR})
+   set(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
diff --git a/tools/cmake/patches/130-libarchive-fix-libressl-compat.patch b/tools/cmake/patches/130-libarchive-fix-libressl-compat.patch
deleted file mode 100644 (file)
index a56ac2e..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/Utilities/cmlibarchive/libarchive/archive_openssl_evp_private.h
-+++ b/Utilities/cmlibarchive/libarchive/archive_openssl_evp_private.h
-@@ -28,7 +28,7 @@
- #include <openssl/evp.h>
- #include <openssl/opensslv.h>
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- #include <stdlib.h> /* malloc, free */
- #include <string.h> /* memset */
- static inline EVP_MD_CTX *EVP_MD_CTX_new(void)
---- a/Utilities/cmlibarchive/libarchive/archive_openssl_hmac_private.h
-+++ b/Utilities/cmlibarchive/libarchive/archive_openssl_hmac_private.h
-@@ -28,7 +28,7 @@
- #include <openssl/hmac.h>
- #include <openssl/opensslv.h>
--#if OPENSSL_VERSION_NUMBER < 0x10100000L
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
- #include <stdlib.h> /* malloc, free */
- #include <string.h> /* memset */
- static inline HMAC_CTX *HMAC_CTX_new(void)
diff --git a/tools/cmake/patches/140-bootstrap_parallel_make_flag.patch b/tools/cmake/patches/140-bootstrap_parallel_make_flag.patch
new file mode 100644 (file)
index 0000000..734e8cb
--- /dev/null
@@ -0,0 +1,14 @@
+--- a/bootstrap
++++ b/bootstrap
+@@ -1094,7 +1094,10 @@ int main(){ printf("1%c", (char)0x0a); r
+ ' > "test.c"
+ cmake_original_make_flags="${cmake_make_flags}"
+ if [ "x${cmake_parallel_make}" != "x" ]; then
+-  cmake_make_flags="${cmake_make_flags} -j ${cmake_parallel_make}"
++  case "$cmake_paralle_make" in
++    [0-9]*) cmake_parallel_make="-j ${cmake_parallel_make}";;
++  esac
++  cmake_make_flags="${cmake_make_flags} ${cmake_parallel_make}"
+ fi
+ for a in ${cmake_make_processors}; do
+   if [ -z "${cmake_make_processor}" ] && cmake_try_make "${a}" "${cmake_make_flags}" >> ../cmake_bootstrap.log 2>&1; then
diff --git a/tools/cmake/patches/140-curl-fix-libressl-linking.patch b/tools/cmake/patches/140-curl-fix-libressl-linking.patch
deleted file mode 100644 (file)
index 5b57172..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-From: Jo-Philipp Wich <jo@mein.io>
-Date: Wed, 11 Jan 2017 03:36:04 +0100
-Subject: [PATCH] cmcurl: link librt
-
-When cmake is linked against LibreSSL, there might be an indirect
-dependency on librt on certain systems if LibreSSL's libcrypto uses
-clock_gettime() from librt:
-
-    [ 28%] Linking C executable LIBCURL
-    .../lib/libcrypto.a(getentropy_linux.o): In function `getentropy_fallback':
-    getentropy_linux.c:(.text+0x16d): undefined reference to `clock_gettime'
-    getentropy_linux.c:(.text+0x412): undefined reference to `clock_gettime'
-    collect2: error: ld returned 1 exit status
-    make[5]: *** [Utilities/cmcurl/LIBCURL] Error 1
-
-Modify the cmcurl CMakeLists.txt to check for clock_gettime() in librt
-and unconditionally link the rt library when the symbol is found.
-
-Signed-off-by: Jo-Philipp Wich <jo@mein.io>
---- a/Utilities/cmcurl/CMakeLists.txt
-+++ b/Utilities/cmcurl/CMakeLists.txt
-@@ -362,6 +362,10 @@ set(HAVE_LIBSSL OFF)
- if(CMAKE_USE_OPENSSL)
-   find_package(OpenSSL)
-   if(OPENSSL_FOUND)
-+    check_library_exists("rt" clock_gettime "" HAVE_LIBRT)
-+    if(HAVE_LIBRT)
-+      list(APPEND OPENSSL_LIBRARIES rt)
-+    endif()
-     list(APPEND CURL_LIBS ${OPENSSL_LIBRARIES})
-     set(USE_OPENSSL ON)
-     set(HAVE_LIBCRYPTO ON)
diff --git a/tools/cmake/patches/150-bootstrap_parallel_make_flag.patch b/tools/cmake/patches/150-bootstrap_parallel_make_flag.patch
deleted file mode 100644 (file)
index 6970b83..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/bootstrap
-+++ b/bootstrap
-@@ -958,7 +958,10 @@ int main(){ printf("1%c", (char)0x0a); r
- ' > "test.c"
- cmake_original_make_flags="${cmake_make_flags}"
- if [ "x${cmake_parallel_make}" != "x" ]; then
--  cmake_make_flags="${cmake_make_flags} -j ${cmake_parallel_make}"
-+  case "$cmake_paralle_make" in
-+    [0-9]*) cmake_parallel_make="-j ${cmake_parallel_make}";;
-+  esac
-+  cmake_make_flags="${cmake_make_flags} ${cmake_parallel_make}"
- fi
- for a in ${cmake_make_processors}; do
-   if [ -z "${cmake_make_processor}" ] && cmake_try_make "${a}" "${cmake_make_flags}" >> ../cmake_bootstrap.log 2>&1; then