summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--waftools/checks/custom.py4
-rw-r--r--waftools/inflector.py4
2 files changed, 5 insertions, 3 deletions
diff --git a/waftools/checks/custom.py b/waftools/checks/custom.py
index 964546977b..017b503e52 100644
--- a/waftools/checks/custom.py
+++ b/waftools/checks/custom.py
@@ -75,13 +75,15 @@ def check_lua(ctx, dependency_identifier):
[lv for lv in lua_versions if lv[0] == ctx.options.LUA_VER]
for lua_version, pkgconfig_query in lua_versions:
+ display_version = lua_version
+ lua_version = inflector.sanitize_id(lua_version)
if check_pkg_config(pkgconfig_query, uselib_store=lua_version) \
(ctx, dependency_identifier):
# XXX: this is a bit of a hack, ask waf developers if I can copy
# the uselib_store to 'lua'
ctx.mark_satisfied(lua_version)
ctx.add_optional_message(dependency_identifier,
- 'version found: ' + lua_version)
+ 'version found: ' + display_version)
return True
return False
diff --git a/waftools/inflector.py b/waftools/inflector.py
index 184c74a3bf..3aa1bc1f99 100644
--- a/waftools/inflector.py
+++ b/waftools/inflector.py
@@ -1,6 +1,6 @@
import re
-def _underscore(word):
+def sanitize_id(word):
""" Converts a word "into_it_s_underscored_version"
Convert any "CamelCased" or "ordinary Word" into an
"underscored_word"."""
@@ -10,7 +10,7 @@ def _underscore(word):
re.sub('([A-Z]+)([A-Z][a-z])', '\\1_\\2', re.sub('::', '/', word)))).lower()
def storage_key(dep):
- return _underscore(dep)
+ return sanitize_id(dep)
def define_key(dep):
return ("have_" + storage_key(dep)).upper()