Merge remote-tracking branch 'upstream/staging' into strictDeps
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
{ stdenv, fetchurl, fetchpatch, replace, curl, expat, zlib, bzip2
|
||||
, useNcurses ? false, ncurses, useQt4 ? false, qt4, wantPS ? false, ps ? null
|
||||
, useNcurses ? false, ncurses, useQt4 ? false, qt4, ps
|
||||
, buildPlatform, hostPlatform
|
||||
}:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
assert wantPS -> (ps != null);
|
||||
assert stdenv ? cc;
|
||||
assert stdenv.cc ? libc;
|
||||
|
||||
@@ -29,25 +28,30 @@ stdenv.mkDerivation rec {
|
||||
enableParallelBuilding = true;
|
||||
|
||||
patches =
|
||||
[(fetchpatch { # see http://www.cmake.org/Bug/view.php?id=13959
|
||||
[(fetchpatch { # see https://www.cmake.org/Bug/view.php?id=13959
|
||||
name = "FindFreetype-2.5.patch";
|
||||
url = "http://www.cmake.org/Bug/file_download.php?file_id=4660&type=bug";
|
||||
url = "https://www.cmake.org/Bug/file_download.php?file_id=4660&type=bug";
|
||||
sha256 = "136z63ff83hnwd247cq4m8m8164pklzyl5i2csf5h6wd8p01pdkj";
|
||||
})] ++
|
||||
# Don't search in non-Nix locations such as /usr, but do search in our libc.
|
||||
[ ./search-path.patch ] ++
|
||||
optional (hostPlatform != buildPlatform) (fetchurl {
|
||||
name = "fix-darwin-cross-compile.patch";
|
||||
url = "http://public.kitware.com/Bug/file_download.php?"
|
||||
url = "https://public.kitware.com/Bug/file_download.php?"
|
||||
+ "file_id=4981&type=bug";
|
||||
sha256 = "16acmdr27adma7gs9rs0dxdiqppm15vl3vv3agy7y8s94wyh4ybv";
|
||||
});
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace Utilities/cmlibarchive/CMakeLists.txt \
|
||||
--replace '"-framework CoreServices"' '""'
|
||||
'';
|
||||
|
||||
buildInputs = [ curl expat zlib bzip2 ]
|
||||
++ optional useNcurses ncurses
|
||||
++ optional useQt4 qt4;
|
||||
|
||||
propagatedBuildInputs = optional wantPS ps;
|
||||
propagatedBuildInputs = [ ps ];
|
||||
|
||||
CMAKE_PREFIX_PATH = concatStringsSep ":"
|
||||
(concatMap (p: [ (p.dev or p) (p.out or p) ]) buildInputs);
|
||||
@@ -74,9 +78,9 @@ stdenv.mkDerivation rec {
|
||||
'';
|
||||
|
||||
meta = {
|
||||
homepage = http://www.cmake.org/;
|
||||
homepage = https://cmake.org;
|
||||
description = "Cross-Platform Makefile Generator";
|
||||
platforms = if useQt4 then qt4.meta.platforms else stdenv.lib.platforms.linux;
|
||||
platforms = if useQt4 then qt4.meta.platforms else stdenv.lib.platforms.unix;
|
||||
maintainers = with stdenv.lib.maintainers; [ ];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -105,6 +105,7 @@ stdenv.mkDerivation rec {
|
||||
# CMAKE_SYSTEM_NAME, etc.
|
||||
configurePlatforms = [ ];
|
||||
|
||||
doCheck = false; # fails
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://www.cmake.org/;
|
||||
|
||||
@@ -41,6 +41,20 @@ cmakeConfigurePhase() {
|
||||
cmakeFlags="-DCMAKE_RANLIB=$(command -v $RANLAB) $cmakeFlags"
|
||||
cmakeFlags="-DCMAKE_STRIP=$(command -v $STRIP) $cmakeFlags"
|
||||
|
||||
# on macOS we want to prefer Unix-style headers to Frameworks
|
||||
# because we usually do not package the framework
|
||||
cmakeFlags="-DCMAKE_FIND_FRAMEWORK=last $cmakeFlags"
|
||||
|
||||
# we never want to use the global macOS SDK
|
||||
cmakeFlags="-DCMAKE_OSX_SYSROOT= $cmakeFlags"
|
||||
|
||||
# disable OSX deployment target
|
||||
# we don't want our binaries to have a "minimum" OSX version
|
||||
cmakeFlags="-DCMAKE_OSX_DEPLOYMENT_TARGET= $cmakeFlags"
|
||||
|
||||
# correctly detect our clang compiler
|
||||
cmakeFlags="-DCMAKE_POLICY_DEFAULT_CMP0025=NEW $cmakeFlags"
|
||||
|
||||
# This installs shared libraries with a fully-specified install
|
||||
# name. By default, cmake installs shared libraries with just the
|
||||
# basename as the install name, which means that, on Darwin, they
|
||||
|
||||
Reference in New Issue
Block a user