Gentoo Archives: gentoo-dev

From: "Andreas K. Hüttel" <dilfridge@g.o>
To: gentoo-dev@l.g.o
Cc: "Andreas K. Hüttel" <dilfridge@g.o>
Subject: [gentoo-dev] [PATCH 5/5] depend.apache.eclass: Restructure pkg_setup so in_iuse is used from EAPI=6 on
Date: Thu, 08 Dec 2016 20:38:16
Message-Id: 20161208203632.2105-6-dilfridge@gentoo.org
In Reply to: [gentoo-dev] depend.apache.eclass rework, try 2 by "Andreas K. Hüttel"
1 ---
2 eclass/depend.apache.eclass | 31 +++++++++++++++++++------------
3 1 file changed, 19 insertions(+), 12 deletions(-)
4
5 diff --git a/eclass/depend.apache.eclass b/eclass/depend.apache.eclass
6 index 8582396..2d7b062 100644
7 --- a/eclass/depend.apache.eclass
8 +++ b/eclass/depend.apache.eclass
9 @@ -176,21 +176,28 @@ depend.apache_pkg_setup() {
10 fi
11
12 local myiuse=${1:-apache2}
13 - if has ${myiuse} ${IUSE}; then
14 - if use ${myiuse}; then
15 - case ${EAPI:-0} in
16 - 0|2|3|4|5)
17 +
18 + case ${EAPI:-0} in
19 + 0|2|3|4|5)
20 + if has ${myiuse} ${IUSE}; then
21 + if use ${myiuse}; then
22 _init_apache2
23 - ;;
24 - *)
25 + else
26 + _init_no_apache
27 + fi
28 + fi
29 + ;;
30 + *)
31 + if in_iuse ${myiuse}; then
32 + if use ${myiuse}; then
33 _init_apache2
34 _init_apache2_late
35 - ;;
36 - esac
37 - else
38 - _init_no_apache
39 - fi
40 - fi
41 + else
42 + _init_no_apache
43 + fi
44 + fi
45 + ;;
46 + esac
47 }
48
49 # @FUNCTION: want_apache
50 --
51 2.11.0.rc2