Move supported EAPI check on top, EXPORT_FUNCTIONS below guard.
Switch to using current working directory instead of ${S}
when initializing ${CMAKE_USE_DIR} and ${BUILD_DIR}.
Sort inherits.
Raise baseline cmake version to 3.20.5.
Bug:
https://bugs.gentoo.org/704524
Thanks-to: Arfrever Frehtes Taifersar Arahesis <
Arfrever@Apache.Org> Signed-off-by: Andreas Sturmlechner <
asturm@gentoo.org>
---
eclass/cmake.eclass | 95 +++++++++++++++++++++++++++++----------------
1 file changed, 62 insertions(+), 33 deletions(-)
diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass
index 4bd09459ea6..137dbc66017 100644
--- a/eclass/cmake.eclass
+++ b/eclass/cmake.eclass
@@ -9,7 +9,7 @@
# Maciej Mrozowski <
reavertm@gentoo.org>
# (undisclosed contributors)
# Original author: Zephyrus (
zephyrus@mirach.it)
-# @SUPPORTED_EAPIS: 7
+# @SUPPORTED_EAPIS: 7 8
# @BLURB: common ebuild functions for cmake-based packages
# @DESCRIPTION:
# The cmake eclass makes creating ebuilds for cmake-based packages much easier.
@@ -17,16 +17,25 @@
# out-of-source builds (default), in-source builds and an implementation of the
# well-known use_enable function for CMake.
+case ${EAPI} in
+ 7|8) ;;
+ *) die "${ECLASS}: EAPI=${EAPI:-0} is not supported" ;;
+esac
+
if [[ -z ${_CMAKE_ECLASS} ]]; then
_CMAKE_ECLASS=1
+inherit flag-o-matic multiprocessing ninja-utils toolchain-funcs xdg-utils
+
# @