Merge #35420: glm: fix gcc 7 support

This commit is contained in:
Vladimír Čunát 2018-02-27 00:05:33 +01:00
commit 8be317ab83
No known key found for this signature in database
GPG key ID: E747DF1F9575A3AA
2 changed files with 9 additions and 4 deletions

View file

@ -1,4 +1,4 @@
{ stdenv, fetchzip, cmake }:
{ stdenv, fetchurl, fetchzip, cmake }:
stdenv.mkDerivation rec {
version = "0.9.8.5";
@ -15,9 +15,16 @@ stdenv.mkDerivation rec {
cmakeConfigureFlags = [ "-DGLM_INSTALL_ENABLE=off" ];
# fetch newer version of platform.h which correctly supports gcc 7.3
gcc7PlatformPatch = fetchurl {
url = "https://raw.githubusercontent.com/g-truc/glm/dd48b56e44d699a022c69155c8672caacafd9e8a/glm/simd/platform.h";
sha256 = "0y91hlbgn5va7ijg5mz823gqkq9hqxl00lwmdwnf8q2g086rplzw";
};
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace '"''${CMAKE_CURRENT_BINARY_DIR}/''${GLM_INSTALL_CONFIGDIR}' '"''${GLM_INSTALL_CONFIGDIR}'
cp ${gcc7PlatformPatch} glm/simd/platform.h
'';
postInstall = ''

View file

@ -8887,9 +8887,7 @@ with pkgs;
glibc32 = pkgsi686Linux.glibc;
};
glm = callPackage ../development/libraries/glm
(lib.optionalAttrs stdenv.cc.isGNU { stdenv = overrideCC stdenv gcc6;/*maybe a hack*/ });
glm = callPackage ../development/libraries/glm { };
glm_0954 = callPackage ../development/libraries/glm/0954.nix { };
globalplatform = callPackage ../development/libraries/globalplatform { };