From 51540b64f62234c145fc32cfa3fbbaaebbeece08 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Mon, 7 Jul 2014 16:44:24 +0100 Subject: 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 Signed-off-by: Richard Purdie --- meta/recipes-support/libcap/libcap.inc | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'meta/recipes-support/libcap') 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() { -- cgit 1.2.3-korg