[oe-commits] Ross Burton : libcap: use PACKAGECONFIG for attr and pam configurations

git at git.openembedded.org git at git.openembedded.org
Tue Jul 8 10:20:42 UTC 2014


Module: openembedded-core.git
Branch: master
Commit: 51540b64f62234c145fc32cfa3fbbaaebbeece08
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=51540b64f62234c145fc32cfa3fbbaaebbeece08

Author: Ross Burton <ross.burton at intel.com>
Date:   Mon Jul  7 16:44:24 2014 +0100

libcap: use PACKAGECONFIG for attr and pam configurations

Instead of hard-coding PAM/xattr on for target and off for native, slightly
abuse PACKAGECONFIG to add options (and pass them to make in do_compile).

Signed-off-by: Ross Burton <ross.burton at intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-support/libcap/libcap.inc | 34 ++++++++++++++++++----------------
 1 file changed, 18 insertions(+), 16 deletions(-)

diff --git a/meta/recipes-support/libcap/libcap.inc b/meta/recipes-support/libcap/libcap.inc
index 08f4cfe..a21420f 100644
--- a/meta/recipes-support/libcap/libcap.inc
+++ b/meta/recipes-support/libcap/libcap.inc
@@ -5,10 +5,7 @@ HOMEPAGE = "http://sites.google.com/site/fullycapable/"
 LICENSE = "BSD | GPLv2"
 LIC_FILES_CHKSUM = "file://License;md5=3f84fd6f29d453a56514cb7e4ead25f1"
 
-DEPENDS = "attr perl-native-runtime"
-DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-# attr and pam are disabled by EXTRA_OEMAKE_class-native
-DEPENDS_class-native = "perl-native-runtime"
+DEPENDS = "perl-native-runtime"
 
 SRC_URI = "${DEBIAN_MIRROR}/main/libc/libcap2/${BPN}2_${PV}.orig.tar.gz \
            file://fix-CAP_LAST_CAP.patch"
@@ -29,25 +26,30 @@ do_configure() {
 	sed -e '/shell gperf/cifeq (,yes)' -i libcap/Makefile
 }
 
-EXTRA_OEMAKE = " \
-  LIBATTR=yes \
-  PAM_CAP=${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)} \
-  INDENT= SYSTEM_HEADERS=${STAGING_INCDIR} RAISE_SETFCAP=no \
-  lib=${@os.path.basename('${libdir}')} \
-"
-EXTRA_OEMAKE_class-native = " \
-  LIBATTR=no \
-  PAM_CAP=no \
-  INDENT= \
+PACKAGECONFIG ??= "attr ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
+PACKAGECONFIG_class-native ??= ""
+
+PACKAGECONFIG[attr] = "LIBATTR=yes,LIBATTR=no,attr"
+PACKAGECONFIG[pam] = "PAM_CAP=yes,PAM_CAP=no,libpam"
+
+EXTRA_OEMAKE += " \
+  INDENT=  \
   lib=${@os.path.basename('${libdir}')} \
+  RAISE_SETFCAP=no \
 "
 
+EXTRA_OEMAKE_append_class-target = " SYSTEM_HEADERS=${STAGING_INCDIR}"
+
 do_compile() {
-	oe_runmake
+	oe_runmake ${EXTRA_OECONF}
 }
 
 do_install() {
-	oe_runmake install DESTDIR="${D}" prefix="${prefix}" SBINDIR="${D}${sbindir}"
+	oe_runmake install \
+		${EXTRA_OECONF} \
+		DESTDIR="${D}" \
+		prefix="${prefix}" \
+		SBINDIR="${D}${sbindir}"
 }
 
 do_install_append() {



More information about the Openembedded-commits mailing list