reorganize how files & dependencies are split between catkin & catkin-runtime

This commit is contained in:
Dominique Hunziker 2017-06-02 10:23:48 +02:00 committed by Lukas Bulwahn
parent fae9c9576f
commit 8754c01a23
5 changed files with 36 additions and 75 deletions

View File

@ -6,17 +6,29 @@ ROS_USE_PYTHON3 ??= "no"
inherit cmake ${@'distutils3-base' if bb.utils.to_boolean(d.getVar('ROS_USE_PYTHON3', True)) else 'distutils-base'} ros faulty-solibs inherit cmake ${@'distutils3-base' if bb.utils.to_boolean(d.getVar('ROS_USE_PYTHON3', True)) else 'distutils-base'} ros faulty-solibs
DEPENDS_prepend = "${@'' if (d.getVar('BPN', True) == 'catkin') or (d.getVar('BPN', True) == 'catkin-runtime') else 'catkin-native '}" # Prepend build dependency on "catkin-runtime" and "catkin-native"
# if the package is not "catkin" or "catkin-runtime"
DEPENDS =+ "${@'' if d.getVar('BPN', True) in ('catkin', 'catkin-runtime') else 'catkin-runtime catkin-native'}"
# Prepend run dependency on "catkin-runtime" for base packages
# if the package is not "catkin" or "catkin-runtime"
RDEPENDS_${PN} =+ "${@'' if d.getVar('BPN', True) in ('catkin', 'catkin-runtime') else 'catkin-runtime'}"
# Prepend run dependency on "catkin" for dev packages
# if the package is not "catkin" or "catkin-runtime"
RDEPENDS_${PN}-dev =+ "${@'' if d.getVar('BPN', True) in ('catkin', 'catkin-runtime') else 'catkin'}"
EXTRA_OECMAKE_CATKIN = "\ EXTRA_OECMAKE_CATKIN = "\
-DCMAKE_PREFIX_PATH='${STAGING_DIR_HOST}${ros_prefix};${STAGING_DIR_HOST}${prefix};${STAGING_DIR_NATIVE}${ros_prefix};${STAGING_DIR_NATIVE}${prefix}' \ -DCMAKE_PREFIX_PATH='${STAGING_DIR_HOST}${ros_prefix};${STAGING_DIR_HOST}${prefix};${STAGING_DIR_NATIVE}${ros_prefix};${STAGING_DIR_NATIVE}${prefix}' \
-DCMAKE_INSTALL_PREFIX:PATH='${ros_prefix}' \ -DCMAKE_INSTALL_PREFIX:PATH='${ros_prefix}' \
-DCATKIN_DEVEL_PREFIX='${WORKDIR}/devel' \
" "
EXTRA_OECMAKE_CATKIN_class-native = "\ EXTRA_OECMAKE_CATKIN_class-native = "\
-DCMAKE_PREFIX_PATH='${ros_prefix}' \ -DCMAKE_PREFIX_PATH='${ros_prefix}' \
-DCMAKE_INSTALL_PREFIX:PATH='${ros_prefix}' \ -DCMAKE_INSTALL_PREFIX:PATH='${ros_prefix}' \
-DRT_LIBRARY=${libdir_native} \ -DRT_LIBRARY=${libdir_native} \
-DCATKIN_DEVEL_PREFIX='${WORKDIR}/devel' \
" "
EXTRA_OECMAKE_prepend = "\ EXTRA_OECMAKE_prepend = "\

View File

@ -11,7 +11,8 @@ S = "${WORKDIR}/catkin-${PV}"
# This package includes ONLY the python packages AND catkin_find # This package includes ONLY the python packages AND catkin_find
# The catkin_${PV} package includes all other files # The catkin_${PV} package includes all other files
# from the catkin tool. # from the catkin tool.
FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR} ${ros_bindir}/catkin_find" FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR} ${ros_bindir}/catkin_find ${ros_prefix}/.catkin"
FILES_${PN}-dev = ""
RDEPENDS_${PN}_class-native = "" RDEPENDS_${PN}_class-native = ""
RDEPENDS_${PN} = "\ RDEPENDS_${PN} = "\
@ -26,6 +27,13 @@ do_install_append() {
rm ${D}${ros_bindir}/catkin_make rm ${D}${ros_bindir}/catkin_make
rm -rf ${D}${ros_datadir} rm -rf ${D}${ros_datadir}
rm -rf ${D}${ros_libdir}/pkgconfig rm -rf ${D}${ros_libdir}/pkgconfig
# Manually add the marker file
touch ${D}${ros_prefix}/.catkin
}
catkin_sysroot_preprocess_append() {
install -m 644 -t ${SYSROOT_DESTDIR}${ros_prefix} ${D}${ros_prefix}/.catkin
} }
BBCLASSEXTEND += "native" BBCLASSEXTEND += "native"

View File

@ -10,7 +10,6 @@ SRC_URI[md5sum] = "d58460cc9112812d8c4e6ecf98bbcc85"
SRC_URI[sha256sum] = "90a639d67db7f9039487af555e432a5b4b6e339f22892d75d03b823b3f38c947" SRC_URI[sha256sum] = "90a639d67db7f9039487af555e432a5b4b6e339f22892d75d03b823b3f38c947"
SRC_URI += "\ SRC_URI += "\
file://0001-CATKIN_WORKSPACES-Don-t-require-.catkin-file.patch \
file://0001-use-python-provided-by-environment-instead-of-the-ge.patch \ file://0001-use-python-provided-by-environment-instead-of-the-ge.patch \
file://0001-avoid-using-host-s-paths-when-cross-compiling.patch \ file://0001-avoid-using-host-s-paths-when-cross-compiling.patch \
file://0001-relocate-dependency-s-headers-to-current-sysroot.patch \ file://0001-relocate-dependency-s-headers-to-current-sysroot.patch \
@ -18,15 +17,3 @@ SRC_URI += "\
" "
inherit catkin inherit catkin
FILES_${PN}-dev += "\
${ros_datadir}/eigen/cmake \
${ros_datadir}/ros/cmake \
${ros_datadir}/.catkin \
${ros_prefix}/.catkin \
${ros_prefix}/.rosinstall \
${ros_prefix}/_setup_util.py \
${ros_prefix}/env.sh \
${ros_prefix}/setup.* \
"

View File

@ -2,15 +2,25 @@ require catkin.inc
DEPENDS_class-native += "catkin-runtime" DEPENDS_class-native += "catkin-runtime"
RDEPENDS_${PN}_class-native = "${PYTHON_PN}-catkin-pkg"
RDEPENDS_${PN} = "cmake make binutils binutils-symlinks gcc gcc-symlinks g++ g++-symlinks \
catkin-runtime"
# The files in ${PYTHON_SITEPACKAGES_DIR} and catkin_find are # The files in ${PYTHON_SITEPACKAGES_DIR} and catkin_find are
# installed by the catkin-runtime package. Therefore, we remove # installed by the catkin-runtime package. Therefore, we remove
# them here so that they are not installed. # them here so that they are not installed.
# Moreover: the ${ros_libdir}/python2.7 is empty. We need to # Moreover: the ${ros_libdir}/python2.7 is empty. We need to
# remove it, otherwise the QA error [installed-vs-shipped] will hit on us. # remove it, otherwise the QA error [installed-vs-shipped] will hit on us.
FILES_${PN} = "\
${ros_bindir}/catkin_*_* \
${ros_bindir}/catkin_make \
${ros_libdir}/pkgconfig \
${ros_datadir} \
${ros_sysconfdir} \
${ros_stackdir} \
"
FILES_${PN}-dev = ""
RDEPENDS_${PN}_class-native = "${PYTHON_PN}-catkin-pkg"
RDEPENDS_${PN} = "cmake make binutils binutils-symlinks gcc gcc-symlinks g++ g++-symlinks \
catkin-runtime ${PYTHON_PN}-empy"
do_install_append() { do_install_append() {
rm ${D}${ros_bindir}/catkin_find rm ${D}${ros_bindir}/catkin_find
rm -rf ${D}${PYTHON_SITEPACKAGES_DIR} rm -rf ${D}${PYTHON_SITEPACKAGES_DIR}

View File

@ -1,56 +0,0 @@
From a34e7d9d7f77c123cb8cbf464ead628f97e42fd4 Mon Sep 17 00:00:00 2001
From: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
Date: Wed, 13 Mar 2013 11:49:17 +0100
Subject: [PATCH] CATKIN_WORKSPACES: Don't require .catkin file
Upstream-Status: Inappropriate [only for our setup]
Signed-off-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
---
cmake/all.cmake | 8 +++-----
cmake/list_insert_in_workspace_order.cmake | 9 ++++-----
2 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/cmake/all.cmake b/cmake/all.cmake
index 83da965..a5f9df9 100644
--- a/cmake/all.cmake
+++ b/cmake/all.cmake
@@ -44,11 +44,9 @@ set(CMAKE_PREFIX_PATH_AS_IS ${CMAKE_PREFIX_PATH})
# list of unique catkin workspaces based on CMAKE_PREFIX_PATH
set(CATKIN_WORKSPACES "")
foreach(path ${CMAKE_PREFIX_PATH})
- if(EXISTS "${path}/.catkin")
- list(FIND CATKIN_WORKSPACES ${path} _index)
- if(_index EQUAL -1)
- list(APPEND CATKIN_WORKSPACES ${path})
- endif()
+ list(FIND CATKIN_WORKSPACES ${path} _index)
+ if(_index EQUAL -1)
+ list(APPEND CATKIN_WORKSPACES ${path})
endif()
endforeach()
if(CATKIN_WORKSPACES)
diff --git a/cmake/list_insert_in_workspace_order.cmake b/cmake/list_insert_in_workspace_order.cmake
index 57ade4a..46887af 100644
--- a/cmake/list_insert_in_workspace_order.cmake
+++ b/cmake/list_insert_in_workspace_order.cmake
@@ -4,12 +4,11 @@
set(CATKIN_ORDERED_SPACES "")
foreach(_space ${CATKIN_DEVEL_PREFIX} ${CATKIN_WORKSPACES})
list(APPEND CATKIN_ORDERED_SPACES ${_space})
- if(NOT EXISTS "${_space}/.catkin")
- message(FATAL_ERROR "The path '${_space}' is in CATKIN_WORKSPACES but does not have a .catkin file")
+ if(EXISTS "${_space}/.catkin")
+ # prepend to existing list of sourcespaces
+ file(READ "${_space}/.catkin" _sourcespaces)
+ list(APPEND CATKIN_ORDERED_SPACES ${_sourcespaces})
endif()
- # prepend to existing list of sourcespaces
- file(READ "${_space}/.catkin" _sourcespaces)
- list(APPEND CATKIN_ORDERED_SPACES ${_sourcespaces})
endforeach()
debug_message(10 "CATKIN_ORDERED_SPACES ${CATKIN_ORDERED_SPACES}")
--
1.7.0.4