Merge pull request #133601 from tobim/pkgs/cmake-3.21.1

cmake: 3.19.7 -> 3.21.1

authored by Dmitry Kalinkin and committed by GitHub 9528fbb4 599a7367

+115 -20
+12 -14
pkgs/development/tools/build-managers/cmake/application-services.patch
··· 1 1 diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt 2 - index 1b6bb00d4c..487114daa8 100644 2 + index 9a18184fd3..278d146dd1 100644 3 3 --- a/Source/CMakeLists.txt 4 4 +++ b/Source/CMakeLists.txt 5 - @@ -893,7 +893,6 @@ endif() 5 + @@ -933,7 +933,6 @@ endif() 6 6 # On Apple we need CoreFoundation and CoreServices 7 7 if(APPLE) 8 8 target_link_libraries(CMakeLib "-framework CoreFoundation") ··· 11 11 12 12 if(WIN32 AND NOT UNIX) 13 13 diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx 14 - index a5ce5d18f4..3d6838ce82 100644 14 + index 77403b076a..d5aac95e1e 100644 15 15 --- a/Source/cmGlobalXCodeGenerator.cxx 16 16 +++ b/Source/cmGlobalXCodeGenerator.cxx 17 - @@ -43,11 +43,10 @@ 18 - 19 - struct cmLinkImplementation; 17 + @@ -49,10 +49,6 @@ struct cmLinkImplementation; 20 18 21 19 #if !defined(CMAKE_BOOTSTRAP) && defined(__APPLE__) 22 - -# define HAVE_APPLICATION_SERVICES 23 - -# include <ApplicationServices/ApplicationServices.h> 24 - +# include <CoreFoundation/CoreFoundation.h> 20 + # include <CoreFoundation/CoreFoundation.h> 21 + -# if !TARGET_OS_IPHONE 22 + -# define HAVE_APPLICATION_SERVICES 23 + -# include <ApplicationServices/ApplicationServices.h> 24 + -# endif 25 25 #endif 26 - 26 + 27 27 #if !defined(CMAKE_BOOTSTRAP) 28 - # include "cmXMLParser.h" 29 - 30 28 diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt 31 - index bfcaf30bb7..1da540aee5 100644 29 + index 79452ffff6..a848731b7e 100644 32 30 --- a/Utilities/cmlibarchive/CMakeLists.txt 33 31 +++ b/Utilities/cmlibarchive/CMakeLists.txt 34 - @@ -2007,11 +2007,6 @@ IF(ENABLE_TEST) 32 + @@ -2013,11 +2013,6 @@ IF(ENABLE_TEST) 35 33 ENDIF(ENABLE_TEST) 36 34 ENDIF() 37 35
+8 -5
pkgs/development/tools/build-managers/cmake/default.nix
··· 2 2 , bzip2, curlMinimal, expat, libarchive, xz, zlib, libuv, rhash 3 3 , buildPackages 4 4 # darwin attributes 5 + , SystemConfiguration 5 6 , ps 6 7 , isBootstrap ? false 7 8 , useSharedLibraries ? (!isBootstrap && !stdenv.isCygwin) ··· 16 17 + lib.optionalString isBootstrap "-boot" 17 18 + lib.optionalString useNcurses "-cursesUI" 18 19 + lib.optionalString withQt5 "-qt5UI"; 19 - version = "3.19.7"; 20 + version = "3.21.1"; 20 21 21 22 src = fetchurl { 22 23 url = "https://cmake.org/files/v${lib.versions.majorMinor version}/cmake-${version}.tar.gz"; 23 - # compare with https://cmake.org/files/v${lib.versions.majorMinor version}/cmake-${version}-SHA-256.txt 24 - sha256 = "sha256-WKFfDVagr8zDzFNxI0/Oc/zGyPnb13XYmOUQuDF1WI4="; 24 + sha256 = "sha256-+sORUXHU3/JZE5ddcS925prvRL9zi6e5dnk6RYtM/tQ="; 25 25 }; 26 26 27 27 patches = [ ··· 34 34 # Derived from https://github.com/libuv/libuv/commit/1a5d4f08238dd532c3718e210078de1186a5920d 35 35 ./libuv-application-services.patch 36 36 37 - ] ++ lib.optional stdenv.isCygwin ./3.2.2-cygwin.patch; 37 + ] ++ lib.optional stdenv.isCygwin ./3.2.2-cygwin.patch 38 + # Derived from https://github.com/curl/curl/commit/31f631a142d855f069242f3e0c643beec25d1b51 39 + ++ lib.optional (stdenv.isDarwin && isBootstrap) ./remove-systemconfiguration-dep.patch; 38 40 39 41 outputs = [ "out" ] 40 42 ++ lib.optionals buildDocs [ "man" "info" ]; ··· 51 53 buildInputs = lib.optionals useSharedLibraries [ bzip2 curlMinimal expat libarchive xz zlib libuv rhash ] 52 54 ++ lib.optional useOpenSSL openssl 53 55 ++ lib.optional useNcurses ncurses 54 - ++ lib.optional withQt5 qtbase; 56 + ++ lib.optional withQt5 qtbase 57 + ++ lib.optional (stdenv.isDarwin && !isBootstrap) SystemConfiguration; 55 58 56 59 propagatedBuildInputs = lib.optional stdenv.isDarwin ps; 57 60
+89
pkgs/development/tools/build-managers/cmake/remove-systemconfiguration-dep.patch
··· 1 + From 76523ca5b2227085bb65253900e866b08a2b5efb Mon Sep 17 00:00:00 2001 2 + From: Tobias Mayer <tobim@fastmail.fm> 3 + Date: Fri, 30 Jul 2021 10:50:16 +0200 4 + Subject: [PATCH] Disable NAT64 address synthesis on darwin 5 + 6 + This intentionally breaks the feature by partially reverting 7 + https://github.com/curl/curl/commit/31f631a142d855f069242f3e0c643beec25d1b51 8 + 9 + This is a stop-gap to get CMake to build without the SystemConfiguration 10 + framework. 11 + --- 12 + Utilities/cmcurl/CMakeLists.txt | 8 -------- 13 + Utilities/cmcurl/lib/curl_setup.h | 4 ---- 14 + Utilities/cmcurl/lib/hostip.c | 17 ----------------- 15 + 3 files changed, 29 deletions(-) 16 + 17 + diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt 18 + index 16ef037ccc..17564bbb69 100644 19 + --- a/Utilities/cmcurl/CMakeLists.txt 20 + +++ b/Utilities/cmcurl/CMakeLists.txt 21 + @@ -511,14 +511,6 @@ if(CMAKE_USE_SECTRANSP) 22 + list(APPEND CURL_LIBS "${COREFOUNDATION_FRAMEWORK}" "${SECURITY_FRAMEWORK}") 23 + endif() 24 + 25 + -if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") 26 + - find_library(SYSTEMCONFIGURATION_FRAMEWORK "SystemConfiguration") 27 + - if(NOT SYSTEMCONFIGURATION_FRAMEWORK) 28 + - message(FATAL_ERROR "SystemConfiguration framework not found") 29 + - endif() 30 + - list(APPEND CURL_LIBS "${SYSTEMCONFIGURATION_FRAMEWORK}") 31 + -endif() 32 + - 33 + if(CMAKE_USE_OPENSSL) 34 + find_package(OpenSSL) 35 + if(NOT OpenSSL_FOUND) 36 + diff --git a/Utilities/cmcurl/lib/curl_setup.h b/Utilities/cmcurl/lib/curl_setup.h 37 + index 2d13a40a55..35160bc0f5 100644 38 + --- a/Utilities/cmcurl/lib/curl_setup.h 39 + +++ b/Utilities/cmcurl/lib/curl_setup.h 40 + @@ -251,11 +251,7 @@ 41 + * performing this task will result in a synthesized IPv6 address. 42 + */ 43 + #if defined(__APPLE__) && !defined(USE_ARES) 44 + -#include <TargetConditionals.h> 45 + #define USE_RESOLVE_ON_IPS 1 46 + -# if defined(TARGET_OS_OSX) && TARGET_OS_OSX 47 + -# define CURL_OSX_CALL_COPYPROXIES 1 48 + -# endif 49 + #endif 50 + 51 + #ifdef USE_LWIPSOCK 52 + diff --git a/Utilities/cmcurl/lib/hostip.c b/Utilities/cmcurl/lib/hostip.c 53 + index e0e3cfc2cb..45190a100b 100644 54 + --- a/Utilities/cmcurl/lib/hostip.c 55 + +++ b/Utilities/cmcurl/lib/hostip.c 56 + @@ -68,10 +68,6 @@ 57 + #include "curl_memory.h" 58 + #include "memdebug.h" 59 + 60 + -#if defined(ENABLE_IPV6) && defined(CURL_OSX_CALL_COPYPROXIES) 61 + -#include <SystemConfiguration/SCDynamicStoreCopySpecific.h> 62 + -#endif 63 + - 64 + #if defined(CURLRES_SYNCH) && \ 65 + defined(HAVE_ALARM) && defined(SIGALRM) && defined(HAVE_SIGSETJMP) 66 + /* alarm-based timeouts can only be used with all the dependencies satisfied */ 67 + @@ -533,19 +529,6 @@ enum resolve_t Curl_resolv(struct Curl_easy *data, 68 + return CURLRESOLV_ERROR; 69 + } 70 + 71 + -#if defined(ENABLE_IPV6) && defined(CURL_OSX_CALL_COPYPROXIES) 72 + - /* 73 + - * The automagic conversion from IPv4 literals to IPv6 literals only works 74 + - * if the SCDynamicStoreCopyProxies system function gets called first. As 75 + - * Curl currently doesn't support system-wide HTTP proxies, we therefore 76 + - * don't use any value this function might return. 77 + - * 78 + - * This function is only available on a macOS and is not needed for 79 + - * IPv4-only builds, hence the conditions above. 80 + - */ 81 + - SCDynamicStoreCopyProxies(NULL); 82 + -#endif 83 + - 84 + #ifndef USE_RESOLVE_ON_IPS 85 + /* First check if this is an IPv4 address string */ 86 + if(Curl_inet_pton(AF_INET, hostname, &in) > 0) 87 + -- 88 + 2.32.0 89 +
+6 -1
pkgs/top-level/all-packages.nix
··· 13514 13514 13515 13515 cmake_2_8 = callPackage ../development/tools/build-managers/cmake/2.8.nix { }; 13516 13516 13517 - cmake = libsForQt5.callPackage ../development/tools/build-managers/cmake { }; 13517 + cmake = libsForQt5.callPackage ../development/tools/build-managers/cmake { 13518 + inherit (darwin.apple_sdk.frameworks) SystemConfiguration; 13519 + }; 13518 13520 13519 13521 cmakeMinimal = libsForQt5.callPackage ../development/tools/build-managers/cmake { 13520 13522 isBootstrap = true; 13523 + # There is no SystemConfiguration in bootstrapTools, so this version gets 13524 + # patched to remove that dependency. 13525 + SystemConfiguration = null; 13521 13526 }; 13522 13527 13523 13528 cmakeCurses = cmake.override { useNcurses = true; };