gpo.zugaina.org

Search Portage & Overlays:

app-misc/cmatrix

An ncurses based app to show a scrolling screen from the Matrix

Screenshots

  • cmatrix-9999
    X

    View      Download      Browse     License: GPL-3+   
    Overlay: oubliette
  • cmatrix-2.0-r6
    ~alpha amd64 ~arm64 ~hppa ppc ppc64 ~sparc x86
    +unicode X

    View      Download      Browse     License: GPL-3+   
    Overlay: gentoo
  • cmatrix-2.0-r5
    ~alpha amd64 ~arm64 ~hppa ppc ppc64 ~sparc x86
    +unicode X

    View      Download      Browse     License: GPL-3+   
    Overlay: gentoo

ChangeLog

commit 213ce91141cb852770800606cba4a455c3ef34f8
Author: Nic Boet <nic@boet.cc>
Date: Thu Oct 1 23:48:11 2026 -0500

app-misc/cmatrix: initialise is_head, fix SIGFPE in 3-line terminal

- var_init() never set is_head, so the draw loop read uninitialised
memory. In -o mode is_head is never written at all, so after a resize
reused freed memory, random characters were drawn white (90-108 of
~360 glyphs after 4 resizes; 4-9 with the fix).
- rand() % (LINES - 3) divides by zero when started in a terminal
exactly 3 lines tall. The old fix for #3/#47 only clamps on resize.

Found with ASan/UBSan and valgrind; both now report no errors across
the test scenarios. Upstream PR #221.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

commit d8e36a5966fdcc15bbe0653436d41a290ad0d6d7
Author: Nic Boet <nic@boet.cc>
Date: Thu Oct 1 23:20:34 2026 -0500

app-misc/cmatrix: drop 1.2a and 2.0, carry -c fix in 9999

Make the package 9999-only. 1.2a is superseded, and 2.0's -c mode is
broken beyond what's worth backporting (wrong code point range, fixed
upstream by #112 after the release).

Rename the patches without a version so cmatrix-9999.ebuild can be
copied to a future release as-is; a comment above PATCHES says what to
drop when doing so.

Add the cmatrix.c part of upstream PR #213: the white head of each
stream was drawn with addch(), which truncates half-width katakana to
its low byte. ncurses then shows that as a two-cell control sequence
(e.g. ~O), leaving Latin letters and attribute boxes in the gaps
between streams (#202, #206). With the fix, -c shows only katakana,
also with -b and -r.

Drop the SourceForge remote-id, which was 1.2a's home.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

commit aeff49d03152f507f53b66ccc3788e0950a6448d
Author: Nic Boet <nic@boet.cc>
Date: Thu Oct 1 23:13:19 2026 -0500

app-misc/cmatrix: fix TERM-unset segfault and exit status, 2.0-r8

- term-unset-segfault: -f passed getenv("TERM") straight to strcmp(),
crashing when TERM is unset (upstream #174; our PR #220).
- c_die-exit-status: fatal errors exited with status 0; pull in upstream
PR #192 so they exit with EXIT_FAILURE. Backported by hand for 2.0,
where upstream's later reformatting stops it applying as-is.

Added to 9999, and to 2.0 as a revbump to r8.

Tested both: env -u TERM cmatrix -f now runs and exits 0 (was SIGSEGV);
an invalid -C colour exits 1 (was 0); q, -h and -V still exit 0; the
resize test still fills 119x40 with no fd growth.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

commit f7978292f7581a4bcbe8c63d48e79c5d4787c94a
Author: Nic Boet <nic@boet.cc>
Date: Thu Oct 1 22:53:47 2026 -0500

app-misc/cmatrix: link patches to their upstream PRs

Point each carried patch at its upstream PR (#217, #218, #219, and #201
for the CMake 4 sed; #118 for the 2.0 backport) so it's clear which one
to drop when upstream merges. Comment-only; no rebuild needed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

commit 4896b4388e2c43ce6db94d32096719272b388198
Author: Nic Boet <nic@boet.cc>
Date: Thu Oct 1 22:46:18 2026 -0500

app-misc/cmatrix: add 2.0-r7 with resize fixes

Revision over ::gentoo's 2.0-r6 that fixes resizing, which is broken in
2.0 as built with CMake (upstream #98, #108):

- resize-garbage: backport of upstream #118 (7ab2d95, 6d62080, never
released), which stops stray blocks being left behind when shrinking.
- cmake-resize: CMake never checked for resizeterm()/wresize(), so the
matrix kept drawing at its start-up size when the terminal grew.
- tty-fd-leak: resize_screen() leaked one fd per SIGWINCH.
- cmake-font-install: install fonts to fixed dirs and never run
mkfontdir on the live system; the X font goes through font.eclass.

Tested by resizing a running cmatrix in tmux from 40x12 to 120x40: r6
keeps drawing 40x12 and goes from 3 to 24 open fds over 21 resizes; r7
fills 119x40 and stays at 3 fds, with both USE="X unicode" and
USE="-X -unicode".

Keyworded ~amd64 ~x86 only; other arches untested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

commit b2a3a47971c408871816c4cfb672c06d69d36766
Author: Nic Boet <nic@boet.cc>
Date: Thu Oct 1 22:43:04 2026 -0500

app-misc/cmatrix: fix resize and tty fd leak in 9999

The CMake build never checked for resizeterm()/wresize(), so
resize_screen() compiled without them: enlarging the terminal left the
matrix drawing at its start-up size (upstream #98, #108). configure.ac
has always checked for both; add the same checks to CMakeLists.txt.

resize_screen() also opened the tty for TIOCGWINSZ and never closed it,
leaking one fd per SIGWINCH.

Verified by resizing a running cmatrix in tmux from 40x12 to 120x40:
before, it kept drawing 40x12 and open fds went 3 -> 24 over 21
resizes; after, it fills 119x40 and stays at 3 fds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

commit b862eaadbec7db9dc25e358b555bbc6ad1ad9e1a
Author: Nic Boet <nic@boet.cc>
Date: Thu Oct 1 22:34:06 2026 -0500

app-misc/cmatrix: add 9999

Live ebuild tracking abishekvashok/cmatrix master, modelled on ::gentoo's
2.0-r6 (cmake + font.eclass). 1.2a stays the default; this is for testing
upstream ahead of any bump.

Master does not build on Gentoo as-is, so it carries two patches that are
also drafted for upstream:

- cmake-ncursesw-header: CMake links ncursesw but cmatrix.c includes the
narrow <ncurses.h>, so addwstr() is undeclared. Include
ncursesw/ncurses.h when found.
- cmake-font-install: the font install probed the build host and ran
mkfontdir on the live system regardless of DESTDIR. Make destinations
configurable and skip mkfontdir for staged installs. Console fonts go
to /usr/share/consolefonts; the X font goes through font.eclass.

Also bump cmake_minimum_required for CMake 4 (upstream PR #201), and add
the GitHub remote-id to metadata.xml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

commit ec2f110f22e826086eee259b1632de63d3360fe1
Author: Nic Boet <nic@boet.cc>
Date: Thu Jun 6 15:41:10 2024 -0500

sourceforge mirror removal

https://github.com/gentoo/gentoo/pull/36198

Signed-off-by: Nic Boet <nic@boet.cc>

commit 3fdc0b2175239f477bc63212020948229bd24693
Author: Nic Boet <nic@boet.cc>
Date: Sun Dec 4 21:09:34 2022 -0600

QA checks. lots of them

Signed-off-by: Nic Boet <nic@boet.cc>

commit 4164a8dc716c0e66e59ebcf4065c1bb3ba7d6234
Author: nic <nic@boet.cc>
Date: Sun Sep 19 19:02:09 2021 -0500

pkgcheck fixes

commit 4f938215055148eb49ec09e0c7cb707b80968838
Author: nic <nic@boet.cc>
Date: Sun Sep 19 18:53:07 2021 -0500

fix pkgcheck MissingSlash

commit b1f9e95b8de3ab29f34f5b71d44aecc362333d07
Author: nic <nic@boet.cc>
Date: Sat Sep 18 12:15:04 2021 -0500

stable cmatrix

commit 2b49a3d1c395f60aff320961dc18cbd3706332b5
Author: nic <nic@boet.cc>
Date: Sat Sep 18 12:12:14 2021 -0500

resurrect original cmatrix 1.2a