From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mail.openembedded.org (Postfix) with ESMTP id E310671EC3 for ; Mon, 16 Feb 2015 15:07:11 +0000 (UTC) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP; 16 Feb 2015 06:59:01 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,588,1418112000"; d="scan'208";a="528207407" Received: from sentry.rb.intel.com ([10.237.105.37]) by orsmga003.jf.intel.com with ESMTP; 16 Feb 2015 06:57:56 -0800 From: Cristian Iorga To: openembedded-core@lists.openembedded.org Date: Mon, 16 Feb 2015 17:06:11 +0200 Message-Id: <4b1c009d55f164694181da94caf31f985ba2e10c.1424098977.git.cristian.iorga@intel.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: References: In-Reply-To: References: Subject: [PATCH 01/11] bluetooth.bbclass: simplify recipe inference of bluetooth provider X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Feb 2015 15:07:12 -0000 From: "Peter A. Bigot" Defines ${BLUEZ} to be the provider of bluez services as specified by DISTRO_FEATURES. Example recipe fragment: inherit bluetooth PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} PACKAGECONFIG[bluez4] = "--enable-bluetooth,--disable-bluetooth,bluez4" PACKAGECONFIG[bluez5] = "--enable-bluez5,--disable-bluez5,bluez5" [YOCTO #5031] Signed-off-by: Peter A. Bigot --- meta/classes/bluetooth.bbclass | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 meta/classes/bluetooth.bbclass diff --git a/meta/classes/bluetooth.bbclass b/meta/classes/bluetooth.bbclass new file mode 100644 index 0000000..f88b4ae --- /dev/null +++ b/meta/classes/bluetooth.bbclass @@ -0,0 +1,14 @@ +# Avoid code duplication in bluetooth-dependent recipes. + +# Define a variable that expands to the recipe (package) providing core +# bluetooth support on the platform: +# "" if bluetooth is not in DISTRO_FEATURES +# else "bluez5" if bluez5 is in DISTRO_FEATURES +# else "bluez4" + +# Use this with: +# inherit bluetooth +# PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} +# PACKAGECONFIG[bluez4] = "--enable-bluez4,--disable-bluez4,bluez4" + +BLUEZ ?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5', 'bluez4', d), '', d)}" -- 2.1.0