1 |
For transition from cmake-utils.eclass to cmake.eclass. |
2 |
|
3 |
--- |
4 |
eclass/cmake-multilib.eclass | 26 ++++++++++++++++++++------ |
5 |
1 file changed, 20 insertions(+), 6 deletions(-) |
6 |
|
7 |
diff --git a/eclass/cmake-multilib.eclass b/eclass/cmake-multilib.eclass |
8 |
index 9d617900b73..2693d9c72e2 100644 |
9 |
--- a/eclass/cmake-multilib.eclass |
10 |
+++ b/eclass/cmake-multilib.eclass |
11 |
@@ -1,4 +1,4 @@ |
12 |
-# Copyright 1999-2018 Gentoo Foundation |
13 |
+# Copyright 1999-2019 Gentoo Authors |
14 |
# Distributed under the terms of the GNU General Public License v2 |
15 |
|
16 |
# @ECLASS: cmake-multilib.eclass |
17 |
@@ -19,6 +19,12 @@ |
18 |
# in multilib-minimal, yet they ought to call appropriate cmake-utils |
19 |
# phase rather than 'default'. |
20 |
|
21 |
+# @ECLASS-VARIABLE: CMAKE_ECLASS |
22 |
+# @DESCRIPTION: |
23 |
+# Default is "cmake-utils" for compatibility. Specify "cmake" for ebuilds |
24 |
+# that ported from cmake-utils.eclass to cmake.eclass already. |
25 |
+: ${CMAKE_ECLASS:=cmake-utils} |
26 |
+ |
27 |
case ${EAPI:-0} in |
28 |
[67]) ;; |
29 |
*) die "EAPI=${EAPI} is not supported" ;; |
30 |
@@ -28,7 +34,15 @@ if [[ ${CMAKE_IN_SOURCE_BUILD} ]]; then |
31 |
die "${ECLASS}: multilib support requires out-of-source builds." |
32 |
fi |
33 |
|
34 |
-inherit cmake-utils multilib-minimal |
35 |
+case ${CMAKE_ECLASS} in |
36 |
+ cmake-utils|cmake) ;; |
37 |
+ *) |
38 |
+ eerror "Unknown value for \${CMAKE_ECLASS}" |
39 |
+ die "Value ${CMAKE_ECLASS} is not supported" |
40 |
+ ;; |
41 |
+esac |
42 |
+ |
43 |
+inherit ${CMAKE_ECLASS} multilib-minimal |
44 |
|
45 |
EXPORT_FUNCTIONS src_configure src_compile src_test src_install |
46 |
|
47 |
@@ -39,7 +53,7 @@ cmake-multilib_src_configure() { |
48 |
} |
49 |
|
50 |
multilib_src_configure() { |
51 |
- cmake-utils_src_configure "${_cmake_args[@]}" |
52 |
+ ${CMAKE_ECLASS}_src_configure "${_cmake_args[@]}" |
53 |
} |
54 |
|
55 |
cmake-multilib_src_compile() { |
56 |
@@ -49,7 +63,7 @@ cmake-multilib_src_compile() { |
57 |
} |
58 |
|
59 |
multilib_src_compile() { |
60 |
- cmake-utils_src_compile "${_cmake_args[@]}" |
61 |
+ ${CMAKE_ECLASS}_src_compile "${_cmake_args[@]}" |
62 |
} |
63 |
|
64 |
cmake-multilib_src_test() { |
65 |
@@ -59,7 +73,7 @@ cmake-multilib_src_test() { |
66 |
} |
67 |
|
68 |
multilib_src_test() { |
69 |
- cmake-utils_src_test "${_cmake_args[@]}" |
70 |
+ ${CMAKE_ECLASS}_src_test "${_cmake_args[@]}" |
71 |
} |
72 |
|
73 |
cmake-multilib_src_install() { |
74 |
@@ -69,5 +83,5 @@ cmake-multilib_src_install() { |
75 |
} |
76 |
|
77 |
multilib_src_install() { |
78 |
- cmake-utils_src_install "${_cmake_args[@]}" |
79 |
+ ${CMAKE_ECLASS}_src_install "${_cmake_args[@]}" |
80 |
} |
81 |
--- |