Current version of Samurai is compatible with Ninja 1.9.0. It has fewer dependencies and is a simpler implementation than Ninja. Alpine Linux uses Samurai instead of Ninja (see  for the original proposal about this). CMake and Meson have native support for it nowadays. This does the rest and hooks it up to the framework to make it trivial to experiment with it. OpenBSD Ports has a similar USE_NINJA=samurai knob for this but only for cmake-based ports.
I do like it, I would be interested in a exp-run with both to see if there is any difference, I bet ninja vs samurai itself won't bring anything, but the fact we don't need python do build samurai, will make project using ninja (well samurai here ;)) appear earlier in the build process which may have an impact.
- export SAMUFLAGS to make samu builds respect MAKE_JOBS_NUMBER
Apparently ninja defaults to running things in parallel, but samu does not.
Edit: hmm, no I think I'm wrong here, but SAMUFLAGS should be set regardless since some ports (for example, sysutils/fluxengine) just call ninja without any args and do not respect MAKE_JOBS_NUMBER without it.
- Fix x11-wm/mutter build order bug with patch from Aports
- Fix x11/brisk-menu build order bug
- Add missing USES=python:build to some ports that got it through ninja previously
- Fix lang/swi-pl build by adding missing USES=readline (previously implicit through ninja->python->readline)
- Only append -v to MAKE_ARGS when using ninja. samu already gets it via SAMUFLAGS. ninja supports GNU-style arguments (flags in any order) while samu does not and -v gets added last. This should fix the immediate error in www/chromium (build goes further but complete build untested)
- More missing USES=python:build fixes
- Add explicit USES=ninja:build to multimedia/handbrake (previously got it through meson but now needs the samu alias)
- Attempt to fix build order bug in x11-fonts/font-manager
- devel/meson, Mk/Uses/meson.mk: Do not force color output
By default Meson forces color output. Ninja strips the escape
sequences before they go into the log. Samurai does not do that,
so we end up with some garbage in the logs. Pass -Db_colorout=never
to Meson to disable colors in general. Also see
This requires a small backport in devel/meson since the b_colorout
option is broken with Clang at the moment.