From 38c2f168522e0f2f2c00556bd82808d34ef34a55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=B8rre=20Gaup?= Date: Sat, 14 Sep 2024 13:27:46 +0200 Subject: [PATCH] Semver thingy did not work --- .gut/delta.toml | 4 ++-- m4/giella-macros.m4 | 21 +++------------------ 2 files changed, 5 insertions(+), 20 deletions(-) diff --git a/.gut/delta.toml b/.gut/delta.toml index 153bba0..6836422 100644 --- a/.gut/delta.toml +++ b/.gut/delta.toml @@ -1,6 +1,6 @@ template = "https://github.com/giellalt/template-lang-und" -rev_id = 189 -template_sha = "5438107cc3b01d0ca6a436cc819b493886913aea" +rev_id = 188 +template_sha = "039269192c86bc4e92e4de05023c97b6fa16b3e5" [replacements] __REPO__ = "lang-chp" diff --git a/m4/giella-macros.m4 b/m4/giella-macros.m4 index c0a70b1..a439cec 100644 --- a/m4/giella-macros.m4 +++ b/m4/giella-macros.m4 @@ -674,7 +674,7 @@ AS_IF([test "x$enable_grammarchecker" != "xno"], then: pipx install git+https://github.com/divvun/giellaltgramtools ])]), AC_MSG_RESULT(yes)) -_gtgramtool_min_version=1.0.1 +_gtgramtool_min_version=0.7.0 gtgramtool_too_old_message="gtgramtool needs to be updated. If you installed it with pipx, run: pipx upgrade GiellaLTGramTools" @@ -683,25 +683,10 @@ AS_IF([test "x${GTGRAMTOOL}" != xno], [_gtgramtool_version=$( "${GTGRAMTOOL}" --version | sed -e 's/^.*version //')], [_gtgramtool_version=0]) AC_MSG_RESULT([$_gtgramtool_version]) - -# Function to compare version numbers -m4_define([compare_versions], [ - m4_split([_gtgramtool_version], [gtgramtool_version_parts], [\[\.\]]) - m4_split([_gtgramtool_min_version], [min_version_parts], [\[\.\]]) - gtgramtool_version_ok=yes - for i in 1 2 3; do - if test ${gtgramtool_version_parts[$i]} -lt ${min_version_parts[$i]}; then - gtgramtool_version_ok=no - break - elif test ${gtgramtool_version_parts[$i]} -gt ${min_version_parts[$i]}; then - break - fi - done -]) - AS_IF([test "x$enable_grammarchecker" != "xno"], AC_MSG_CHECKING([whether the gtgramtool version is at least $_gtgramtool_min_version]) - compare_versions + AX_COMPARE_VERSION([$_gtgramtool_version], [ge], [$_gtgramtool_min_version], + [gtgramtool_version_ok=yes], [gtgramtool_version_ok=no]) AS_IF([test "x${gtgramtool_version_ok}" != xno], [AC_MSG_RESULT([$gtgramtool_version_ok])], [AC_MSG_ERROR([$gtgramtool_too_old_message])]))