1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-31 00:39:46 +00:00

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).

(From OE-Core rev: 51540b64f62234c145fc32cfa3fbbaaebbeece08)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton
2014-07-07 16:44:24 +01:00
committed by Richard Purdie
parent 42806c7c7b
commit 0a6dcf2f5b
+18 -16
View File
@@ -5,10 +5,7 @@ HOMEPAGE = "http://sites.google.com/site/fullycapable/"
LICENSE = "BSD | GPLv2" LICENSE = "BSD | GPLv2"
LIC_FILES_CHKSUM = "file://License;md5=3f84fd6f29d453a56514cb7e4ead25f1" LIC_FILES_CHKSUM = "file://License;md5=3f84fd6f29d453a56514cb7e4ead25f1"
DEPENDS = "attr perl-native-runtime" DEPENDS = "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"
SRC_URI = "${DEBIAN_MIRROR}/main/libc/libcap2/${BPN}2_${PV}.orig.tar.gz \ SRC_URI = "${DEBIAN_MIRROR}/main/libc/libcap2/${BPN}2_${PV}.orig.tar.gz \
file://fix-CAP_LAST_CAP.patch" file://fix-CAP_LAST_CAP.patch"
@@ -29,25 +26,30 @@ do_configure() {
sed -e '/shell gperf/cifeq (,yes)' -i libcap/Makefile sed -e '/shell gperf/cifeq (,yes)' -i libcap/Makefile
} }
EXTRA_OEMAKE = " \ PACKAGECONFIG ??= "attr ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
LIBATTR=yes \ PACKAGECONFIG_class-native ??= ""
PAM_CAP=${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'yes', 'no', d)} \
INDENT= SYSTEM_HEADERS=${STAGING_INCDIR} RAISE_SETFCAP=no \ PACKAGECONFIG[attr] = "LIBATTR=yes,LIBATTR=no,attr"
lib=${@os.path.basename('${libdir}')} \ PACKAGECONFIG[pam] = "PAM_CAP=yes,PAM_CAP=no,libpam"
"
EXTRA_OEMAKE_class-native = " \ EXTRA_OEMAKE += " \
LIBATTR=no \ INDENT= \
PAM_CAP=no \
INDENT= \
lib=${@os.path.basename('${libdir}')} \ lib=${@os.path.basename('${libdir}')} \
RAISE_SETFCAP=no \
" "
EXTRA_OEMAKE_append_class-target = " SYSTEM_HEADERS=${STAGING_INCDIR}"
do_compile() { do_compile() {
oe_runmake oe_runmake ${EXTRA_OECONF}
} }
do_install() { 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() { do_install_append() {