Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: multilib@g.o, "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 1/3] Move wrapping conditionals to the wrapping functions.
Date: Wed, 23 Apr 2014 12:57:23
Message-Id: 1398257821-17286-1-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-dev] multilib RFC: improving wrapping compatibility with non-multilib and multilib-portage systems by "Michał Górny"
1 This way, we don't have to repeat them in each eclass involved, and we
2 make use of the low-level functions easier.
3 ---
4 eclass/cmake-multilib.eclass | 9 +++------
5 eclass/multilib-build.eclass | 4 ++++
6 eclass/multilib-minimal.eclass | 8 +++-----
7 3 files changed, 10 insertions(+), 11 deletions(-)
8
9 diff --git a/eclass/cmake-multilib.eclass b/eclass/cmake-multilib.eclass
10 index 02d6008..a6711bf 100644
11 --- a/eclass/cmake-multilib.eclass
12 +++ b/eclass/cmake-multilib.eclass
13 @@ -50,12 +50,9 @@ cmake-multilib_src_install() {
14 cmake-multilib_secure_install() {
15 cmake-utils_src_install "${@}"
16
17 - # Do multilib magic only when >1 ABI is used.
18 - if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then
19 - multilib_prepare_wrappers
20 - # Make sure all headers are the same for each ABI.
21 - multilib_check_headers
22 - fi
23 + multilib_prepare_wrappers
24 + # Make sure all headers are the same for each ABI.
25 + multilib_check_headers
26 }
27
28 multilib_foreach_abi cmake-multilib_secure_install "${@}"
29 diff --git a/eclass/multilib-build.eclass b/eclass/multilib-build.eclass
30 index 0ba54bf..02f9634 100644
31 --- a/eclass/multilib-build.eclass
32 +++ b/eclass/multilib-build.eclass
33 @@ -295,6 +295,8 @@ multilib_prepare_wrappers() {
34
35 [[ ${#} -le 1 ]] || die "${FUNCNAME}: too many arguments"
36
37 + [[ ${#MULTIBUILD_VARIANTS[@]} -le 1 ]] && return
38 +
39 local root=${1:-${ED}}
40 local f
41
42 @@ -419,6 +421,8 @@ multilib_install_wrappers() {
43
44 [[ ${#} -le 1 ]] || die "${FUNCNAME}: too many arguments"
45
46 + [[ ${#MULTIBUILD_VARIANTS[@]} -le 1 ]] && return
47 +
48 local root=${1:-${ED}}
49
50 if [[ -d "${ED}"/tmp/multilib-include ]]; then
51 diff --git a/eclass/multilib-minimal.eclass b/eclass/multilib-minimal.eclass
52 index 2fec9cf..4647127 100644
53 --- a/eclass/multilib-minimal.eclass
54 +++ b/eclass/multilib-minimal.eclass
55 @@ -108,11 +108,9 @@ multilib-minimal_src_install() {
56 emake DESTDIR="${D}" install
57 fi
58 fi
59 - # Do multilib magic only when >1 ABI is used.
60 - if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then
61 - multilib_prepare_wrappers
62 - multilib_check_headers
63 - fi
64 +
65 + multilib_prepare_wrappers
66 + multilib_check_headers
67 popd >/dev/null || die
68 }
69 multilib_foreach_abi multilib-minimal_abi_src_install
70 --
71 1.9.2