Merge #44910: cmake: 3.11.2 -> 3.12.1

This commit is contained in:
Vladimír Čunát 2018-08-30 16:04:52 +02:00
commit b71b222b4c
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
8 changed files with 132 additions and 162 deletions

View File

@ -36,8 +36,7 @@ stdenv.mkDerivation rec {
++ optional (ngspiceSupport) "-DKICAD_SPICE=ON";
nativeBuildInputs = [
# https://www.mail-archive.com/kicad-developers@lists.launchpad.net/msg29840.html
(cmake.override {majorVersion = "3.10";})
cmake
doxygen
pkgconfig
wrapGAppsHook

View File

@ -38,8 +38,7 @@ stdenv.mkDerivation rec {
"-DCMAKE_CXX_FLAGS=-I${wxPython}/include/wx-3.0"
];
# https://www.mail-archive.com/kicad-developers@lists.launchpad.net/msg29840.html
nativeBuildInputs = [ (cmake.override {majorVersion = "3.10";}) doxygen pkgconfig ];
nativeBuildInputs = [ cmake doxygen pkgconfig ];
buildInputs = [
libGLU_combined zlib libX11 wxGTK pcre libXdmcp gettext glew glm libpthreadstubs
cairo curl openssl boost

View File

@ -1,16 +1,15 @@
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 2008a0b..5a3e8ee 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
diff -ur cmake-3.12.1/Source/cmGlobalXCodeGenerator.cxx cmake-3.12.1-patched/Source/cmGlobalXCodeGenerator.cxx
--- cmake-3.12.1/Source/cmGlobalXCodeGenerator.cxx 2018-08-09 21:14:08.000000000 +0900
+++ cmake-3.12.1-patched/Source/cmGlobalXCodeGenerator.cxx 2018-08-12 02:47:28.719691934 +0900
@@ -35,11 +35,6 @@
struct cmLinkImplementation;
-#if defined(CMAKE_BUILD_WITH_CMAKE) && defined(__APPLE__)
-#define HAVE_APPLICATION_SERVICES
-#include <ApplicationServices/ApplicationServices.h>
-# define HAVE_APPLICATION_SERVICES
-# include <ApplicationServices/ApplicationServices.h>
-#endif
-
#if defined(CMAKE_BUILD_WITH_CMAKE)
#include "cmXMLParser.h"
# include "cmXMLParser.h"

View File

@ -1,6 +1,5 @@
{ stdenv, fetchurl, fetchpatch, pkgconfig
, bzip2, curl, expat, libarchive, xz, zlib, libuv, rhash
, majorVersion ? "3.11"
# darwin attributes
, ps
, isBootstrap ? false
@ -15,27 +14,12 @@ assert useQt4 -> withQt5 == false;
with stdenv.lib;
with (
{
"3.11" = {
minorVersion = "2";
sha256 = "0j2jpx94lnqx5w59i9xihl56hf6ghk04438rqhh7lk1bryxj5g2y";
};
"3.10" = {
minorVersion = "2";
sha256 = "80d0faad4ab56de07aa21a7fc692c88c4ce6156d42b0579c6962004a70a3218b";
};
"3.9" = {
minorVersion = "6";
sha256 = "7410851a783a41b521214ad987bb534a7e4a65e059651a2514e6ebfc8f46b218";
};
}.${majorVersion}
or (abort ''Unsupported configuration for cmake: majorVersion = "${majorVersion}";'')
);
let
os = stdenv.lib.optionalString;
majorVersion = "3.12";
minorVersion = "1";
# from https://cmake.org/files/v3.12/cmake-3.12.1-SHA-256.txt
sha256 = "1ckswlaid3p2is1a80fmr4hgwpfsiif66giyx1z9ayhxx0n5qgf5";
version = "${majorVersion}.${minorVersion}";
in
@ -46,7 +30,6 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "${meta.homepage}files/v${majorVersion}/cmake-${version}.tar.gz";
# from https://cmake.org/files/v3.10/cmake-3.10.2-SHA-256.txt
inherit sha256;
};
@ -55,16 +38,16 @@ stdenv.mkDerivation rec {
--replace '"-framework CoreServices"' '""'
'';
# Don't search in non-Nix locations such as /usr, but do search in our libc.
patches = [ ./search-path-3.9.patch ]
++ optional (versionOlder version "3.12") (fetchpatch {
name = "cmake-3.11-libuv-1.21.patch";
url = https://gitlab.kitware.com/cmake/cmake/commit/889033b5c6847cf1f7bd789384405d59dc333bf6.patch;
sha256 = "0683zbyb3bicaxqzrj4wgdan6x08k30m20kkmpjvw30nr6a8r6xq";
})
patches = [
# Don't search in non-Nix locations such as /usr, but do search in our libc.
./search-path.patch
# Don't depend on frameworks.
++ optional (useSharedLibraries && majorVersion == "3.11") ./application-services.patch # TODO: remove conditional
++ optional stdenv.isCygwin ./3.2.2-cygwin.patch;
./application-services.patch
# Derived from https://github.com/libuv/libuv/commit/1a5d4f08238dd532c3718e210078de1186a5920d
./libuv-application-services.patch
] ++ optional stdenv.isCygwin ./3.2.2-cygwin.patch;
outputs = [ "out" ];
setOutputFlags = false;

View File

@ -0,0 +1,83 @@
diff -ur cmake-3.12.1/Utilities/cmlibuv/CMakeLists.txt cmake-3.12.1-patched/Utilities/cmlibuv/CMakeLists.txt
--- cmake-3.12.1/Utilities/cmlibuv/CMakeLists.txt 2018-08-09 21:14:08.000000000 +0900
+++ cmake-3.12.1-patched/Utilities/cmlibuv/CMakeLists.txt 2018-08-13 10:14:53.000000000 +0900
@@ -173,6 +173,22 @@
src/unix/kqueue.c
src/unix/proctitle.c
)
+
+ include(CheckIncludeFile)
+
+ check_include_file("ApplicationServices/ApplicationServices.h" HAVE_ApplicationServices)
+ if (HAVE_ApplicationServices)
+ list(APPEND uv_defines
+ HAVE_APPLICATIONSERVICES_APPLICATIONSERVICES_H=1
+ )
+ endif()
+
+ check_include_file("CoreServices/CoreServices.h" HAVE_CoreServices)
+ if (HAVE_CoreServices)
+ list(APPEND uv_defines
+ HAVE_CORESERVICES_CORESERVICES_H=1
+ )
+ endif()
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
diff -ur cmake-3.12.1/Utilities/cmlibuv/src/unix/darwin-proctitle.c cmake-3.12.1-patched/Utilities/cmlibuv/src/unix/darwin-proctitle.c
--- cmake-3.12.1/Utilities/cmlibuv/src/unix/darwin-proctitle.c 2018-08-09 21:14:08.000000000 +0900
+++ cmake-3.12.1-patched/Utilities/cmlibuv/src/unix/darwin-proctitle.c 2018-08-13 10:01:29.000000000 +0900
@@ -26,9 +26,7 @@
#include <stdlib.h>
#include <string.h>
-#include <TargetConditionals.h>
-
-#if !TARGET_OS_IPHONE
+#if HAVE_APPLICATIONSERVICES_APPLICATIONSERVICES_H
# include <CoreFoundation/CoreFoundation.h>
# include <ApplicationServices/ApplicationServices.h>
#endif
@@ -58,7 +56,7 @@
int uv__set_process_title(const char* title) {
-#if TARGET_OS_IPHONE
+#if !HAVE_APPLICATIONSERVICES_APPLICATIONSERVICES_H
return uv__pthread_setname_np(title);
#else
CFStringRef (*pCFStringCreateWithCString)(CFAllocatorRef,
@@ -205,5 +203,5 @@
dlclose(application_services_handle);
return err;
-#endif /* !TARGET_OS_IPHONE */
+#endif /* HAVE_APPLICATIONSERVICES_APPLICATIONSERVICES_H */
}
diff -ur cmake-3.12.1/Utilities/cmlibuv/src/unix/fsevents.c cmake-3.12.1-patched/Utilities/cmlibuv/src/unix/fsevents.c
--- cmake-3.12.1/Utilities/cmlibuv/src/unix/fsevents.c 2018-08-09 21:14:08.000000000 +0900
+++ cmake-3.12.1-patched/Utilities/cmlibuv/src/unix/fsevents.c 2018-08-13 10:01:29.000000000 +0900
@@ -21,7 +21,7 @@
#include "uv.h"
#include "internal.h"
-#if TARGET_OS_IPHONE
+#if !HAVE_CORESERVICES_CORESERVICES_H
/* iOS (currently) doesn't provide the FSEvents-API (nor CoreServices) */
@@ -38,7 +38,7 @@
void uv__fsevents_loop_delete(uv_loop_t* loop) {
}
-#else /* TARGET_OS_IPHONE */
+#else /* !HAVE_CORESERVICES_CORESERVICES_H */
#include <dlfcn.h>
#include <assert.h>
@@ -916,4 +916,4 @@
return 0;
}
-#endif /* TARGET_OS_IPHONE */
+#endif /* !HAVE_CORESERVICES_CORESERVICES_H */

View File

@ -1,62 +0,0 @@
diff -ur cmake-3.9.1/Modules/Platform/UnixPaths.cmake cmake-3.9.1-mod/Modules/Platform/UnixPaths.cmake
--- cmake-3.9.1/Modules/Platform/UnixPaths.cmake 2017-08-10 13:36:32.000000000 +0000
+++ cmake-3.9.1-mod/Modules/Platform/UnixPaths.cmake 2017-09-03 01:24:31.901473539 +0000
@@ -22,9 +22,6 @@
# List common installation prefixes. These will be used for all
# search types.
list(APPEND CMAKE_SYSTEM_PREFIX_PATH
- # Standard
- /usr/local /usr /
-
# CMake install location
"${_CMAKE_INSTALL_DIR}"
)
@@ -43,31 +40,26 @@
# Non "standard" but common install prefixes
list(APPEND CMAKE_SYSTEM_PREFIX_PATH
- /usr/X11R6
- /usr/pkg
- /opt
)
# List common include file locations not under the common prefixes.
list(APPEND CMAKE_SYSTEM_INCLUDE_PATH
- # X11
- /usr/include/X11
+ @libc_dev@/include
)
list(APPEND CMAKE_SYSTEM_LIBRARY_PATH
- # X11
- /usr/lib/X11
+ @libc_lib@/lib
)
list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
- /lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64
+ @libc_lib@/lib
)
list(APPEND CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES
- /usr/include
+ @libc_dev@/include
)
list(APPEND CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES
- /usr/include
+ @libc_dev@/include
)
# Enable use of lib32 and lib64 search path variants by default.
diff -ur cmake-3.9.1/Modules/Platform/WindowsPaths.cmake cmake-3.9.1-mod/Modules/Platform/WindowsPaths.cmake
--- cmake-3.9.1/Modules/Platform/WindowsPaths.cmake 2017-08-10 13:36:32.000000000 +0000
+++ cmake-3.9.1-mod/Modules/Platform/WindowsPaths.cmake 2017-09-03 01:19:32.808355986 +0000
@@ -66,7 +66,7 @@
if(CMAKE_CROSSCOMPILING AND NOT CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
# MinGW (useful when cross compiling from linux with CMAKE_FIND_ROOT_PATH set)
- list(APPEND CMAKE_SYSTEM_PREFIX_PATH /)
+ # list(APPEND CMAKE_SYSTEM_PREFIX_PATH /)
endif()
list(APPEND CMAKE_SYSTEM_INCLUDE_PATH

View File

@ -1,35 +1,7 @@
diff -ru3 cmake-2.8.12.2/Modules/Platform/Linux.cmake cmake-2.8.12.2-new/Modules/Platform/Linux.cmake
--- cmake-2.8.12.2/Modules/Platform/Linux.cmake 2014-01-16 21:15:08.000000000 +0400
+++ cmake-2.8.12.2-new/Modules/Platform/Linux.cmake 2016-04-13 22:00:32.928575740 +0300
@@ -36,22 +36,11 @@
# checking the platform every time. This option is advanced enough
# that only package maintainers should need to adjust it. They are
# capable of providing a setting on the command line.
- if(EXISTS "/etc/debian_version")
- set(CMAKE_INSTALL_SO_NO_EXE 1 CACHE INTERNAL
- "Install .so files without execute permission.")
- else()
- set(CMAKE_INSTALL_SO_NO_EXE 0 CACHE INTERNAL
- "Install .so files without execute permission.")
- endif()
+ set(CMAKE_INSTALL_SO_NO_EXE 0 CACHE INTERNAL
+ "Install .so files without execute permission.")
endif()
# Match multiarch library directory names.
set(CMAKE_LIBRARY_ARCHITECTURE_REGEX "[a-z0-9_]+(-[a-z0-9_]+)?-linux-gnu[a-z0-9_]*")
include(Platform/UnixPaths)
-
-# Debian has lib64 paths only for compatibility so they should not be
-# searched.
-if(EXISTS "/etc/debian_version")
- set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS FALSE)
-endif()
diff -ru3 cmake-2.8.12.2/Modules/Platform/UnixPaths.cmake cmake-2.8.12.2-new/Modules/Platform/UnixPaths.cmake
--- cmake-2.8.12.2/Modules/Platform/UnixPaths.cmake 2014-01-16 21:15:08.000000000 +0400
+++ cmake-2.8.12.2-new/Modules/Platform/UnixPaths.cmake 2016-04-14 00:09:10.106362636 +0300
@@ -32,9 +32,6 @@
diff -ur cmake-3.9.1/Modules/Platform/UnixPaths.cmake cmake-3.9.1-mod/Modules/Platform/UnixPaths.cmake
--- cmake-3.9.1/Modules/Platform/UnixPaths.cmake 2017-08-10 13:36:32.000000000 +0000
+++ cmake-3.9.1-mod/Modules/Platform/UnixPaths.cmake 2017-09-03 01:24:31.901473539 +0000
@@ -22,9 +22,6 @@
# List common installation prefixes. These will be used for all
# search types.
list(APPEND CMAKE_SYSTEM_PREFIX_PATH
@ -38,45 +10,31 @@ diff -ru3 cmake-2.8.12.2/Modules/Platform/UnixPaths.cmake cmake-2.8.12.2-new/Mod
-
# CMake install location
"${_CMAKE_INSTALL_DIR}"
)
@@ -43,31 +40,26 @@
@@ -44,44 +41,26 @@
# Non "standard" but common install prefixes
list(APPEND CMAKE_SYSTEM_PREFIX_PATH
- /usr/X11R6
- /usr/pkg
- /opt
)
# List common include file locations not under the common prefixes.
list(APPEND CMAKE_SYSTEM_INCLUDE_PATH
- # Windows API on Cygwin
- /usr/include/w32api
-
- # X11
- /usr/X11R6/include /usr/include/X11
-
- # Other
- /usr/pkg/include
- /opt/csw/include /opt/include
- /usr/openwin/include
- /usr/include/X11
+ @libc_dev@/include
)
list(APPEND CMAKE_SYSTEM_LIBRARY_PATH
- # Windows API on Cygwin
- /usr/lib/w32api
-
- # X11
- /usr/X11R6/lib /usr/lib/X11
-
- # Other
- /usr/pkg/lib
- /opt/csw/lib /opt/lib
- /usr/openwin/lib
- /usr/lib/X11
+ @libc_lib@/lib
)
list(APPEND CMAKE_SYSTEM_PROGRAM_PATH
- /usr/pkg/bin
+ @libc_bin@/bin
)
list(APPEND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES
- /lib /usr/lib /usr/lib32 /usr/lib64
- /lib /lib32 /lib64 /usr/lib /usr/lib32 /usr/lib64
+ @libc_lib@/lib
)
@ -89,4 +47,16 @@ diff -ru3 cmake-2.8.12.2/Modules/Platform/UnixPaths.cmake cmake-2.8.12.2-new/Mod
+ @libc_dev@/include
)
# Enable use of lib64 search path variants by default.
# Enable use of lib32 and lib64 search path variants by default.
diff -ur cmake-3.9.1/Modules/Platform/WindowsPaths.cmake cmake-3.9.1-mod/Modules/Platform/WindowsPaths.cmake
--- cmake-3.9.1/Modules/Platform/WindowsPaths.cmake 2017-08-10 13:36:32.000000000 +0000
+++ cmake-3.9.1-mod/Modules/Platform/WindowsPaths.cmake 2017-09-03 01:19:32.808355986 +0000
@@ -66,7 +66,7 @@
if(CMAKE_CROSSCOMPILING AND NOT CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
# MinGW (useful when cross compiling from linux with CMAKE_FIND_ROOT_PATH set)
- list(APPEND CMAKE_SYSTEM_PREFIX_PATH /)
+ # list(APPEND CMAKE_SYSTEM_PREFIX_PATH /)
endif()
list(APPEND CMAKE_SYSTEM_INCLUDE_PATH

View File

@ -190,7 +190,6 @@ in rec {
stage1 = prevStage: let
persistent = self: super: with prevStage; {
cmake = super.cmake.override {
majorVersion = "3.9"; # FIXME: update ApplicationServices patch
isBootstrap = true;
useSharedLibraries = false;
};