Skip to content

Commit

Permalink
mkconsole: backport fix from upstream for older systems
Browse files Browse the repository at this point in the history
  • Loading branch information
barracuda156 committed Aug 18, 2024
1 parent e2c7912 commit a022af6
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
4 changes: 4 additions & 0 deletions aqua/mkconsole/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ checksums rmd160 c2e4e45824f3ca2d4a6676234150629169324429 \
sha256 0d458bbf5091bdd8258095f8666f8055ea16204163679593e126ded9b4cdbd54 \
size 109248

# Backport, drop with next update.
# See: https://github.com/mulle-kybernetik/mkconsole/issues/1
patchfiles-append 2ed541237808b584962cb0ae7485ee3d31a1ca45.patch

xcode.build.settings CODE_SIGN_IDENTITY=
xcode.destroot.settings CODE_SIGN_IDENTITY=

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
From 2ed541237808b584962cb0ae7485ee3d31a1ca45 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marcus=20Mu=CC=88ller?= <[email protected]>
Date: Fri, 16 Aug 2024 16:38:32 +0200
Subject: [PATCH] Fix build issues for macOS < 10.12

---
MKConsoleWindow.m | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/MKConsoleWindow.m b/MKConsoleWindow.m
index 6325289..26e5a54 100644
--- MKConsoleWindow.m
+++ MKConsoleWindow.m
@@ -46,9 +46,17 @@
@implementation MKConsoleWindow
//---------------------------------------------------------------------------------------

+// NOTE: can't use version macro(s) `MAC_OS_VERSION_12_0`/`__MAC_10_12` when
+// compiling on older platforms as it's undefined there - using its value
+// instead!
+#if (MAC_OS_X_VERSION_MAX_ALLOWED < 101200)
+#define NSWindowStyleMaskBorderless NSBorderlessWindowMask
+#define NSWindowStyleMask NSUInteger
+#endif
+
- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSWindowStyleMask)styleMask backing:(NSBackingStoreType)backingType defer:(BOOL)flag
{
- self = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO];
+ self = [super initWithContentRect:contentRect styleMask:NSWindowStyleMaskBorderless backing:NSBackingStoreBuffered defer:NO];
NSAssert1(self != nil, @"%s Failed to create window instance", __PRETTY_FUNCTION__);
return self;
}

0 comments on commit a022af6

Please sign in to comment.