[PATCH 2/2] Fix Meson Perl version check
- From
- Peter Oliver <p.d.oliver@mavit.org.uk>
- Date
- Jan 20, 2025, 16:03 UTC
- Message-ID
- <20250120160301.121245-2-git@mavit.org.uk>
- In-Reply-To
- <20250120160301.121245-1-git@mavit.org.uk>
Command `perl --version` says, e.g., “This is perl 5, version 26, subversion 0 (v5.26.0)”, which Meson interprets as version 26.
Signed-off-by: Peter Oliver <git@mavit.org.uk> --- meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build index f01d81b39f..bf129205ad 100644 --- a/meson.build +++ b/meson.build @@ -755,7 +755,11 @@ endif # Note that we only set NO_PERL if the Perl features were disabled by the user. # It may not be set when we have found Perl, but only use it to run tests. -perl = find_program('perl', version: '>=5.26.0', dirs: program_path, required: perl_required) +# +# When checking here, it would be better to say, +# version: '>=5.26.0', version_argument: '-eprint "$^V"' +# but that requires Meson 1.5.0, which at the time of writing is rather new. +perl = find_program('perl', version: '>=26', dirs: program_path, required: perl_required) perl_features_enabled = perl.found() and get_option('perl').allowed() if perl_features_enabled build_options_config.set('NO_PERL', '')
-- 2.48.1