summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/libcap
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2014-07-07 16:44:24 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-08 11:19:49 +0100
commit51540b64f62234c145fc32cfa3fbbaaebbeece08 (patch)
treea20f028db2938853e114d299e493dd4375a909fa /meta/recipes-support/libcap
parentc050e5c9490e9e8e07db7fbd5e6c1e1dbef3bf8c (diff)
downloadopenembedded-core-51540b64f62234c145fc32cfa3fbbaaebbeece08.tar.gz
openembedded-core-51540b64f62234c145fc32cfa3fbbaaebbeece08.tar.bz2
openembedded-core-51540b64f62234c145fc32cfa3fbbaaebbeece08.zip
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@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/libcap')
-rw-r--r--meta/recipes-support/libcap/libcap.inc34
1 files changed, 18 insertions, 16 deletions
diff --git a/meta/recipes-support/libcap/libcap.inc b/meta/recipes-support/libcap/libcap.inc
index 08f4cfedde..a21420fd9b 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() {