From: | "Christoph Junghans (ottxor)" <ottxor@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in x11-libs/gtk+/files: gtk+-3.12.2-darwin10.6.patch |
Date: | Tue, 02 Sep 2014 00:26:36 |
Message-Id: | 20140902002632.30F50479E@oystercatcher.gentoo.org |
1 | ottxor 14/09/02 00:26:32 |
2 | |
3 | Added: gtk+-3.12.2-darwin10.6.patch |
4 | Log: |
5 | fix build on Darwin 10.6 (bug #519058) |
6 | |
7 | (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key C2000586) |
8 | |
9 | Revision Changes Path |
10 | 1.1 x11-libs/gtk+/files/gtk+-3.12.2-darwin10.6.patch |
11 | |
12 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/gtk+/files/gtk+-3.12.2-darwin10.6.patch?rev=1.1&view=markup |
13 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-libs/gtk+/files/gtk+-3.12.2-darwin10.6.patch?rev=1.1&content-type=text/plain |
14 | |
15 | Index: gtk+-3.12.2-darwin10.6.patch |
16 | =================================================================== |
17 | Fix for Mac Os 10.7 |
18 | |
19 | src_compile: |
20 | gtkapplication-quartz-menu.c:265: error: incompatible type for argument 1 of 'roundf' |
21 | make[4]: *** [libgtk_3_la-gtkapplication-quartz-menu.lo] Error 1 |
22 | |
23 | More info: |
24 | https://trac.macports.org/ticket/43283 |
25 | https://bugzilla.gnome.org/show_bug.cgi?id=727366 |
26 | https://bugs.gentoo.org/show_bug.cgi?id=519058 |
27 | |
28 | --- gtk/gtkapplication-quartz-menu.c.orig 2014-05-08 01:40:39.000000000 +0200 |
29 | +++ gtk/gtkapplication-quartz-menu.c 2014-05-15 11:16:09.000000000 +0200 |
30 | @@ -30,6 +30,16 @@ |
31 | |
32 | #import <Cocoa/Cocoa.h> |
33 | |
34 | +#if !defined(MAC_OS_X_VERSION_10_7) || \ |
35 | +MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 |
36 | + |
37 | +@interface NSScreen (LionAPI) |
38 | +- (CGFloat)backingScaleFactor; |
39 | +- (NSRect)convertRectToBacking:(NSRect)aRect; |
40 | +@end |
41 | + |
42 | +#endif // 10.7 |
43 | + |
44 | #define ICON_SIZE 16 |
45 | |
46 | #define BLACK "#000000" |
47 | @@ -262,7 +272,7 @@ |
48 | } |
49 | |
50 | theme = gtk_icon_theme_get_default (); |
51 | - scale = roundf ([[NSScreen mainScreen] backingScaleFactor]); |
52 | + scale = [[NSScreen mainScreen] respondsToSelector:@selector(backingScaleFactor)] ? roundf ([[NSScreen mainScreen] backingScaleFactor]) : 1.; |
53 | info = gtk_icon_theme_lookup_by_gicon_for_scale (theme, icon, ICON_SIZE, scale, GTK_ICON_LOOKUP_USE_BUILTIN); |
54 | |
55 | if (info != NULL) |