summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorKévin THIERRY <kevin.thierry@open.eurogiciel.org>2014-10-10 15:21:39 +0200
committerKévin THIERRY <kevin.thierry@open.eurogiciel.org>2014-10-10 15:25:59 +0200
commit6b3dbda55538d017ebb4192eb2e04a89f3f07a36 (patch)
tree902d080a7edd855209659fc26e24dc0c1ff7e78f /tools
parente1652493461d2fbd6e230d2dba1090f79c2faefe (diff)
downloadtizen-6b3dbda55538d017ebb4192eb2e04a89f3f07a36.tar.gz
tizen-6b3dbda55538d017ebb4192eb2e04a89f3f07a36.tar.bz2
tizen-6b3dbda55538d017ebb4192eb2e04a89f3f07a36.zip
Automatically add build dependency on pkgconfig
If a spec file contains a build dependecy with the form 'pkgconfig(<pkg-name>)', automatically add a build dependency on pkgconfig. Change-Id: If6b3876658658859d4a5576b9678fb6fdf255d04 Signed-off-by: Kévin THIERRY <kevin.thierry@open.eurogiciel.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/spec2yocto.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/spec2yocto.py b/tools/spec2yocto.py
index 0313dccb7..16497fa4a 100755
--- a/tools/spec2yocto.py
+++ b/tools/spec2yocto.py
@@ -1375,9 +1375,14 @@ Group: devel
'''
package_replacement = SPEC2YOCTO_CONFIG.get_substitute()
build_requires_res = []
+ pkgconfig = 0
for line in lines:
build_requires = re.findall( RePattern.buildRequiresPackage, line )
for tmp_res in build_requires:
+ # If a dependency uses pkgconfig, explicitely add pkgconfig as a dependency.
+ if pkgconfig == 0 and 'pkgconfig' in tmp_res:
+ build_requires_res.append(['pkgconfig', '', ''])
+ pkgconfig = 1
for tmp_clean in self.__clean_package_line( tmp_res ):
if len( tmp_clean ) >= 1:
if tmp_clean[0] in package_replacement.keys():