diff options
-rw-r--r-- | sci-libs/orocos_kdl/orocos_kdl-9999.ebuild | 82 |
1 files changed, 45 insertions, 37 deletions
diff --git a/sci-libs/orocos_kdl/orocos_kdl-9999.ebuild b/sci-libs/orocos_kdl/orocos_kdl-9999.ebuild index da34c1969851..d50c631a39c3 100644 --- a/sci-libs/orocos_kdl/orocos_kdl-9999.ebuild +++ b/sci-libs/orocos_kdl/orocos_kdl-9999.ebuild @@ -1,71 +1,79 @@ # Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=5 +EAPI=7 -SCM="" -if [ "${PV#9999}" != "${PV}" ] ; then - SCM="git-r3" - EGIT_REPO_URI="https://github.com/orocos/orocos_kinematics_dynamics" -fi +inherit cmake -inherit ${SCM} cmake-utils +DESCRIPTION="Kinematics and Dynamics Library (KDL)" +HOMEPAGE="https://www.orocos.org/kdl" -if [ "${PV#9999}" != "${PV}" ] ; then - SRC_URI="" +if [[ ${PV} = *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/orocos/orocos_kinematics_dynamics" + S="${WORKDIR}/${P}/${PN}" else - KEYWORDS="~amd64 ~arm ~x86" SRC_URI="https://github.com/orocos/orocos_kinematics_dynamics/archive/v${PV}.tar.gz -> orocos_kinematics_dynamics-${PV}.tar.gz" + KEYWORDS="~amd64 ~arm ~x86" + S="${WORKDIR}/orocos_kinematics_dynamics-${PV}/${PN}" fi -DESCRIPTION="Kinematics and Dynamics Library (KDL)" -HOMEPAGE="https://www.orocos.org/kdl" LICENSE="LGPL-2.1" SLOT="0/14" -IUSE="doc test examples models" +IUSE="doc examples models test" +REQUIRED_USE="examples? ( models )" RESTRICT="!test? ( test )" RDEPEND="dev-cpp/eigen:3" -DEPEND="${RDEPEND} +DEPEND="${RDEPEND}" +BDEPEND=" + doc? ( app-doc/doxygen[dot] ) test? ( dev-util/cppunit ) - doc? ( app-doc/doxygen )" -REQUIRED_USE="examples? ( models )" +" -DOCS=( README ) - -if [ "${PV#9999}" != "${PV}" ] ; then - S=${WORKDIR}/${P}/orocos_kdl -else - S=${WORKDIR}/orocos_kinematics_dynamics-${PV}/orocos_kdl -fi +PATCHES=( + "${FILESDIR}"/${PN}-1.4.0-0001-don-t-install-kdl.tag-file.patch +) src_configure() { local mycmakeargs=( - "$(cmake-utils_use_enable test TESTS)" - "$(cmake-utils_use_enable examples EXAMPLES)" - "-DBUILD_MODELS=$(usex models ON OFF)" + -DBUILD_MODELS=$(usex models ON OFF) + -DENABLE_EXAMPLES=$(usex examples) + -DENABLE_TESTS=$(usex test) ) - cmake-utils_src_configure + if use examples; then + mycmakeargs+=( + -DBUILD_MODELS_DEMO=ON + ) + fi + cmake_src_configure } src_compile() { - cmake-utils_src_compile - cd "${BUILD_DIR}" - use doc && emake docs + cmake_src_compile + if use doc; then + cmake_build docs + rm "${BUILD_DIR}/doc/kdl.tag" || die + fi } src_test() { - cd "${BUILD_DIR}" - emake check + pushd "${BUILD_DIR}" > /dev/null || die + eninja check + popd > /dev/null || die } src_install() { - cmake-utils_src_install - cd "${BUILD_DIR}" - use doc && dohtml -r doc/api/html/* - use examples && dobin "${BUILD_DIR}/examples/"{geometry,trajectory_example,chainiksolverpos_lma_demo} + use doc && local HTML_DOCS=( "${BUILD_DIR}/doc/api/html/." ) + cmake_src_install + + if use examples; then + docompress -x /usr/share/doc/${PF}/examples + docinto examples + dodoc -r "${S}"/examples/. + fi # Need to have package.xml in our custom gentoo path insinto /usr/share/ros_packages/${PN} - doins "${ED}/usr/share/${PN}/package.xml" + doins "${S}/package.xml" } |