From 9ab77680b6a56304f04d5c5266663d7c622d5491 Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Sat, 6 Jan 2018 00:02:21 +0100 Subject: [PATCH] bullet: fix build on aarch64 --- pkgs/development/libraries/bullet/default.nix | 2 ++ .../libraries/bullet/gwen-narrowing.patch | 22 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 pkgs/development/libraries/bullet/gwen-narrowing.patch diff --git a/pkgs/development/libraries/bullet/default.nix b/pkgs/development/libraries/bullet/default.nix index 004911010979..39a5a9869ba7 100644 --- a/pkgs/development/libraries/bullet/default.nix +++ b/pkgs/development/libraries/bullet/default.nix @@ -16,6 +16,8 @@ stdenv.mkDerivation rec { then with darwin.apple_sdk.frameworks; [ Cocoa OpenGL ] else [mesa freeglut]); + patches = [ ./gwen-narrowing.patch ]; + postPatch = stdenv.lib.optionalString stdenv.isDarwin '' sed -i 's/FIND_PACKAGE(OpenGL)//' CMakeLists.txt sed -i 's/FIND_LIBRARY(COCOA_LIBRARY Cocoa)//' CMakeLists.txt diff --git a/pkgs/development/libraries/bullet/gwen-narrowing.patch b/pkgs/development/libraries/bullet/gwen-narrowing.patch new file mode 100644 index 000000000000..c6c06325dae0 --- /dev/null +++ b/pkgs/development/libraries/bullet/gwen-narrowing.patch @@ -0,0 +1,22 @@ +commit a5d3497577c78b03c05c69d17df972fa9fb54f53 +Author: Linus Heckemann +Date: Fri Jan 5 23:57:09 2018 +0100 + + Add -Wno-narrowing to GWEN's CMakeLists + + This avoids the compilation issue that occurs on aarch64 with gcc6. + (nixpkgs-specific patch) + +diff --git a/examples/ThirdPartyLibs/Gwen/CMakeLists.txt b/examples/ThirdPartyLibs/Gwen/CMakeLists.txt +index 82fa0ffba..26c4bbd37 100644 +--- a/examples/ThirdPartyLibs/Gwen/CMakeLists.txt ++++ b/examples/ThirdPartyLibs/Gwen/CMakeLists.txt +@@ -15,7 +15,7 @@ IF(NOT WIN32 AND NOT APPLE) + ADD_DEFINITIONS("-DDYNAMIC_LOAD_X11_FUNCTIONS=1") + ENDIF() + +-ADD_DEFINITIONS( -DGLEW_STATIC -DGWEN_COMPILE_STATIC -D_HAS_EXCEPTIONS=0 -D_STATIC_CPPLIB ) ++ADD_DEFINITIONS( -DGLEW_STATIC -DGWEN_COMPILE_STATIC -D_HAS_EXCEPTIONS=0 -D_STATIC_CPPLIB -Wno-narrowing ) + + FILE(GLOB gwen_SRCS "*.cpp" "Controls/*.cpp" "Controls/Dialog/*.cpp" "Controls/Dialogs/*.cpp" "Controls/Layout/*.cpp" "Controls/Property/*.cpp" "Input/*.cpp" "Platforms/*.cpp" "Renderers/*.cpp" "Skins/*.cpp") + FILE(GLOB gwen_HDRS "*.h" "Controls/*.h" "Controls/Dialog/*.h" "Controls/Dialogs/*.h" "Controls/Layout/*.h" "Controls/Property/*.h" "Input/*.h" "Platforms/*.h" "Renderers/*.h" "Skins/*.h")