ncurses: add the terminal dependency root#8
Open
brandonpayton wants to merge 3 commits into
Open
Conversation
77e730b to
2a98db2
Compare
2a98db2 to
7b5a83d
Compare
Member
Author
|
Rebased onto current tap
No ABI 18 artifact rebuild or runtime claim was added by this rebase. The existing #842/#867 and bottle-publication gates remain in force. |
This was referenced Jul 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Add ncurses as Kandelo's terminal-library dependency root. The formula builds the wide-character static C and C++ interfaces, debug variants, conventional compatibility names, pkg-config metadata, guest utilities, manpages, compiled fallbacks, and the full terminfo database.
This unblocks dependency-first migrations for shells, editors, terminal tools, and other CLI packages.
Platform prerequisites
Bottle publication remains gated on the open Kandelo platform chain:
The formula deliberately does not inject a package-specific stack flag. Static ncurses cannot own a final executable's stack, and doing so would hide the same platform defect from other software.
Formula contract
tic/infocmponly for architecture-independent data generation./home/linuxbrew/.linuxbrew/opt/ncurses, never the build host's keg.tic,tput, andinfocmpunder Kandelo and verifies a generated custom terminal entry.Generator portability fix
Upstream
MKfallback.shuses GNU sed's\<...\>word-boundary syntax to rewrite generatedshortarrays toNCURSES_INT2. Darwin sed silently leaves that expression unchanged. With target extended colors enabled, the resulting fallback table stored 16-bit numbers while ncurses read theTERMTYPE2table as 32-bit numbers, sosetupterm()succeeded but numeric capabilities such ascolorswere misindexed.The formula rewrites that generator expression to a portable, declaration-specific substitution and rejects a generated fallback table with the wrong target width.
Validation
Local evidence using
scripts/dev-shell.shand the ABI 18 integration worktree:brew test automattic/kandelo-homebrew/ncurses: passed, including isolated compiled fallback, disk database, targetticoutput, C, C++, pkg-config, termcap, and header compatibility paths.fallback.o:xterm_256color_number_dataoccupies the expected 32-bit layout beforexterm_256color_string_data(0x130to0x1d0)./home/linuxbrew/.linuxbrew/opt/ncurses/share/terminfoand no/Users/brandon/emdashbuild path.wasm32_kandelobottle generation and normal resolver pour: passed; SHA-256a61108273dfaee86c4b036d30ce26455c33f738efa3dfaf019d8d53e9803a33b.brew style: no offenses.git diff --check: passed.brew auditis not claimed: the cross-target's intentional top-level compatibility headers trigger Homebrew's macOS system-header shadow rule. Publication and merge remain gated on the platform PRs above.