<pre style='margin:0'>
Ken (kencu) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/ad78a3a7de4d733e6e611b122e784db72a46b4b5">https://github.com/macports/macports-ports/commit/ad78a3a7de4d733e6e611b122e784db72a46b4b5</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new ad78a3a7de4 dosbox-x: fix build on < 10.7
</span>ad78a3a7de4 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit ad78a3a7de4d733e6e611b122e784db72a46b4b5
</span>Author: Ken Cunningham <kencu@macports.org>
AuthorDate: Wed Sep 2 12:52:10 2020 -0700
<span style='display:block; white-space:pre;color:#404040;'> dosbox-x: fix build on < 10.7
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> use standard workaround for convertRectToScreen missing on 10.6
</span><span style='display:block; white-space:pre;color:#404040;'> also allow build to use newer SDK but target < 10.7
</span>---
emulators/dosbox-x/Portfile | 3 ++-
.../dosbox-x/files/patch-convertbasetorect.diff | 26 ++++++++++++++++++++++
2 files changed, 28 insertions(+), 1 deletion(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/emulators/dosbox-x/Portfile b/emulators/dosbox-x/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 0b40c7dfed4..734ee35f50d 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/emulators/dosbox-x/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/emulators/dosbox-x/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -30,7 +30,8 @@ homepage https://dosbox-x.com
</span> github.tarball_from archive
patchfiles patch-futimens.diff \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-mactypes.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-mactypes.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-convertbasetorect.diff
</span>
supported_archs i386 x86_64
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/emulators/dosbox-x/files/patch-convertbasetorect.diff b/emulators/dosbox-x/files/patch-convertbasetorect.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..6cc4b8eadd5
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/emulators/dosbox-x/files/patch-convertbasetorect.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,26 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+kencu@macports.org
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+work around no convertRectToScreen on < 10.7
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Of note, it looks a lot like the new convertPointToScreen is just the old convertBaseToScreen
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+in new clothes... what goes around comes around, I guess
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- src/gui/menu_osx.mm.orig 2020-09-02 12:14:28.000000000 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ src/gui/menu_osx.mm 2020-09-02 12:16:38.000000000 -0700
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -511,7 +511,16 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // NTS: This did not appear until Mojave, and some followers on Github prefer to compile for somewhat older versions of OS X
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // NSPoint pt = [wnd convertPointToScreen:NSMakePoint(rct.size.width / 2, rct.size.height / 2)];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ // NTS: convertRectToScreen however is documented to exist since 10.7, unless Apple got that wrong too...
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- NSPoint pt = [wnd convertRectToScreen:NSMakeRect(rct.size.width / 2, rct.size.height / 2, 0, 0)].origin; /* x,y,w,h */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ([wnd respondsToSelector:@selector(convertRectToScreen:)]) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ NSPoint pt = [wnd convertRectToScreen:NSMakeRect(rct.size.width / 2, rct.size.height / 2, 0, 0)].origin; /* x,y,w,h */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ NSPoint pt = [wnd convertBaseToScreen:NSMakeRect(rct.size.width / 2, rct.size.height / 2, 0, 0).origin]; /* x,y,w,h */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ NSPoint pt = [wnd convertBaseToScreen:NSMakeRect(rct.size.width / 2, rct.size.height / 2, 0, 0).origin]; /* x,y,w,h */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Eugh this ugliness wouldn't be necessary if we didn't have to fudge relative to primary display. */
</span></pre><pre style='margin:0'>
</pre>