Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sun, 29 Dec 2019 13:04:11
Message-Id: 1577624622.c987d43ae1faefbbab7f82339622a854d237c14d.asturm@gentoo
1 commit: c987d43ae1faefbbab7f82339622a854d237c14d
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Dec 21 12:53:09 2019 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 29 13:03:42 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c987d43a
7
8 cmake-multilib.eclass: Add CMAKE_ECLASS switch
9
10 For transition from cmake-utils.eclass to cmake.eclass.
11
12 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
13
14 eclass/cmake-multilib.eclass | 26 ++++++++++++++++++++------
15 1 file changed, 20 insertions(+), 6 deletions(-)
16
17 diff --git a/eclass/cmake-multilib.eclass b/eclass/cmake-multilib.eclass
18 index 9d617900b73..2693d9c72e2 100644
19 --- a/eclass/cmake-multilib.eclass
20 +++ b/eclass/cmake-multilib.eclass
21 @@ -1,4 +1,4 @@
22 -# Copyright 1999-2018 Gentoo Foundation
23 +# Copyright 1999-2019 Gentoo Authors
24 # Distributed under the terms of the GNU General Public License v2
25
26 # @ECLASS: cmake-multilib.eclass
27 @@ -19,6 +19,12 @@
28 # in multilib-minimal, yet they ought to call appropriate cmake-utils
29 # phase rather than 'default'.
30
31 +# @ECLASS-VARIABLE: CMAKE_ECLASS
32 +# @DESCRIPTION:
33 +# Default is "cmake-utils" for compatibility. Specify "cmake" for ebuilds
34 +# that ported from cmake-utils.eclass to cmake.eclass already.
35 +: ${CMAKE_ECLASS:=cmake-utils}
36 +
37 case ${EAPI:-0} in
38 [67]) ;;
39 *) die "EAPI=${EAPI} is not supported" ;;
40 @@ -28,7 +34,15 @@ if [[ ${CMAKE_IN_SOURCE_BUILD} ]]; then
41 die "${ECLASS}: multilib support requires out-of-source builds."
42 fi
43
44 -inherit cmake-utils multilib-minimal
45 +case ${CMAKE_ECLASS} in
46 + cmake-utils|cmake) ;;
47 + *)
48 + eerror "Unknown value for \${CMAKE_ECLASS}"
49 + die "Value ${CMAKE_ECLASS} is not supported"
50 + ;;
51 +esac
52 +
53 +inherit ${CMAKE_ECLASS} multilib-minimal
54
55 EXPORT_FUNCTIONS src_configure src_compile src_test src_install
56
57 @@ -39,7 +53,7 @@ cmake-multilib_src_configure() {
58 }
59
60 multilib_src_configure() {
61 - cmake-utils_src_configure "${_cmake_args[@]}"
62 + ${CMAKE_ECLASS}_src_configure "${_cmake_args[@]}"
63 }
64
65 cmake-multilib_src_compile() {
66 @@ -49,7 +63,7 @@ cmake-multilib_src_compile() {
67 }
68
69 multilib_src_compile() {
70 - cmake-utils_src_compile "${_cmake_args[@]}"
71 + ${CMAKE_ECLASS}_src_compile "${_cmake_args[@]}"
72 }
73
74 cmake-multilib_src_test() {
75 @@ -59,7 +73,7 @@ cmake-multilib_src_test() {
76 }
77
78 multilib_src_test() {
79 - cmake-utils_src_test "${_cmake_args[@]}"
80 + ${CMAKE_ECLASS}_src_test "${_cmake_args[@]}"
81 }
82
83 cmake-multilib_src_install() {
84 @@ -69,5 +83,5 @@ cmake-multilib_src_install() {
85 }
86
87 multilib_src_install() {
88 - cmake-utils_src_install "${_cmake_args[@]}"
89 + ${CMAKE_ECLASS}_src_install "${_cmake_args[@]}"
90 }