summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/base.bbclass20
1 files changed, 17 insertions, 3 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 7bfb1d1912..45f9435fd8 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -393,7 +393,7 @@ python () {
393 # These take the form: 393 # These take the form:
394 # 394 #
395 # PACKAGECONFIG ??= "<default options>" 395 # PACKAGECONFIG ??= "<default options>"
396 # PACKAGECONFIG[foo] = "--enable-foo,--disable-foo,foo_depends,foo_runtime_depends,foo_runtime_recommends" 396 # PACKAGECONFIG[foo] = "--enable-foo,--disable-foo,foo_depends,foo_runtime_depends,foo_runtime_recommends,foo_conflict_packageconfig"
397 pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {} 397 pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {}
398 if pkgconfigflags: 398 if pkgconfigflags:
399 pkgconfig = (d.getVar('PACKAGECONFIG') or "").split() 399 pkgconfig = (d.getVar('PACKAGECONFIG') or "").split()
@@ -440,8 +440,8 @@ python () {
440 for flag, flagval in sorted(pkgconfigflags.items()): 440 for flag, flagval in sorted(pkgconfigflags.items()):
441 items = flagval.split(",") 441 items = flagval.split(",")
442 num = len(items) 442 num = len(items)
443 if num > 5: 443 if num > 6:
444 bb.error("%s: PACKAGECONFIG[%s] Only enable,disable,depend,rdepend,rrecommend can be specified!" 444 bb.error("%s: PACKAGECONFIG[%s] Only enable,disable,depend,rdepend,rrecommend,conflict_packageconfig can be specified!"
445 % (d.getVar('PN'), flag)) 445 % (d.getVar('PN'), flag))
446 446
447 if flag in pkgconfig: 447 if flag in pkgconfig:
@@ -455,6 +455,20 @@ python () {
455 extraconf.append(items[0]) 455 extraconf.append(items[0])
456 elif num >= 2 and items[1]: 456 elif num >= 2 and items[1]:
457 extraconf.append(items[1]) 457 extraconf.append(items[1])
458
459 if num >= 6 and items[5]:
460 conflicts = set(items[5].split())
461 invalid = conflicts.difference(set(pkgconfigflags.keys()))
462 if invalid:
463 bb.error("%s: PACKAGECONFIG[%s] Invalid conflict package config%s '%s' specified."
464 % (d.getVar('PN'), flag, 's' if len(invalid) > 1 else '', ' '.join(invalid)))
465
466 if flag in pkgconfig:
467 intersec = conflicts.intersection(set(pkgconfig))
468 if intersec:
469 bb.fatal("%s: PACKAGECONFIG[%s] Conflict package config%s '%s' set in PACKAGECONFIG."
470 % (d.getVar('PN'), flag, 's' if len(intersec) > 1 else '', ' '.join(intersec)))
471
458 appendVar('DEPENDS', extradeps) 472 appendVar('DEPENDS', extradeps)
459 appendVar('RDEPENDS_${PN}', extrardeps) 473 appendVar('RDEPENDS_${PN}', extrardeps)
460 appendVar('RRECOMMENDS_${PN}', extrarrecs) 474 appendVar('RRECOMMENDS_${PN}', extrarrecs)