summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/lib/oeqa/selftest/recipetool.py4
-rw-r--r--scripts/lib/recipetool/create_buildsys.py18
2 files changed, 16 insertions, 6 deletions
diff --git a/meta/lib/oeqa/selftest/recipetool.py b/meta/lib/oeqa/selftest/recipetool.py
index 4103a88fad..927da73e6f 100644
--- a/meta/lib/oeqa/selftest/recipetool.py
+++ b/meta/lib/oeqa/selftest/recipetool.py
@@ -383,7 +383,7 @@ class RecipetoolTests(RecipetoolBase):
383 @testcase(1194) 383 @testcase(1194)
384 def test_recipetool_create_git(self): 384 def test_recipetool_create_git(self):
385 # Ensure we have the right data in shlibs/pkgdata 385 # Ensure we have the right data in shlibs/pkgdata
386 bitbake('libpng pango libx11 libxext jpeg') 386 bitbake('libpng pango libx11 libxext jpeg libxsettings-client libcheck')
387 # Try adding a recipe 387 # Try adding a recipe
388 tempsrc = os.path.join(self.tempdir, 'srctree') 388 tempsrc = os.path.join(self.tempdir, 'srctree')
389 os.makedirs(tempsrc) 389 os.makedirs(tempsrc)
@@ -397,7 +397,7 @@ class RecipetoolTests(RecipetoolBase):
397 checkvars['S'] = '${WORKDIR}/git' 397 checkvars['S'] = '${WORKDIR}/git'
398 checkvars['PV'] = '1.11+git${SRCPV}' 398 checkvars['PV'] = '1.11+git${SRCPV}'
399 checkvars['SRC_URI'] = srcuri 399 checkvars['SRC_URI'] = srcuri
400 checkvars['DEPENDS'] = set(['libjpeg-turbo', 'libpng', 'libx11', 'libxext', 'pango']) 400 checkvars['DEPENDS'] = set(['libcheck', 'libjpeg-turbo', 'libpng', 'libx11', 'libxsettings-client', 'libxext', 'pango'])
401 inherits = ['autotools', 'pkgconfig'] 401 inherits = ['autotools', 'pkgconfig']
402 self._test_recipe_contents(recipefile, checkvars, inherits) 402 self._test_recipe_contents(recipefile, checkvars, inherits)
403 403
diff --git a/scripts/lib/recipetool/create_buildsys.py b/scripts/lib/recipetool/create_buildsys.py
index 1674aba28a..7fedb2a917 100644
--- a/scripts/lib/recipetool/create_buildsys.py
+++ b/scripts/lib/recipetool/create_buildsys.py
@@ -157,12 +157,13 @@ class AutotoolsRecipeHandler(RecipeHandler):
157 progclassmap = {'gconftool-2': 'gconf', 157 progclassmap = {'gconftool-2': 'gconf',
158 'pkg-config': 'pkgconfig'} 158 'pkg-config': 'pkgconfig'}
159 159
160 ignoredeps = ['gcc-runtime', 'glibc', 'uclibc', 'tar-native', 'binutils-native'] 160 ignoredeps = ['gcc-runtime', 'glibc', 'uclibc', 'musl', 'tar-native', 'binutils-native']
161 ignorelibs = ['socket'] 161 ignorelibs = ['socket']
162 162
163 pkg_re = re.compile('PKG_CHECK_MODULES\(\[?[a-zA-Z0-9]*\]?, \[?([^,\]]*)[),].*') 163 pkg_re = re.compile('PKG_CHECK_MODULES\(\[?[a-zA-Z0-9_]*\]?, *\[?([^,\]]*)\]?[),].*')
164 lib_re = re.compile('AC_CHECK_LIB\(\[?([a-zA-Z0-9]*)\]?, .*') 164 pkgce_re = re.compile('PKG_CHECK_EXISTS\(\[?([^,\]]*)\]?[),].*')
165 progs_re = re.compile('_PROGS?\(\[?[a-zA-Z0-9]*\]?, \[?([^,\]]*)\]?[),].*') 165 lib_re = re.compile('AC_CHECK_LIB\(\[?([^,\]]*)\]?,.*')
166 progs_re = re.compile('_PROGS?\(\[?[a-zA-Z0-9_]*\]?, \[?([^,\]]*)\]?[),].*')
166 dep_re = re.compile('([^ ><=]+)( [<>=]+ [^ ><=]+)?') 167 dep_re = re.compile('([^ ><=]+)( [<>=]+ [^ ><=]+)?')
167 ac_init_re = re.compile('AC_INIT\(([^,]+), *([^,]+)[,)].*') 168 ac_init_re = re.compile('AC_INIT\(([^,]+), *([^,]+)[,)].*')
168 am_init_re = re.compile('AM_INIT_AUTOMAKE\(([^,]+), *([^,]+)[,)].*') 169 am_init_re = re.compile('AM_INIT_AUTOMAKE\(([^,]+), *([^,]+)[,)].*')
@@ -249,6 +250,13 @@ class AutotoolsRecipeHandler(RecipeHandler):
249 if res: 250 if res:
250 pcdeps.extend([x[0] for x in res]) 251 pcdeps.extend([x[0] for x in res])
251 inherits.append('pkgconfig') 252 inherits.append('pkgconfig')
253 elif keyword == 'PKG_CHECK_EXISTS':
254 res = pkgce_re.search(value)
255 if res:
256 res = dep_re.findall(res.group(1))
257 if res:
258 pcdeps.extend([x[0] for x in res])
259 inherits.append('pkgconfig')
252 elif keyword in ('AM_GNU_GETTEXT', 'AM_GLIB_GNU_GETTEXT', 'GETTEXT_PACKAGE'): 260 elif keyword in ('AM_GNU_GETTEXT', 'AM_GLIB_GNU_GETTEXT', 'GETTEXT_PACKAGE'):
253 inherits.append('gettext') 261 inherits.append('gettext')
254 elif keyword in ('AC_PROG_INTLTOOL', 'IT_PROG_INTLTOOL'): 262 elif keyword in ('AC_PROG_INTLTOOL', 'IT_PROG_INTLTOOL'):
@@ -313,6 +321,7 @@ class AutotoolsRecipeHandler(RecipeHandler):
313 defines[key] = value 321 defines[key] = value
314 322
315 keywords = ['PKG_CHECK_MODULES', 323 keywords = ['PKG_CHECK_MODULES',
324 'PKG_CHECK_EXISTS',
316 'AM_GNU_GETTEXT', 325 'AM_GNU_GETTEXT',
317 'AM_GLIB_GNU_GETTEXT', 326 'AM_GLIB_GNU_GETTEXT',
318 'GETTEXT_PACKAGE', 327 'GETTEXT_PACKAGE',
@@ -375,6 +384,7 @@ class AutotoolsRecipeHandler(RecipeHandler):
375 384
376 recipemap = read_pkgconfig_provides(tinfoil.config_data) 385 recipemap = read_pkgconfig_provides(tinfoil.config_data)
377 unmapped = [] 386 unmapped = []
387 pcdeps = list(set(pcdeps))
378 for pcdep in pcdeps: 388 for pcdep in pcdeps:
379 recipe = recipemap.get(pcdep, None) 389 recipe = recipemap.get(pcdep, None)
380 if recipe: 390 if recipe: