Skip to content
This repository was archived by the owner on Jul 21, 2026. It is now read-only.

gettext: replace placeholder catalog tools with GNU implementations - #84

Open
brandonpayton wants to merge 1 commit into
mainfrom
migrate/gettext-cli
Open

gettext: replace placeholder catalog tools with GNU implementations#84
brandonpayton wants to merge 1 commit into
mainfrom
migrate/gettext-cli

Conversation

@brandonpayton

@brandonpayton brandonpayton commented Jul 12, 2026

Copy link
Copy Markdown
Member

Why

Kandelo currently uses compact fallback applets for message catalogs. This PR adds GNU Gettext 1.0 as a normal tap formula so Kandelo users can run the real gettext, ngettext, msgfmt, and xgettext programs through Homebrew.

The formula intentionally installs only those four programs. It does not claim the rest of GNU Gettext's executable and library suite.

What changed

  • builds the official GNU source with Kandelo's SDK and musl sysroot;
  • consumes the tap's libiconv, libxml2, ncurses, and zlib formulas as explicit target dependencies;
  • retains libxml2's complete static link closure in the required order: -lz -liconv -lm -lcharset -ldl -pthread;
  • verifies the generated Makefile still contains the selected libxml2 archive, GNU libiconv include/library roots, and ordered static closure;
  • builds the bundled libintl, libunistring, and libtextstyle components needed by the four selected programs;
  • corrects gnulib's musl locale detection without identifying Kandelo as Linux;
  • aligns libtextstyle's private tputs declaration with the ncurses ABI;
  • validates all four programs as fork-free Kandelo Wasm artifacts with no retired Asyncify surface or leaked build paths;
  • tests catalog extraction, compilation, character-set conversion, singular/plural lookup, ITS XML extraction, and styled output.

Review fix in this head

The libxml2 formula on tap main now uses GNU libiconv. Static Gettext links therefore need both libiconv and libcharset after libxml2. This head declares libiconv directly, passes its prefix to configure, supplies the complete ordered closure, and fails the build if configure drops or reorders those inputs.

Evidence

  • Base: da5f694d1c9c01656bfd1beeb78a710af3a25d6e
  • Head: 170ed74962d5fdba8a15c855ef37d5e83fac57f5
  • Formula SHA-256: 20d9e7336a6865d60bf657b358982296be708dff55c7373ea5f0c226cb0003e1
  • Ruby syntax, Homebrew style, and git diff --check pass.
  • The generated-Makefile guards pass against a real Kandelo dev-shell configure result.
  • Mutation checks reject a missing or wrong libiconv include root, a missing or wrong libiconv library root, a reordered closure, and a missing -lcharset.
  • Independent exact-head rereview accepted this commit.

The earlier content-equivalent formula passed a full source build and literal brew test --verbose, including all four commands and the runtime cases listed above. That earlier build used ABI 18 and is historical source/runtime evidence only. A full build, bottle publication, and Node/Chromium pours must be repeated against the current ABI before this formula can ship.

Merge and publication gates

Do not merge this formula yet. It still depends on the main-repository SDK/configure fixes and the trusted Homebrew bottle publisher landing first. Publication must then build dependency-first from current-ABI bottles for libiconv, libxml2, ncurses, and zlib, followed by stock Homebrew pours in Node and Chromium.

This tap-only PR changes no Kandelo ABI, main-repository registry package, bottle block, archive, receipt, or generated Wasm artifact.

@brandonpayton

Copy link
Copy Markdown
Member Author

Independent devil's-advocate review completed against exact head 739d076903248f74a212d3c9169c18730d66e846: no formula blocker found.

The four-tool scope is truthful: this replaces the registry-owned gettext, ngettext, msgfmt, and xgettext outputs with real GNU gettext behavior, while explicitly not claiming the full upstream suite. The Kandelo-musl gnulib patch is target-accurate, the ncurses tputs ABI correction is sound, direct static dependencies are declared and asserted, and per-tool fork instrumentation policies match the produced artifacts. Source provenance, license, manuals/ITS assets, style, strict audit, all-system readall, final-artifact guards, and functional tests were reviewed.

Keep this PR open until its declared main-repository gates #899, #901, and #903 land and the supported platform revision is rebuilt.

@brandonpayton

Copy link
Copy Markdown
Member Author

Independent exact-head devil's-advocate review: ACCEPT at ffce5ba37ecaae6d289fdcd9aed60f9240c77b91.

The reviewer independently verified the complete formula/dependency closure, reran literal full brew test --verbose, and confirmed all four installed artifacts are ABI 18, fork-free, free of retired Asyncify and raw host paths, mode 0755, and content-identical to the reported source build. Syntax, style, strict online audit, all-OS/all-arch readall, and diff checks pass.

Source merge remains intentionally held on Automattic/kandelo#874 -> #883 plus #899, #901, and #903. Bottle work remains gated on the consolidated ABI result owned by the PR #871 worktree.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant