]> code.ossystems Code Review - openembedded-core.git/commitdiff
base.bbclass: Introduce PACKAGECONFIG_CONFARGS variable
authorMartin Jansa <martin.jansa@gmail.com>
Tue, 19 Apr 2016 10:31:40 +0000 (12:31 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 19 Apr 2016 13:46:51 +0000 (14:46 +0100)
* add separate variable for configuration options generated from
  PACKAGECONFIG setting, this helps other bbclasses and recipes
  to take advantage of PACKAGECONFIG mechanism, without including
  other options from EXTRA_OECONF
* e.g. meta-qt5 recipes are abusing EXTRA_OECONF to get options
  from PACKAGECONFIG:
  EXTRA_QMAKEVARS_PRE +=
  but with
  conf/distro/include/no-static-libs.inc
  it means getting --disable-static as invalid option inside
  EXTRA_QMAKEVARS_PRE as reported by Alexandre Belloni who tried
  to use poky with meta-qt5.
* once we migrate all bbclasses and recipes to PACKAGECONFIG_CONFARGS
  we should also restrict EXTRA_OECONF append only to autotools.bbclass
  like I did for cmake.bbclass

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/base.bbclass
meta/classes/cmake.bbclass

index f9697a9ad8a25abbf81964c851f040dd3e541fca..a7ca3a6676b2e0433559a285820c40ac84761710 100644 (file)
@@ -428,9 +428,12 @@ python () {
                     extraconf.append(items[1])
         appendVar('DEPENDS', extradeps)
         appendVar('RDEPENDS_${PN}', extrardeps)
-        if bb.data.inherits_class('cmake', d):
-            appendVar('EXTRA_OECMAKE', extraconf)
-        else:
+        appendVar('PACKAGECONFIG_CONFARGS', extraconf)
+
+        # TODO: once all recipes/classes abusing EXTRA_OECONF
+        # to get PACKAGECONFIG options are fixed to use PACKAGECONFIG_CONFARGS
+        # move this appendVar to autotools.bbclass.
+        if not bb.data.inherits_class('cmake', d):
             appendVar('EXTRA_OECONF', extraconf)
 
     pn = d.getVar('PN', True)
index 22cd61eb060398802195e25a8094115e11a664e2..02f313a861af6921b555b5b85fa45c5cf157aede 100644 (file)
@@ -27,6 +27,8 @@ OECMAKE_EXTRA_ROOT_PATH ?= ""
 OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM = "ONLY"
 OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM_class-native = "BOTH"
 
+EXTRA_OECMAKE_append = " ${PACKAGECONFIG_CONFARGS}"
+
 # CMake expects target architectures in the format of uname(2),
 # which do not always match TARGET_ARCH, so all the necessary
 # conversions should happen here.