diff options
author | Sven Vermeulen <swift@gentoo.org> | 2014-03-30 09:14:56 +0000 |
---|---|---|
committer | Sven Vermeulen <swift@gentoo.org> | 2014-03-30 09:14:56 +0000 |
commit | 23dd0455a76e0b180402e4928e05995bfbe3b2cd (patch) | |
tree | f2c60b319fd32a421aa11b168fe506e3c59e5888 /eclass/selinux-policy-2.eclass | |
parent | Wrong package :S (diff) | |
download | gentoo-2-23dd0455a76e0b180402e4928e05995bfbe3b2cd.tar.gz gentoo-2-23dd0455a76e0b180402e4928e05995bfbe3b2cd.tar.bz2 gentoo-2-23dd0455a76e0b180402e4928e05995bfbe3b2cd.zip |
Add support for USE triggered policy decisions in SELinux eclass
Diffstat (limited to 'eclass/selinux-policy-2.eclass')
-rw-r--r-- | eclass/selinux-policy-2.eclass | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/eclass/selinux-policy-2.eclass b/eclass/selinux-policy-2.eclass index c56298d4a9bd..a9de5554555f 100644 --- a/eclass/selinux-policy-2.eclass +++ b/eclass/selinux-policy-2.eclass @@ -1,6 +1,6 @@ -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/selinux-policy-2.eclass,v 1.20 2013/12/16 14:31:04 swift Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/selinux-policy-2.eclass,v 1.21 2014/03/30 09:14:56 swift Exp $ # Eclass for installing SELinux policy, and optionally # reloading the reference-policy based modules. @@ -205,7 +205,14 @@ selinux-policy-2_src_prepare() { # Build the SELinux policy module (.pp file) for just the selected module, and # this for each SELinux policy mentioned in POLICY_TYPES selinux-policy-2_src_compile() { + local makeuse="" + for useflag in ${IUSE}; + do + use ${useflag} && makeuse="${makeuse} -D use_${useflag}" + done for i in ${POLICY_TYPES}; do + # Support USE flags in builds + export M4PARAM="${makeuse}" # Parallel builds are broken, so we need to force -j1 here emake -j1 NAME=$i -C "${S}"/${i} || die "${i} compile failed" done |