Skip to content

new(tcl-lang.org/tk): Tk GUI toolkit (Top 300 prereq)#13057

Draft
tannevaled wants to merge 9 commits into
pkgxdev:mainfrom
tannevaled:new/tk
Draft

new(tcl-lang.org/tk): Tk GUI toolkit (Top 300 prereq)#13057
tannevaled wants to merge 9 commits into
pkgxdev:mainfrom
tannevaled:new/tk

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

Companion to tcl-lang.org. Required to build git-gui, gitk, python-tk, etc. Part of #99.

🤖 Generated with Claude Code

Companion to tcl-lang.org. Required to build any Tcl-based GUI:
git-gui, gitk, IDLE/python-tk, etc. Same upstream as Tcl
(tcl-lang.org / sourceforge.net/projects/tcl).

Linux uses unix/ build with X11 backend.
Darwin uses macosx/ build with --enable-aqua (native Cocoa).

Provides bin/wish (the Tk shell). Used as a build dep by:
- python.org with Tk support (python-tk)
- git-scm.org with --enable-gui (git-gui)
@tannevaled tannevaled marked this pull request as draft May 29, 2026 13:33
@tannevaled

Copy link
Copy Markdown
Contributor Author

Draft — Tk 9.0.3 build progresses through configure + compile of all the X11 backend sources, but hits an internal Makefile target gap at link time:

make: *** No rule to make target 'minizip', needed by 'libtk9.0.3.zip'.  Stop.

Tk 9.0 bundles its lib into libtk${ver}.zip and uses an internal 'minizip' helper that should be built as part of the upstream Makefile rules but isn't getting picked up. Likely needs:

  • An autoreconf pass before configure (Makefile.in may be stale)
  • Or a pre-configure step that vendors a minizip binary
  • Or a different configure flag set to skip the zipfs library bundling

Deferring.

tannevaled and others added 5 commits May 30, 2026 09:29
Tk 9.0 embeds a zipfs of its own resources into libtk*.zip at build
time. configure probes for `zip(1)` on PATH; if absent it prints
"Building minizip" but the resulting Makefile has no rule for the
`minizip` target, so make dies with
    "No rule to make target 'minizip', needed by 'libtk9.0.3.zip'"

Providing info-zip.org/zip as a build dep lets configure pick the
simple path. This is the same fix as Debian's tk-9.0 package.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
After the zip-dep fix the build itself succeeded but the test
step's literal
    test -f libtk9.0.so -o -f libtk9.0.dylib
came back FAIL. Tk 9.0's `make install` writes the shared library
under several names depending on platform and configure flags —
e.g. libtk9.0.so.0, libtcl9tk9.0.so on some builds.

Replace the literal-name check with a glob that accepts any
libtk*.{so,dylib}* under {{prefix}}/lib/ and emits a diagnostic
listing if nothing matches (so a future failure tells us the
actual name rather than just "false").

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The previous iteration's `libtk*` glob was still too narrow. Tk 9.0
installs its shared library as `libtcl9tk9.0.so` — Tcl-version-
prefixed since Tk 9.x. The directory listing on failure showed:

    libtcl9tk9.0.so
    libtkstub.a
    pkgconfig/
    tk9.0/
    tkConfig.sh

Broaden the glob to `lib*tk*.{so,dylib}*` so future renames of the
form `libtcl<X>tk<Y>.so` keep working.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
After the zip-dep + glob-test fixes, Linux x86-64 and ARM64 both
turned green. Darwin then failed late at brewkit's fix-macho pass:

    fix-macho: writing /opt/tcl-lang.org/tk/v9.0.3/bin/wish9.0
    error: failed to fix machos

wish9.0's LC_LOAD_DYLIB references libtcl9tk9.0.dylib by absolute
path; install_name_tool's automatic relink heuristics don't handle
this layout (Tcl-version-prefixed tk lib name is new in Tk 9).

Skip fix-macho and do the install_name_tool relink manually — same
pattern the sibling tcl.tk/tcl recipe uses.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The previous commit set `skip: fix-macho` (singular) thinking it
matched brewkit's pass name. CI showed the pass STILL ran, fired
the same error. brewkit's actual binary is `fix-machos.rb` (plural)
and the matching skip key is `fix-machos`, which is what the sibling
`tcl.tk/tcl` recipe uses verbatim.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
tannevaled added a commit to tannevaled/pantry that referenced this pull request May 31, 2026
- git-gui Makefile installs to $(gitexecdir), not the made-up
  `gg_install_dir`; pass gitexecdir + sharedir explicitly.
- gitk-git Makefile installs the gitk wrapper to $(bindir) directly
  (not into git-core); drop the wrong libexec symlink and let bindir
  be {{prefix}}/bin.
- TCLTK_PATH (and TCL_PATH for gitk) must be passed to BOTH `make`
  and `make install` — they're baked into the generated wrapper
  shebangs at install time.
- Cross-checked against debian's git-gui package layout.

Note: builds remain blocked on PR pkgxdev#13057 (tcl-lang.org/tk).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant