summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2022-06-23 11:06:23 +0200
committerAlexis Ballier <aballier@gentoo.org>2022-06-23 13:10:32 +0200
commitdf81a0104c301303b0a7c2f4ea1d74dcb9e6a699 (patch)
tree24f0ed69e5ca06b44499460ea87d76938b1447c3 /dev-ros
parentwww-apps/nikola: Replace optional runtime dependencies by optfeature (diff)
downloadgentoo-df81a0104c301303b0a7c2f4ea1d74dcb9e6a699.tar.gz
gentoo-df81a0104c301303b0a7c2f4ea1d74dcb9e6a699.tar.bz2
gentoo-df81a0104c301303b0a7c2f4ea1d74dcb9e6a699.zip
dev-ros/ament_cmake_core: use unversionned python when building for gentoo
this honours EPYTHON Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Alexis Ballier <aballier@gentoo.org>
Diffstat (limited to 'dev-ros')
-rw-r--r--dev-ros/ament_cmake_core/ament_cmake_core-1.3.0-r1.ebuild47
-rw-r--r--dev-ros/ament_cmake_core/ament_cmake_core-9999.ebuild3
-rw-r--r--dev-ros/ament_cmake_core/files/findpython.patch15
3 files changed, 64 insertions, 1 deletions
diff --git a/dev-ros/ament_cmake_core/ament_cmake_core-1.3.0-r1.ebuild b/dev-ros/ament_cmake_core/ament_cmake_core-1.3.0-r1.ebuild
new file mode 100644
index 000000000000..3e96c689fcb9
--- /dev/null
+++ b/dev-ros/ament_cmake_core/ament_cmake_core-1.3.0-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 2019-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit cmake python-any-r1
+
+ROS_PN="ament_cmake"
+if [ "${PV#9999}" != "${PV}" ] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/ament/ament_cmake"
+ SRC_URI=""
+ S=${WORKDIR}/${P}/${PN}
+else
+ SRC_URI="https://github.com/ament/ament_cmake/archive/${PV}.tar.gz -> ${ROS_PN}-${PV}.tar.gz"
+ S="${WORKDIR}/${ROS_PN}-${PV}/${PN}"
+fi
+
+DESCRIPTION="The core of the ament buildsystem in CMake"
+HOMEPAGE="https://github.com/ament/ament_cmake"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+if [ "${PV#9999}" != "${PV}" ] ; then
+ PROPERTIES="live"
+else
+ KEYWORDS="~amd64"
+fi
+IUSE=""
+PATCHES=( "${FILESDIR}/findpython.patch" )
+
+RDEPEND="
+ dev-python/ament_package
+ dev-python/catkin_pkg
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ $(python_gen_any_dep 'dev-python/ament_package[${PYTHON_USEDEP}] dev-python/catkin_pkg[${PYTHON_USEDEP}]')
+ ${PYTHON_DEPS}
+"
+
+python_check_deps() {
+ has_version "dev-python/ament_package[${PYTHON_USEDEP}]" && \
+ has_version "dev-python/catkin_pkg[${PYTHON_USEDEP}]"
+}
diff --git a/dev-ros/ament_cmake_core/ament_cmake_core-9999.ebuild b/dev-ros/ament_cmake_core/ament_cmake_core-9999.ebuild
index 0bc79bd3fd0c..3e96c689fcb9 100644
--- a/dev-ros/ament_cmake_core/ament_cmake_core-9999.ebuild
+++ b/dev-ros/ament_cmake_core/ament_cmake_core-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2019-2021 Gentoo Authors
+# Copyright 2019-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -29,6 +29,7 @@ else
KEYWORDS="~amd64"
fi
IUSE=""
+PATCHES=( "${FILESDIR}/findpython.patch" )
RDEPEND="
dev-python/ament_package
diff --git a/dev-ros/ament_cmake_core/files/findpython.patch b/dev-ros/ament_cmake_core/files/findpython.patch
new file mode 100644
index 000000000000..790b0631b82c
--- /dev/null
+++ b/dev-ros/ament_cmake_core/files/findpython.patch
@@ -0,0 +1,15 @@
+Index: ament_cmake_core/cmake/core/python.cmake
+===================================================================
+--- ament_cmake_core.orig/cmake/core/python.cmake
++++ ament_cmake_core/cmake/core/python.cmake
+@@ -17,6 +17,10 @@
+ # Example:
+ # find_package(Python3 3.8 REQUIRED)
+ # find_package(ament_cmake REQUIRED)
++
++if (CMAKE_GENTOO_BUILD OR CMAKE_BUILD_TYPE STREQUAL Gentoo)
++ set(Python3_FIND_UNVERSIONED_NAMES FIRST)
++endif()
+ if(NOT TARGET Python3::Interpreter)
+ find_package(Python3 REQUIRED COMPONENTS Interpreter)
+ endif()