<pre style='margin:0'>
Marcus Calhoun-Lopez (MarcusCalhoun-Lopez) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/db4f8f7741937d638716bac0640d37e621cf463b">https://github.com/macports/macports-ports/commit/db4f8f7741937d638716bac0640d37e621cf463b</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 db4f8f77419 tk: Backport fix for ttk::ThemeChanged error
</span>db4f8f77419 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit db4f8f7741937d638716bac0640d37e621cf463b
</span>Author: Christopher Chavez <chrischavez@gmx.us>
AuthorDate: Sun May 14 03:37:14 2023 -0500
<span style='display:block; white-space:pre;color:#404040;'> tk: Backport fix for ttk::ThemeChanged error
</span>---
x11/tk/Portfile | 5 +-
x11/tk/files/fix-themechanged-error.patch | 120 ++++++++++++++++++++++++++++++
2 files changed, 124 insertions(+), 1 deletion(-)
<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 e98bcc010fc..a49f4d95888 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;'>@@ -5,7 +5,7 @@ PortGroup muniversal 1.1
</span>
name tk
version 8.6.13
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 1
</span> categories x11
license Tcl/Tk
maintainers {mcalhoun @MarcusCalhoun-Lopez} openmaintainer
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -39,6 +39,9 @@ build.dir ${configure.dir}
</span> # for upstream report, see https://core.tcl-lang.org/tcl/tktview?name=ad393071c2
patchfiles-append patch-dyld_fallback_library_path.diff
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# Fix for https://core.tcl-lang.org/tk/info/310c74ecf4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append fix-themechanged-error.patch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> # https://github.com/tcltk/tk/commit/b0cb1a48cb0c4a0118d45e8804476a6b4ab502c8
# this is the only code that fails on OSX 10.6, so enable it for 10.7 or newer only; see also
# https://developer.apple.com/documentation/quartzcore/calayer/1410746-contentsscale
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/x11/tk/files/fix-themechanged-error.patch b/x11/tk/files/fix-themechanged-error.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..a386a726e09
</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/fix-themechanged-error.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,120 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From https://core.tcl-lang.org/tk/info/b1876b9ebc4b
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Index: generic/tkInt.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+==================================================================
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- generic/tkInt.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ generic/tkInt.h
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1090,14 +1090,15 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef __cplusplus
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ extern "C" {
</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;'>+- * Themed widget set init function:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * Themed widget set init function, and handler called when Tk is destroyed.
</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;'>+ MODULE_SCOPE int Ttk_Init(Tcl_Interp *interp);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++MODULE_SCOPE void Ttk_TkDestroyedHandler(Tcl_Interp *interp);
</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;'>+ * Internal functions shared among Tk modules but not exported to the outside
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * world:
</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;'>+Index: generic/tkWindow.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+==================================================================
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- generic/tkWindow.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ generic/tkWindow.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1619,10 +1619,11 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TkBindFree(winPtr->mainPtr);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TkDeleteAllImages(winPtr->mainPtr);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TkFontPkgFree(winPtr->mainPtr);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TkFocusFree(winPtr->mainPtr);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ TkStylePkgFree(winPtr->mainPtr);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Ttk_TkDestroyedHandler(winPtr->mainPtr->interp);
</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;'>+ * When embedding Tk into other applications, make sure that all
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * destroy events reach the server. Otherwise the embedding
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * application may also attempt to destroy the windows, resulting
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Index: generic/ttk/ttkTheme.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+==================================================================
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- generic/ttk/ttkTheme.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ generic/ttk/ttkTheme.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -401,12 +401,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Cleanup *cleanupList; /* Cleanup records */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Ttk_ResourceCache cache; /* Resource cache */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int themeChangePending; /* scheduled ThemeChangedProc call? */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } StylePackageData;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-static void ThemeChangedProc(void *); /* Forward */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /* Ttk_StylePkgFree --
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Cleanup procedure for StylePackageData.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static void Ttk_StylePkgFree(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ClientData clientData,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -415,17 +413,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ StylePackageData *pkgPtr = (StylePackageData *)clientData;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Tcl_HashSearch search;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Tcl_HashEntry *entryPtr;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Cleanup *cleanup;
</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;'>+- * Cancel any pending ThemeChanged calls:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if (pkgPtr->themeChangePending) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- Tcl_CancelIdleCall(ThemeChangedProc, pkgPtr);
</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;'>+ /*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Free themes.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ entryPtr = Tcl_FirstHashEntry(&pkgPtr->themeTable, &search);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ while (entryPtr != NULL) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -484,11 +475,11 @@
</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;'>+ void Ttk_RegisterCleanup(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Tcl_Interp *interp, ClientData clientData, Ttk_CleanupProc *cleanupProc)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- StylePackageData *pkgPtr = (StylePackageData *)GetStylePackageData(interp);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ StylePackageData *pkgPtr = GetStylePackageData(interp);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Cleanup *cleanup = (Cleanup *)ckalloc(sizeof(*cleanup));
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cleanup->clientData = clientData;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cleanup->cleanupProc = cleanupProc;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ cleanup->next = pkgPtr->cleanupList;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -528,10 +519,29 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (!pkgPtr->themeChangePending) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ Tcl_DoWhenIdle(ThemeChangedProc, pkgPtr);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ pkgPtr->themeChangePending = 1;
</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;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++/* Ttk_TkDestroyedHandler --
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * See bug [310c74ecf440]: idle calls to ThemeChangedProc()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * need to be canceled when Tk is destroyed, since the interp
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * may still be active afterward; canceling them from
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ * Ttk_StylePkgFree() would be too late.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++void Ttk_TkDestroyedHandler(
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Tcl_Interp* interp)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++{
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ StylePackageData* pkgPtr = GetStylePackageData(interp);
</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;'>++ * Cancel any pending ThemeChanged calls:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if (pkgPtr->themeChangePending) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ Tcl_CancelIdleCall(ThemeChangedProc, pkgPtr);
</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;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ /*
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Ttk_CreateTheme --
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ * Create a new theme and register it in the global theme table.
</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>