Skip to content

Commit

Permalink
depends: osx: fix qt5 build against 10.10 sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
theuni committed Jan 2, 2015
1 parent f55c5e9 commit ec90c97
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
3 changes: 2 additions & 1 deletion depends/packages/qt.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $(package)_dependencies=openssl
$(package)_linux_dependencies=freetype fontconfig dbus libxcb libX11 xproto libXext
$(package)_build_subdir=qtbase
$(package)_qt_libs=corelib network widgets gui plugins testlib
$(package)_patches=mac-qmake.conf fix-xcb-include-order.patch qt5-tablet-osx.patch
$(package)_patches=mac-qmake.conf fix-xcb-include-order.patch qt5-tablet-osx.patch qt5-yosemite.patch

define $(package)_set_vars
$(package)_config_opts_release = -release
Expand Down Expand Up @@ -56,6 +56,7 @@ define $(package)_preprocess_cmds
cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \
patch -p1 < $($(package)_patch_dir)/fix-xcb-include-order.patch && \
patch -p1 < $($(package)_patch_dir)/qt5-tablet-osx.patch && \
patch -d qtbase -p1 < $($(package)_patch_dir)/qt5-yosemite.patch && \
echo "QMAKE_CFLAGS += $($(package)_cflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
echo "QMAKE_CXXFLAGS += $($(package)_cxxflags) $($(package)_cppflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
echo "QMAKE_LFLAGS += $($(package)_ldflags)" >> qtbase/mkspecs/common/gcc-base.conf && \
Expand Down
52 changes: 52 additions & 0 deletions depends/patches/qt/qt5-yosemite.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
The following patch was taken from upstream:
https://qt.gitorious.org/qt/qtbase/commit/70e4428b6f1c6a4bad112203f67ee7d22107616c.patch

The first hunk was removed because it conflicts with 5.2.1, and is not currently needed.

From 70e4428b6f1c6a4bad112203f67ee7d22107616c Mon Sep 17 00:00:00 2001
From: Gabriel de Dietrich <[email protected]>
Date: Tue, 3 Jun 2014 14:20:20 +0200
Subject: [PATCH] Cocoa: Adapt to Xcode 6 clang version sudden pickiness
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Yes, that means OS X Yosemite fix.

Change-Id: I236f7af7b803de24ff0895e04c9a9253b5cfdb3b
Reviewed-by: Morten Johan Sørvig <[email protected]>
---
.../platforms/cocoa/qcocoaaccessibilityelement.mm | 2 +-
.../platforms/cocoa/qcocoaapplicationdelegate.mm | 2 +-
src/plugins/platforms/cocoa/qcocoamenuloader.mm | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
index f841184..548c6a2 100644
--- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
+++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
@@ -124,7 +124,7 @@ static void cleanupCocoaApplicationDelegate()
[dockMenu release];
[qtMenuLoader release];
if (reflectionDelegate) {
- [NSApp setDelegate:reflectionDelegate];
+ [[NSApplication sharedApplication] setDelegate:reflectionDelegate];
[reflectionDelegate release];
}
[[NSNotificationCenter defaultCenter] removeObserver:self];
diff --git a/src/plugins/platforms/cocoa/qcocoamenuloader.mm b/src/plugins/platforms/cocoa/qcocoamenuloader.mm
index 60bc3b5..9340e94 100644
--- a/src/plugins/platforms/cocoa/qcocoamenuloader.mm
+++ b/src/plugins/platforms/cocoa/qcocoamenuloader.mm
@@ -174,7 +174,7 @@ QT_END_NAMESPACE
- (void)removeActionsFromAppMenu
{
for (NSMenuItem *item in [appMenu itemArray])
- [item setTag:nil];
+ [item setTag:0];
}

- (void)dealloc
--
1.7.1

0 comments on commit ec90c97

Please sign in to comment.