mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 15:33:13 +00:00
wv2: fix build with clang 16 and on Darwin
- Set the language version to C++14, so Synfig Studio can continue using the deprecated APIs; and - Explicitly link gobject-2.0 on Darwin to avoid missing symbol errors when linking.
This commit is contained in:
parent
ce5160509e
commit
7ce464459d
@ -10,6 +10,15 @@ stdenv.mkDerivation rec {
|
||||
|
||||
patches = [ ./fix-include.patch ];
|
||||
|
||||
# Newer versions of clang default to C++17, which removes some deprecated APIs such as bind1st.
|
||||
# Setting the language version to C++14 makes them available again.
|
||||
cmakeFlags = lib.optionals stdenv.cc.isClang [ (lib.cmakeFeature "CMAKE_CXX_STANDARD" "14") ];
|
||||
|
||||
# Linking gobject explicitly fixes missing symbols (such as missing `_g_object_unref`) on Darwin.
|
||||
preConfigure = lib.optionalString stdenv.isDarwin ''
|
||||
export NIX_LDFLAGS+=" $(pkg-config gobject-2.0 --libs)"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [ libgsf glib libxml2 ];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user