ros-meta/ament_cmake: fix deps, add live ebuild
[gentoo.git] / ros-meta / ament_cmake / ament_cmake-9999.ebuild
1 # Copyright 2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python{3_6,3_7} )
7
8 inherit cmake-utils python-r1
9
10 ROS_PN="ament_cmake"
11 if [ "${PV#9999}" != "${PV}" ] ; then
12         inherit git-r3
13         EGIT_REPO_URI="https://github.com/ament/ament_cmake"
14         SRC_URI=""
15         S=${WORKDIR}/${P}/${PN}
16 else
17         SRC_URI="https://github.com/ament/ament_cmake/archive/${PV}.tar.gz -> ${ROS_PN}-${PV}.tar.gz"
18         S="${WORKDIR}/${ROS_PN}-${PV}/${PN}"
19 fi
20
21 DESCRIPTION="The entry point package for the ament buildsystem"
22 HOMEPAGE="https://github.com/ament/ament_cmake"
23
24 LICENSE="Apache-2.0"
25 SLOT="0"
26 if [ "${PV#9999}" != "${PV}" ] ; then
27         KEYWORDS=""
28 else
29         KEYWORDS="~amd64"
30 fi
31 IUSE=""
32
33 DEPEND="
34         dev-ros/ament_cmake_core[${PYTHON_USEDEP}]
35         dev-ros/ament_cmake_export_definitions[${PYTHON_USEDEP}]
36         dev-ros/ament_cmake_export_dependencies[${PYTHON_USEDEP}]
37         dev-ros/ament_cmake_export_include_directories[${PYTHON_USEDEP}]
38         dev-ros/ament_cmake_export_interfaces[${PYTHON_USEDEP}]
39         dev-ros/ament_cmake_export_libraries[${PYTHON_USEDEP}]
40         dev-ros/ament_cmake_export_link_flags[${PYTHON_USEDEP}]
41         dev-ros/ament_cmake_libraries[${PYTHON_USEDEP}]
42         dev-ros/ament_cmake_python[${PYTHON_USEDEP}]
43         dev-ros/ament_cmake_target_dependencies[${PYTHON_USEDEP}]
44         dev-ros/ament_cmake_test[${PYTHON_USEDEP}]
45         dev-ros/ament_cmake_version[${PYTHON_USEDEP}]
46         ${PYTHON_DEPS}
47 "
48 RDEPEND="${DEPEND}"
49 BDEPEND="${DEPEND}"
50 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
51
52 src_configure() {
53         # This is a build tool that does not install python-related files
54         # ... but we need to propagate the deps and use python3 to build it.
55         local pyimpl="${PYTHON_COMPAT[0]}"
56         python_export "${pyimpl}" EPYTHON PYTHON
57         python_wrapper_setup
58         cmake-utils_src_configure
59 }