libopenshot: fix build on Darwin

Make sure it includes MagickCore when linking libopenshot.dylib, or it
will fail with missing symbols. Use the 11.0 SDK to build.
This commit is contained in:
Randy Eckenrode 2023-11-09 22:41:50 -05:00
parent 9a0c85ffc5
commit 38a5be67ea
No known key found for this signature in database
GPG Key ID: 64C1CD4EC2A600D9
2 changed files with 7 additions and 1 deletions

View File

@ -31,6 +31,10 @@ stdenv.mkDerivation rec {
postPatch = ''
sed -i 's/{UNITTEST++_INCLUDE_DIR}/ENV{UNITTEST++_INCLUDE_DIR}/g' tests/CMakeLists.txt
'' + lib.optionalString stdenv.isDarwin ''
# Darwin requires both Magick++ and MagickCore or it will fail to link.
substituteInPlace src/CMakeLists.txt \
--replace 'target_link_libraries(openshot PUBLIC ImageMagick::Magick++)' 'target_link_libraries(openshot PUBLIC ImageMagick::Magick++ ImageMagick::MagickCore)'
'';
nativeBuildInputs = lib.optionals stdenv.isLinux [

View File

@ -128,7 +128,9 @@ in (kdeFrameworks // plasmaMobileGear // plasma5 // plasma5.thirdParty // kdeGea
liblastfm = callPackage ../development/libraries/liblastfm { };
libopenshot = callPackage ../applications/video/openshot-qt/libopenshot.nix { };
libopenshot = callPackage ../applications/video/openshot-qt/libopenshot.nix {
stdenv = if pkgs.stdenv.isDarwin then pkgs.overrideSDK pkgs.stdenv "11.0" else pkgs.stdenv;
};
packagekit-qt = callPackage ../tools/package-management/packagekit/qt.nix { };