summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/lib/recipetool/create_buildsys.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/lib/recipetool/create_buildsys.py b/scripts/lib/recipetool/create_buildsys.py
index 0ad748ef02..067be18c13 100644
--- a/scripts/lib/recipetool/create_buildsys.py
+++ b/scripts/lib/recipetool/create_buildsys.py
@@ -442,6 +442,7 @@ class AutotoolsRecipeHandler(RecipeHandler):
442 ac_init_re = re.compile('AC_INIT\(\s*([^,]+),\s*([^,]+)[,)].*') 442 ac_init_re = re.compile('AC_INIT\(\s*([^,]+),\s*([^,]+)[,)].*')
443 am_init_re = re.compile('AM_INIT_AUTOMAKE\(\s*([^,]+),\s*([^,]+)[,)].*') 443 am_init_re = re.compile('AM_INIT_AUTOMAKE\(\s*([^,]+),\s*([^,]+)[,)].*')
444 define_re = re.compile('\s*(m4_)?define\(\s*([^,]+),\s*([^,]+)\)') 444 define_re = re.compile('\s*(m4_)?define\(\s*([^,]+),\s*([^,]+)\)')
445 version_re = re.compile('([0-9.]+)')
445 446
446 defines = {} 447 defines = {}
447 def subst_defines(value): 448 def subst_defines(value):
@@ -488,6 +489,7 @@ class AutotoolsRecipeHandler(RecipeHandler):
488 for handler in handlers: 489 for handler in handlers:
489 if handler.process_macro(srctree, keyword, value, process_value, libdeps, pcdeps, deps, outlines, inherits, values): 490 if handler.process_macro(srctree, keyword, value, process_value, libdeps, pcdeps, deps, outlines, inherits, values):
490 return 491 return
492 logger.debug('Found keyword %s with value "%s"' % (keyword, value))
491 if keyword == 'PKG_CHECK_MODULES': 493 if keyword == 'PKG_CHECK_MODULES':
492 res = pkg_re.search(value) 494 res = pkg_re.search(value)
493 if res: 495 if res:
@@ -573,6 +575,17 @@ class AutotoolsRecipeHandler(RecipeHandler):
573 deps.append('swig-native') 575 deps.append('swig-native')
574 elif keyword == 'AX_PROG_XSLTPROC': 576 elif keyword == 'AX_PROG_XSLTPROC':
575 deps.append('libxslt-native') 577 deps.append('libxslt-native')
578 elif keyword in ['AC_PYTHON_DEVEL', 'AX_PYTHON_DEVEL', 'AM_PATH_PYTHON']:
579 pythonclass = 'pythonnative'
580 res = version_re.search(value)
581 if res:
582 if res.group(1).startswith('3'):
583 pythonclass = 'python3native'
584 # Avoid replacing python3native with pythonnative
585 if not pythonclass in inherits and not 'python3native' in inherits:
586 if 'pythonnative' in inherits:
587 inherits.remove('pythonnative')
588 inherits.append(pythonclass)
576 elif keyword == 'AX_WITH_CURSES': 589 elif keyword == 'AX_WITH_CURSES':
577 deps.append('ncurses') 590 deps.append('ncurses')
578 elif keyword == 'AX_PATH_BDB': 591 elif keyword == 'AX_PATH_BDB':
@@ -639,6 +652,9 @@ class AutotoolsRecipeHandler(RecipeHandler):
639 'AX_LIB_TAGLIB', 652 'AX_LIB_TAGLIB',
640 'AX_PKG_SWIG', 653 'AX_PKG_SWIG',
641 'AX_PROG_XSLTPROC', 654 'AX_PROG_XSLTPROC',
655 'AC_PYTHON_DEVEL',
656 'AX_PYTHON_DEVEL',
657 'AM_PATH_PYTHON',
642 'AX_WITH_CURSES', 658 'AX_WITH_CURSES',
643 'AX_PATH_BDB', 659 'AX_PATH_BDB',
644 'AX_PATH_LIB_PCRE', 660 'AX_PATH_LIB_PCRE',