summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-01-21 18:52:40 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-01-21 18:52:40 +0000
commitf29eb0598f62fc3b5f09f2de5a89c0437c6164d9 (patch)
treee33392cbdd10d91ad30cb2a65130c1fb1e5ca8ac /eclass
parent032a3dbb5d4ea63ec6c2ceb39c067ea6424b5792 (diff)
gentoo resync : 21.01.2020
Diffstat (limited to 'eclass')
-rw-r--r--eclass/Manifest.gzbin36966 -> 36959 bytes
-rw-r--r--eclass/ros-catkin.eclass33
2 files changed, 24 insertions, 9 deletions
diff --git a/eclass/Manifest.gz b/eclass/Manifest.gz
index 029557a853b5..62d5b03f1cde 100644
--- a/eclass/Manifest.gz
+++ b/eclass/Manifest.gz
Binary files differ
diff --git a/eclass/ros-catkin.eclass b/eclass/ros-catkin.eclass
index d560f804e65d..b096fd477107 100644
--- a/eclass/ros-catkin.eclass
+++ b/eclass/ros-catkin.eclass
@@ -12,11 +12,21 @@
# Provides function for building ROS packages on Gentoo.
# It supports selectively building messages, multi-python installation, live ebuilds (git only).
+# @ECLASS-VARIABLE: CMAKE_ECLASS
+# @INTERNAL
+# @DEFAULT_UNSET
+# @DESCRIPTION:
+# Set to "cmake-utils" for EAPI 5 and 6, "cmake" for EAPI-7.
+
case "${EAPI:-0}" in
0|1|2|3|4)
die "EAPI='${EAPI}' is not supported"
;;
+ [56])
+ CMAKE_ECLASS=cmake-utils
+ ;;
*)
+ CMAKE_ECLASS=cmake
;;
esac
@@ -51,7 +61,7 @@ fi
# most certainly be something pulling python anyway.
PYTHON_COMPAT=( python3_6 )
-inherit ${SCM} python-r1 cmake-utils flag-o-matic
+inherit ${SCM} python-r1 ${CMAKE_ECLASS} flag-o-matic
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
@@ -134,13 +144,13 @@ HOMEPAGE="https://wiki.ros.org/${PN} ${ROS_REPO_URI}"
# @FUNCTION: ros-catkin_src_prepare
# @DESCRIPTION:
-# Calls cmake-utils_src_prepare (so that PATCHES array is handled there) and initialises the workspace
+# Calls cmake_src_prepare (so that PATCHES array is handled there) and initialises the workspace
# by installing a recursive CMakeLists.txt to handle bundles.
ros-catkin_src_prepare() {
# If no multibuild, just use cmake IN_SOURCE support
[ -n "${CATKIN_IN_SOURCE_BUILD}" ] && export CMAKE_IN_SOURCE_BUILD=yes
- cmake-utils_src_prepare
+ ${CMAKE_ECLASS}_src_prepare
if [ ! -f "${S}/CMakeLists.txt" ] ; then
catkin_init_workspace || die
@@ -187,7 +197,7 @@ ros-catkin_src_configure() {
fi
local mycmakeargs=(
- "$(cmake-utils_use test CATKIN_ENABLE_TESTING)"
+ "-DCATKIN_ENABLE_TESTING=$(usex test)"
"-DCATKIN_BUILD_BINARY_PACKAGE=ON"
"-DCATKIN_PREFIX_PATH=${SYSROOT:-${EROOT}}/usr"
"${mycatkincmakeargs[@]}"
@@ -202,7 +212,7 @@ ros-catkin_src_configure() {
export CMAKE_USE_DIR="${BUILD_DIR}"
fi
- cmake-utils_src_configure "${@}"
+ ${CMAKE_ECLASS}_src_configure "${@}"
}
# @FUNCTION: ros-catkin_src_compile
@@ -210,7 +220,7 @@ ros-catkin_src_configure() {
# Builds a catkin-based package.
ros-catkin_src_compile() {
ros-catkin_python_setup
- cmake-utils_src_compile "${@}"
+ ${CMAKE_ECLASS}_src_compile "${@}"
}
# @FUNCTION: ros-catkin_src_test
@@ -226,8 +236,13 @@ ros-catkin_src_test() {
einfo "Regenerating setup_cached.sh for tests"
${PYTHON:-python} catkin_generated/generate_cached_setup.py || die
fi
- nonfatal cmake-utils_src_make tests
- cmake-utils_src_test "${@}"
+
+ if [[ ${CMAKE_ECLASS} = cmake-utils ]]; then
+ nonfatal cmake-utils_src_make tests
+ else
+ nonfatal cmake_build tests
+ fi
+ ${CMAKE_ECLASS}_src_test "${@}"
}
# @FUNCTION: ros-catkin_src_install
@@ -240,7 +255,7 @@ ros-catkin_src_install() {
export CMAKE_USE_DIR="${BUILD_DIR}"
fi
- cmake-utils_src_install "${@}"
+ ${CMAKE_ECLASS}_src_install "${@}"
if [ ! -f "${T}/.catkin_python_symlinks_generated" -a -d "${D}/${PYTHON_SCRIPTDIR}" ]; then
dodir /usr/bin
for i in "${D}/${PYTHON_SCRIPTDIR}"/* ; do