<pre style='margin:0'>
Perry E. Metzger (pmetzger) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/960c9855b8143d50674dcfc2666f8db536a28cb7">https://github.com/macports/macports-ports/commit/960c9855b8143d50674dcfc2666f8db536a28cb7</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 960c9855b81 tk: fix build on macOS < 10.12
</span>960c9855b81 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 960c9855b8143d50674dcfc2666f8db536a28cb7
</span>Author: Christopher Chavez <chrischavez@gmx.us>
AuthorDate: Mon Nov 8 18:56:45 2021 -0600
<span style='display:block; white-space:pre;color:#404040;'> tk: fix build on macOS < 10.12
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Fixes: https://trac.macports.org/ticket/63868
</span>---
x11/tk/Portfile | 3 ++
x11/tk/files/patch-XGetImage-constant.diff | 51 ++++++++++++++++++++++++++++++
2 files changed, 54 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/x11/tk/Portfile b/x11/tk/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 1d4990bc798..3330f53f33a 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/x11/tk/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/x11/tk/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -40,6 +40,9 @@ patch.dir ${workpath}/${name}${version}
</span> # see https://trac.macports.org/ticket/57594
patchfiles-append patch-dyld_fallback_library_path.diff
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# see https://trac.macports.org/ticket/63868
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append patch-XGetImage-constant.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> configure.checks.implicit_function_declaration.whitelist-append \
closedir64 \
readdir64 \
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/x11/tk/files/patch-XGetImage-constant.diff b/x11/tk/files/patch-XGetImage-constant.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..6ff19c22cab
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/x11/tk/files/patch-XGetImage-constant.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,51 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git macosx/tkMacOSXConstants.h macosx/tkMacOSXConstants.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 0b6ae2b83..9d4079c1f 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- macosx/tkMacOSXConstants.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ macosx/tkMacOSXConstants.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -96,6 +96,7 @@ typedef NSInteger NSModalResponse;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define NSMiniaturizableWindowMask NSWindowStyleMaskMiniaturizable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define NSBorderlessWindowMask NSWindowStyleMaskBorderless
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #define NSFullScreenWindowMask NSWindowStyleMaskFullScreen
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define NSAlphaFirstBitmapFormat NSBitmapFormatAlphaFirst
</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;'>+ #if MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git macosx/tkMacOSXImage.c macosx/tkMacOSXImage.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 1ca7b6488..f256d7ab4 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- macosx/tkMacOSXImage.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ macosx/tkMacOSXImage.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -13,6 +13,7 @@
</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;'>+ #include "tkMacOSXPrivate.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#include "tkMacOSXConstants.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include "xbytes.h"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static CGImageRef CreateCGImageFromPixmap(Drawable pixmap);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -68,7 +69,7 @@ typedef struct RGBA32pixel_t {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * ARGB32 0xAARRGGBB (Byte order is ARGB on big-endian systems.)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * This is used by Aqua Tk for XImages and by NSBitmapImageReps whose
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- * bitmapFormat property is NSBitmapFormatAlphaFirst.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * bitmapFormat property is NSAlphaFirstBitmapFormat.
</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;'>+ typedef struct ARGB32pixel_t {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -775,7 +776,7 @@ XGetImage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size = [bitmapRep bytesPerPlane];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ bytes_per_row = [bitmapRep bytesPerRow];
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ bitmap = (char *)ckalloc(size);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if ((bitmap_fmt != 0 && bitmap_fmt != NSBitmapFormatAlphaFirst)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if ((bitmap_fmt != 0 && bitmap_fmt != NSAlphaFirstBitmapFormat)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ || [bitmapRep samplesPerPixel] != 4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ || [bitmapRep isPlanar] != 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ || bytes_per_row < 4 * width
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -802,7 +803,7 @@ XGetImage(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ flipped.rgba.blue = pixel.argb.blue;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ flipped.rgba.alpha = pixel.argb.alpha;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *((pixel32 *)(bitmap + m)) = flipped;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- } else { // bitmap_fmt = NSBitmapFormatAlphaFirst
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else { // bitmap_fmt = NSAlphaFirstBitmapFormat
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ *((pixel32 *)(bitmap + m)) = pixel;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span></pre><pre style='margin:0'>
</pre>