gh-36955: build/pkgs/ninja_build: support samurai version scheme
Samurai is a C99 ninja implementation with an almost-compatible version
scheme, except that it has only two version components instead of the
three that ninja has. We update the "sed" call used to parse the version
number out of `ninja --version` so that it can parse a samurai version
too.
This should only matter on systems where (for example) /usr/bin/ninja
points to samurai. That's not typical, but it recently became possible
to do on Gentoo in an "official" way.
URL: https://github.com/sagemath/sage/pull/36955
Reported by: Michael Orlitzky
Reviewer(s): Matthias Köppe
Committer
Release Manager