qt512.qtbase: Fix darwin build

This commit is contained in:
adisbladis 2019-11-10 12:29:08 +00:00
parent 7668f680da
commit c9774cb6e5
No known key found for this signature in database
GPG key ID: 110BFAD44C6249B7
3 changed files with 18 additions and 1 deletions

View file

@ -54,6 +54,7 @@ let
optionals stdenv.isDarwin [
./qtbase.patch.d/0001-qtbase-mkspecs-mac.patch
./qtbase.patch.d/0002-qtbase-mac.patch
./qtbase.patch.d/0013-define-kiosurfacesuccess.patch
]
++ [
./qtbase.patch.d/0003-qtbase-mkspecs.patch

View file

@ -0,0 +1,16 @@
diff --git a/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.mm b/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.mm
index a367487e..c3aeca1d 100644
--- a/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.mm
+++ b/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.mm
@@ -49,6 +49,11 @@
// but was only added in the 10.14 SDK, so declare it just in case.
extern "C" CFPropertyListRef CGColorSpaceCopyPropertyList(CGColorSpaceRef space);
+// Introduced in 10.13: http://codeworkshop.net/objc-diff/sdkdiffs/macos/10.13/IOSurface.html
+#if !defined(kIOSurfaceSuccess)
+#define kIOSurfaceSuccess KERN_SUCCESS
+#endif
+
QT_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcQpaIOSurface, "qt.qpa.backingstore.iosurface");

View file

@ -58,7 +58,7 @@ stdenv.mkDerivation {
# TODO: move to buildInputs, this should not be propagated.
AGL AppKit ApplicationServices Carbon Cocoa CoreAudio CoreBluetooth
CoreLocation CoreServices DiskArbitration Foundation OpenGL
darwin.libobjc libiconv MetalKit
darwin.libobjc libiconv MetalKit IOKit
]
else
[