From 4e395289d603a579eb9f18fd02975b37e4e3ac87 Mon Sep 17 00:00:00 2001 From: Alexis Ballier Date: Fri, 7 Oct 2016 18:08:04 +0200 Subject: ci-libs/octomap: install package.xml in /usr/share/ros_packages/$PN Package-Manager: portage-2.3.1 --- sci-libs/octomap/files/gentoo.patch | 39 +++++++++++++++ sci-libs/octomap/octomap-1.8.0-r1.ebuild | 81 ------------------------------- sci-libs/octomap/octomap-1.8.0-r2.ebuild | 82 ++++++++++++++++++++++++++++++++ sci-libs/octomap/octomap-9999.ebuild | 1 + 4 files changed, 122 insertions(+), 81 deletions(-) create mode 100644 sci-libs/octomap/files/gentoo.patch delete mode 100644 sci-libs/octomap/octomap-1.8.0-r1.ebuild create mode 100644 sci-libs/octomap/octomap-1.8.0-r2.ebuild (limited to 'sci-libs') diff --git a/sci-libs/octomap/files/gentoo.patch b/sci-libs/octomap/files/gentoo.patch new file mode 100644 index 000000000000..0fe7426c2855 --- /dev/null +++ b/sci-libs/octomap/files/gentoo.patch @@ -0,0 +1,39 @@ +Index: octomap-1.8.0/dynamicEDT3D/CMakeLists.txt +=================================================================== +--- octomap-1.8.0.orig/dynamicEDT3D/CMakeLists.txt ++++ octomap-1.8.0/dynamicEDT3D/CMakeLists.txt +@@ -62,7 +62,7 @@ file(GLOB dynamicEDT3D_HDRS ${PROJECT_SO + install(FILES ${dynamicEDT3D_HDRS} DESTINATION include/dynamicEDT3D) + + # Install catkin package.xml, attention package.xml names the catkin package "dynamic_edt_3d", so this is also the location where it needs to be installed to (and not "dynamicEDT3D") +-install(FILES package.xml DESTINATION share/dynamic_edt_3d) ++install(FILES package.xml DESTINATION share/ros_packages/dynamic_edt_3d) + + #TODO: this conflicts with the octomap uninstall + #it is not only a target name problem, also both will use the same manifest file +Index: octomap-1.8.0/octomap/CMakeLists.txt +=================================================================== +--- octomap-1.8.0.orig/octomap/CMakeLists.txt ++++ octomap-1.8.0/octomap/CMakeLists.txt +@@ -65,7 +65,7 @@ file(GLOB octomap_math_HDRS ${PROJECT_SO + install(FILES ${octomap_math_HDRS} DESTINATION include/octomap/math) + + # Install catkin package.xml +-install(FILES package.xml DESTINATION share/octomap) ++install(FILES package.xml DESTINATION share/ros_packages/octomap) + + # uninstall target + configure_file( +Index: octomap-1.8.0/octovis/CMakeLists.txt +=================================================================== +--- octomap-1.8.0.orig/octovis/CMakeLists.txt ++++ octomap-1.8.0/octovis/CMakeLists.txt +@@ -126,7 +126,7 @@ IF(BUILD_VIEWER) + install(FILES ${octovis_HDRS} DESTINATION include/octovis) + + # Install catkin package.xml +- install(FILES package.xml DESTINATION share/octovis) ++ install(FILES package.xml DESTINATION share/ros_packages/octovis) + + ELSE() + MESSAGE ( "Unfortunately, the viewer (octovis) can not be built because some requirements are missing.") diff --git a/sci-libs/octomap/octomap-1.8.0-r1.ebuild b/sci-libs/octomap/octomap-1.8.0-r1.ebuild deleted file mode 100644 index 2b3509c9f9fb..000000000000 --- a/sci-libs/octomap/octomap-1.8.0-r1.ebuild +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 - -SCM="" -if [ "${PV#9999}" != "${PV}" ] ; then - SCM="git-r3" - EGIT_REPO_URI="https://github.com/OctoMap/octomap" -fi - -inherit ${SCM} cmake-utils - -if [ "${PV#9999}" != "${PV}" ] ; then - KEYWORDS="" - SRC_URI="" -else - KEYWORDS="~amd64 ~arm" - SRC_URI="https://github.com/OctoMap/octomap/archive/v${PV}.tar.gz -> ${P}.tar.gz" -fi - -DESCRIPTION="An Efficient Probabilistic 3D Mapping Framework Based on Octrees" -HOMEPAGE="http://octomap.github.io/" -IUSE="qt4 dynamicEDT3D doc" -LICENSE="BSD qt4? ( GPL-2 )" -SLOT="0" - -RDEPEND=" - qt4? ( - virtual/opengl - dev-qt/qtcore:4 - dev-qt/qtgui:4 - x11-libs/libQGLViewer:= - ) -" -DEPEND="${RDEPEND} - doc? ( - app-doc/doxygen - media-gfx/graphviz - ) -" - -src_prepare() { - sed -e 's/DESTINATION lib/DESTINATION ${CMAKE_INSTALL_LIBDIR}/' \ - -i */CMakeLists.txt \ - -i */CMakeModules/InstallPkgConfigFile.cmake || die - cmake-utils_src_prepare -} - -src_configure() { - local mycmakeargs=( - "-DBUILD_OCTOVIS_SUBPROJECT=$(usex qt4 ON OFF)" - "-DBUILD_DYNAMICETD3D_SUBPROJECT=$(usex dynamicEDT3D ON OFF)" - ) - cmake-utils_src_configure -} - -src_compile() { - cmake-utils_src_compile - if use doc ; then - cd "${BUILD_DIR}/octomap" - emake docs - if use dynamicEDT3D ; then - cd "${BUILD_DIR}/dynamicEDT3D" - emake docs_dynamicEDT3D - fi - fi -} - -src_install() { - cmake-utils_src_install - if use doc ; then - insinto /usr/share/doc/${PF}/html/octomap - doins -r "${S}/octomap/doc/html/"* - if use dynamicEDT3D ; then - insinto /usr/share/doc/${PF}/html/dynamicEDT3D - doins -r "${S}/dynamicEDT3D/doc/html/"* - fi - fi -} diff --git a/sci-libs/octomap/octomap-1.8.0-r2.ebuild b/sci-libs/octomap/octomap-1.8.0-r2.ebuild new file mode 100644 index 000000000000..19df370fdb02 --- /dev/null +++ b/sci-libs/octomap/octomap-1.8.0-r2.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +SCM="" +if [ "${PV#9999}" != "${PV}" ] ; then + SCM="git-r3" + EGIT_REPO_URI="https://github.com/OctoMap/octomap" +fi + +inherit ${SCM} cmake-utils + +if [ "${PV#9999}" != "${PV}" ] ; then + KEYWORDS="" + SRC_URI="" +else + KEYWORDS="~amd64 ~arm" + SRC_URI="https://github.com/OctoMap/octomap/archive/v${PV}.tar.gz -> ${P}.tar.gz" +fi + +DESCRIPTION="An Efficient Probabilistic 3D Mapping Framework Based on Octrees" +HOMEPAGE="http://octomap.github.io/" +IUSE="qt4 dynamicEDT3D doc" +LICENSE="BSD qt4? ( GPL-2 )" +SLOT="0" + +RDEPEND=" + qt4? ( + virtual/opengl + dev-qt/qtcore:4 + dev-qt/qtgui:4 + x11-libs/libQGLViewer:= + ) +" +DEPEND="${RDEPEND} + doc? ( + app-doc/doxygen + media-gfx/graphviz + ) +" +PATCHES=( "${FILESDIR}/gentoo.patch" ) + +src_prepare() { + sed -e 's/DESTINATION lib/DESTINATION ${CMAKE_INSTALL_LIBDIR}/' \ + -i */CMakeLists.txt \ + -i */CMakeModules/InstallPkgConfigFile.cmake || die + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + "-DBUILD_OCTOVIS_SUBPROJECT=$(usex qt4 ON OFF)" + "-DBUILD_DYNAMICETD3D_SUBPROJECT=$(usex dynamicEDT3D ON OFF)" + ) + cmake-utils_src_configure +} + +src_compile() { + cmake-utils_src_compile + if use doc ; then + cd "${BUILD_DIR}/octomap" + emake docs + if use dynamicEDT3D ; then + cd "${BUILD_DIR}/dynamicEDT3D" + emake docs_dynamicEDT3D + fi + fi +} + +src_install() { + cmake-utils_src_install + if use doc ; then + insinto /usr/share/doc/${PF}/html/octomap + doins -r "${S}/octomap/doc/html/"* + if use dynamicEDT3D ; then + insinto /usr/share/doc/${PF}/html/dynamicEDT3D + doins -r "${S}/dynamicEDT3D/doc/html/"* + fi + fi +} diff --git a/sci-libs/octomap/octomap-9999.ebuild b/sci-libs/octomap/octomap-9999.ebuild index 2b3509c9f9fb..19df370fdb02 100644 --- a/sci-libs/octomap/octomap-9999.ebuild +++ b/sci-libs/octomap/octomap-9999.ebuild @@ -40,6 +40,7 @@ DEPEND="${RDEPEND} media-gfx/graphviz ) " +PATCHES=( "${FILESDIR}/gentoo.patch" ) src_prepare() { sed -e 's/DESTINATION lib/DESTINATION ${CMAKE_INSTALL_LIBDIR}/' \ -- cgit v1.2.3-65-gdbad