Skip to content

Commit e95536c

Browse files
author
Release Manager
committed
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: #36955 Reported by: Michael Orlitzky Reviewer(s): Matthias Köppe
2 parents f06727c + 5413732 commit e95536c

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

build/pkgs/configure/checksums.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
tarball=configure-VERSION.tar.gz
2-
sha1=2389d2b093493c568deda190ffc326ff2b835169
3-
md5=545e80b50deb4efa46f14d0a543ba98f
4-
cksum=169905223
2+
sha1=c8a4355b6eff4ef7bf3c655957bf2abf978daa11
3+
md5=fed0d0ef5e482358aa02735e1d23ed43
4+
cksum=1840240336
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
73e52a419812253c3c3ce72bab7f1a5ddf4c0461
1+
919036a577f296c03e87f195c34fc691454f79e3

build/pkgs/ninja_build/spkg-configure.m4

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ SAGE_SPKG_CONFIGURE(
33
dnl meson_python needs 1.8.2 or later
44
AC_CACHE_CHECK([for ninja >= 1.8.2], [ac_cv_path_NINJA], [
55
AC_PATH_PROGS_FEATURE_CHECK([NINJA], [ninja], [
6+
dnl support both two- and three-component version schemes
7+
dnl since samurai (a ninja alternative) uses two
68
ninja_version=`$ac_path_NINJA --version 2>&1 \
7-
| $SED -n -e 's/\([[0-9]]*\.[[0-9]]*\.[[0-9]]*\).*/\1/p'`
9+
| $SED -n -e 's/\([[0-9]]*\(\.[[0-9]]*\)\{1,2\}\).*/\1/p'`
810
AS_IF([test -n "$ninja_version"], [
911
AX_COMPARE_VERSION([$ninja_version], [ge], [1.8.2], [
1012
ac_cv_path_NINJA="$ac_path_NINJA"

0 commit comments

Comments
 (0)