From: Jan Nieuwenhuizen Date: Sun, 17 Apr 2005 09:53:17 +0000 (+0000) Subject: (test_program): Bugfix for double digit version compares, use X-Git-Tag: release/2.5.20~26 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=c191df5a421bb7e642d3e24cc047d0e9e7ff6ae9;p=lilypond.git (test_program): Bugfix for double digit version compares, use integer (not string-) compare. --- diff --git a/ChangeLog b/ChangeLog index eff4abf938..48e7c450a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ 2005-04-17 Jan Nieuwenhuizen * SConstruct: Require pkg-config. + (test_program): Bugfix for double digit version compares, use + integer (not string-) compare. * stepmake/aclocal.m4 (STEPMAKE_PANGO_FT2): Define HAVE_PANGO16 too. diff --git a/SConstruct b/SConstruct index fb52df0540..e85691077b 100644 --- a/SConstruct +++ b/SConstruct @@ -235,7 +235,8 @@ def list_sort (lst): def configure (target, source, env): - vre = re.compile ('^.*[^-.0-9]([0-9][0-9]*\.[0-9][.0-9]*).*$', re.DOTALL) + vre = re.compile ('^.*[^-.0-9]([0-9][0-9]*\.[0-9][.0-9]*).*$', + re.DOTALL) def get_version (program): command = '(pkg-config --modversion %(program)s || %(program)s --version || %(program)s -V) 2>&1' % vars () pipe = os.popen (command) @@ -257,7 +258,8 @@ def configure (target, source, env): return 0 sys.stdout.write (string.join (actual, '.')) sys.stdout.write ('\n') - if actual < string.split (minimal, '.'): + if map (string.atoi, actual) \ + < map (string.atoi, string.split (minimal, '.')): lst.append ((description, package, minimal, program, string.join (actual, '.'))) return 0