[OE-core] [PATCH 2/2] base: add RRECOMMENDS to PACKAGECONFIG
Ross Burton
ross.burton at intel.com
Tue Sep 10 17:15:06 UTC 2013
Add a fifth optional element of the PACKAGECONFIG flags that can be used to set
RRECOMMENDS_${PN}.
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
meta/classes/base.bbclass | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 12c8741..651512a 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -394,7 +394,7 @@ python () {
# These take the form:
#
# PACKAGECONFIG ??= "<default options>"
- # PACKAGECONFIG[foo] = "--enable-foo,--disable-foo,foo_depends,foo_runtime_depends"
+ # PACKAGECONFIG[foo] = "--enable-foo,--disable-foo,foo_depends,foo_runtime_depends,foo_runtime_recommends"
pkgconfigflags = d.getVarFlags("PACKAGECONFIG") or {}
if pkgconfigflags:
pkgconfig = (d.getVar('PACKAGECONFIG', True) or "").split()
@@ -420,7 +420,7 @@ python () {
def appendVar(varname, appends):
if not appends:
return
- if "DEPENDS_" in varname:
+ if "DEPENDS_" in varname or "RRECOMMENDS_" in varname:
if pn.startswith("nativesdk-"):
appends = expandFilter(appends, "", "nativesdk-")
if pn.endswith("-native"):
@@ -432,14 +432,15 @@ python () {
extradeps = []
extrardeps = []
+ extrarrecs = []
extraconf = []
for flag, flagval in pkgconfigflags.items():
if flag == "defaultval":
continue
items = flagval.split(",")
num = len(items)
- if num > 4:
- bb.error("Only enable,disable,depend,rdepend can be specified!")
+ if num > 5:
+ bb.error("Only enable,disable,depend,rdepend,rrecommend can be specified!")
if flag in pkgconfig:
if items:
@@ -451,10 +452,13 @@ python () {
extradeps.append(items.pop(0))
if items:
extrardeps.append(items.pop(0))
+ if items:
+ extrarrecs.append(items.pop(0))
elif num >= 2 and items[1]:
extraconf.append(items[1])
appendVar('DEPENDS', extradeps)
appendVar('RDEPENDS_${PN}', extrardeps)
+ appendVar('RRECOMMENDS_${PN}', extrarrecs)
if bb.data.inherits_class('cmake', d):
appendVar('EXTRA_OECMAKE', extraconf)
else:
--
1.7.10.4
More information about the Openembedded-core
mailing list