qtlocation: fix darwin build

A dependency (boost) makes use of `std::auto_ptr`, which is no longer
supported in C++17 in Clang. This change re-enables `std::auto_ptr`
capabilities.
This commit is contained in:
Badi Abdul-Wahid 2018-03-12 02:04:28 -04:00
parent fb8a85f631
commit 833851cd6e
No known key found for this signature in database
GPG Key ID: 5C02A763FA1FF588

View File

@ -1,4 +1,4 @@
{ qtModule, qtbase, qtmultimedia }:
{ stdenv, qtModule, qtbase, qtmultimedia }:
qtModule {
name = "qtlocation";
@ -6,4 +6,11 @@ qtModule {
outputs = [ "bin" "out" "dev" ];
# Linking with -lclipper fails with parallel build enabled
enableParallelBuilding = false;
qmakeFlags = stdenv.lib.optional stdenv.isDarwin [
# boost uses std::auto_ptr which has been disabled in clang with libcxx
# This flag re-enables this feature
# https://libcxx.llvm.org/docs/UsingLibcxx.html#c-17-specific-configuration-macros
"QMAKE_CXXFLAGS+=-D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR"
];
}