From 366ca00918b7f7a52c3fb6ee6c024f59e21d0324 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Fri, 29 May 2026 11:56:34 +0200 Subject: [PATCH 1/2] new(git-scm.org/gui): git-gui + gitk Tcl/Tk frontends MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The main git-scm.org recipe builds with NO_TCLTK=1 — this recipe re-uses the same git source but builds only git-gui/ and gitk-git/ subdirs against Tk. Provides bin/git-gui and bin/gitk. Closes part of pkgxdev/pantry#99 (Top 300 holdout #371). Depends on tcl-lang.org/tk (new in this batch). --- projects/git-scm.org/gui/package.yml | 61 ++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 projects/git-scm.org/gui/package.yml diff --git a/projects/git-scm.org/gui/package.yml b/projects/git-scm.org/gui/package.yml new file mode 100644 index 0000000000..98f30f7e52 --- /dev/null +++ b/projects/git-scm.org/gui/package.yml @@ -0,0 +1,61 @@ +# git-gui + gitk — Tcl/Tk GUIs for git. +# +# Companion to git-scm.org which builds the main git binaries with +# `NO_TCLTK=1`. This recipe re-uses the same git source but builds +# only the git-gui/ and gitk-git/ subdirs against Tk. +# +# Provides bin/git-gui (commit/history GUI) and bin/gitk (history +# visualizer). Both invoked via `git gui` and `gitk` once on PATH. +# +# Closes part of pkgxdev/pantry#99 (Top 300 holdout #371). + +distributable: + url: https://mirrors.edge.kernel.org/pub/software/scm/git/git-{{version}}.tar.xz + strip-components: 1 + +versions: + github: git/git/tags + +platforms: + - linux/x86-64 + - linux/aarch64 + - darwin/x86-64 + - darwin/aarch64 + +dependencies: + git-scm.org: '*' + tcl-lang.org: '*' + tcl-lang.org/tk: '*' + +build: + dependencies: + gnu.org/make: '*' + gnu.org/coreutils: '*' + gnu.org/gettext: '*' + + script: + # Build just the git-gui and gitk subdirs — the main `git` binary + # comes from git-scm.org which is a runtime dep. + - run: | + cd git-gui + make --jobs {{ hw.concurrency }} TCLTK_PATH={{deps.tcl-lang.org/tk.prefix}}/bin/wish + make install gg_install_dir={{prefix}}/libexec/git-core prefix={{prefix}} + - run: | + cd gitk-git + make --jobs {{ hw.concurrency }} + make install gitexecdir={{prefix}}/libexec/git-core prefix={{prefix}} + + - run: | + # symlink top-level wrappers so `git-gui` and `gitk` are on PATH + mkdir -p {{prefix}}/bin + cd {{prefix}}/bin + ln -sf ../libexec/git-core/git-gui git-gui || true + ln -sf ../libexec/git-core/gitk gitk || true + +test: + - test -f "{{prefix}}/libexec/git-core/git-gui" + - test -f "{{prefix}}/libexec/git-core/gitk" + +provides: + - bin/git-gui + - bin/gitk From deaa95a0323d6bc4eabe67b6cc7953b1148faca2 Mon Sep 17 00:00:00 2001 From: tannevaled Date: Sun, 31 May 2026 14:07:48 +0200 Subject: [PATCH 2/2] fix(git-scm.org/gui): correct install vars and TCLTK_PATH plumbing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 #13057 (tcl-lang.org/tk). --- projects/git-scm.org/gui/package.yml | 41 +++++++++++++++++++++------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/projects/git-scm.org/gui/package.yml b/projects/git-scm.org/gui/package.yml index 98f30f7e52..f72692e148 100644 --- a/projects/git-scm.org/gui/package.yml +++ b/projects/git-scm.org/gui/package.yml @@ -36,25 +36,46 @@ build: script: # Build just the git-gui and gitk subdirs — the main `git` binary # comes from git-scm.org which is a runtime dep. + # + # git-gui's Makefile installs into $(gitexecdir) (the wrapper) and + # $(sharedir)/git-gui/lib (Tcl sources). gitk-git installs the + # `gitk` wrapper into $(bindir) directly. + # + # TCLTK_PATH (path to wish) is baked into the generated wrapper + # scripts at `make` time — must be set for both subdirs. - run: | cd git-gui - make --jobs {{ hw.concurrency }} TCLTK_PATH={{deps.tcl-lang.org/tk.prefix}}/bin/wish - make install gg_install_dir={{prefix}}/libexec/git-core prefix={{prefix}} + make --jobs {{ hw.concurrency }} \ + TCLTK_PATH={{deps.tcl-lang.org/tk.prefix}}/bin/wish + make install \ + gitexecdir={{prefix}}/libexec/git-core \ + sharedir={{prefix}}/share \ + prefix={{prefix}} \ + TCLTK_PATH={{deps.tcl-lang.org/tk.prefix}}/bin/wish + - run: | cd gitk-git - make --jobs {{ hw.concurrency }} - make install gitexecdir={{prefix}}/libexec/git-core prefix={{prefix}} + make --jobs {{ hw.concurrency }} \ + TCLTK_PATH={{deps.tcl-lang.org/tk.prefix}}/bin/wish \ + TCL_PATH={{deps.tcl-lang.org.prefix}}/bin/tclsh + make install \ + bindir={{prefix}}/bin \ + sharedir={{prefix}}/share \ + prefix={{prefix}} \ + TCLTK_PATH={{deps.tcl-lang.org/tk.prefix}}/bin/wish \ + TCL_PATH={{deps.tcl-lang.org.prefix}}/bin/tclsh - run: | - # symlink top-level wrappers so `git-gui` and `gitk` are on PATH + # git-gui installs as libexec/git-core/git-gui (so `git gui` + # dispatches to it); add a bin/ symlink so it's directly on + # PATH as well — matches debian's layout. mkdir -p {{prefix}}/bin - cd {{prefix}}/bin - ln -sf ../libexec/git-core/git-gui git-gui || true - ln -sf ../libexec/git-core/gitk gitk || true + ln -sf ../libexec/git-core/git-gui {{prefix}}/bin/git-gui test: - - test -f "{{prefix}}/libexec/git-core/git-gui" - - test -f "{{prefix}}/libexec/git-core/gitk" + - test -x "{{prefix}}/libexec/git-core/git-gui" + - test -x "{{prefix}}/bin/git-gui" + - test -x "{{prefix}}/bin/gitk" provides: - bin/git-gui