Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

68.5. tig-2.6.1

ncurses interface for reading a git repository

2.6.1-1 · GPL-2.0-or-later · 0.6 SBU · 876.6 KiB, 7 files · 40_lang, 186 of 186 · ports/core/vcs/tig

Homepage: https://jonas.github.io/tig/

Why it is in KDOS. The comment above it in script/phases/40_lang/packages.d/vcs.txt:

tig READS a repository where lazygit acts on one.

Depends on: ncurses, git, readline, pcre2.

Required by: no port names it.

Sources: tig-2.6.1.tar.gz (1.1 MiB). Every step kpkg takes applies to this port.

Install: script/chroot/exec.sh bash -c 'source script/phases/40_lang/phase.env && kpkg install tig'

build.sh:

./configure --prefix=/usr --sysconfdir=/etc --with-ncursesw
for def in HAVE_PCRE2 HAVE_READLINE HAVE_NCURSESW; do
	grep -q "^#define $def 1" config.h || { echo "tig: $def not configured" >&2; exit 1; }
done
make
make DESTDIR=$PKG install
install -Dm644 doc/tig.1 -t "$PKG/usr/share/man/man1"
install -Dm644 doc/tigrc.5 -t "$PKG/usr/share/man/man5"
install -Dm644 doc/tigmanual.7 -t "$PKG/usr/share/man/man7"

install -d "$PKG/usr/share/applications"
cat > "$PKG/usr/share/applications/tig.desktop" <<'EOF'
[Desktop Entry]
Type=Application
Name=Git History
GenericName=Version Control
Comment=Browse a repository's history
Exec=tig
Icon=vcs-normal
Terminal=true
NoDisplay=true
Categories=Development;RevisionControl;
Keywords=git;log;history;blame;tig;
EOF
chmod 644 "$PKG/usr/share/applications/tig.desktop"

Programs: tig.

Directories: /usr/share/licenses/tig.

configure treats PCRE2 and readline as optional and builds a reduced tig without them: searches fall back to the C library’s POSIX regular expressions, and the prompt loses line editing and history. Wide-character ncurses is optional too unless asked for; without it configure only warns that UTF-8 will be drawn wrongly. --with-ncursesw makes configure stop when it is missing, and build.sh reads config.h after configure and stops when HAVE_PCRE2, HAVE_READLINE or HAVE_NCURSESW is not defined, so a dependency that goes missing fails the build instead.

make install installs only the program and /etc/tigrc. The release archive carries the manual pages already built, doc/tig.1, doc/tigrc.5 and doc/tigmanual.7, and build.sh installs them as they are, so the build runs neither asciidoc nor xmlto.

The desktop entry is KDOS’s own, with Terminal=true and NoDisplay=true. tig browses the repository of the directory it starts in, and an entry started from Start starts in the home directory, where tig finds no repository and exits at once; it is run from a prompt inside a repository.