This commit is contained in:
Lukas Bulwahn 2013-03-01 15:11:02 +01:00
commit 62c767058c
11 changed files with 193 additions and 105 deletions

View File

@ -22,6 +22,9 @@ EXTRA_OECMAKE_prepend = "\
-DSETUPTOOLS_DEB_LAYOUT=OFF \ -DSETUPTOOLS_DEB_LAYOUT=OFF \
" "
OECMAKE_SOURCEPATH = "${S}"
OECMAKE_BUILDPATH = "${S}/build"
export BUILD_SYS export BUILD_SYS
export HOST_SYS export HOST_SYS
@ -33,16 +36,13 @@ ROS_BP = "${BPN}-${PV}"
FILES_${PN} += "\ FILES_${PN} += "\
${prefix}/etc \ ${prefix}/etc \
${datadir}/${BPN}/conf \ ${datadir}/ros/config/${ROS_BPN}.config \
${datadir}/${BPN}/scripts \
${datadir}/${ROS_BPN}/conf \ ${datadir}/${ROS_BPN}/conf \
${datadir}/${ROS_BPN}/scripts \ ${datadir}/${ROS_BPN}/scripts \
${datadir}/${ROS_BPN}/msg \
" "
FILES_${PN}-dev += "\ FILES_${PN}-dev += "\
${datadir}/${BPN}/cmake \
${datadir}/${BPN}/package.xml \
${datadir}/${BPN}/*.template \
${datadir}/${ROS_BPN}/cmake \ ${datadir}/${ROS_BPN}/cmake \
${datadir}/${ROS_BPN}/package.xml \ ${datadir}/${ROS_BPN}/package.xml \
${datadir}/${ROS_BPN}/*.template \ ${datadir}/${ROS_BPN}/*.template \

View File

@ -1,57 +0,0 @@
From 812453c0fcd2db5b562b568c8e844a2b7764dc4e Mon Sep 17 00:00:00 2001
From: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
Date: Thu, 14 Feb 2013 11:46:34 +0100
Subject: [PATCH 1/2] catkin_package: use relative paths in PKG_CFG_EXTRAS
---
cmake/catkin_package.cmake | 6 +++---
cmake/templates/pkgConfig.cmake.in | 6 +++++-
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/cmake/catkin_package.cmake b/cmake/catkin_package.cmake
index 73fc5bb..ee107c7 100644
--- a/cmake/catkin_package.cmake
+++ b/cmake/catkin_package.cmake
@@ -284,13 +284,13 @@ function(_catkin_package)
${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/${extra}.develspace.context.cmake.py
${em_template}
${CATKIN_DEVEL_PREFIX}/share/${PROJECT_NAME}/cmake/${extra})
- list(APPEND PKG_CFG_EXTRAS ${CATKIN_DEVEL_PREFIX}/share/${PROJECT_NAME}/cmake/${extra})
+ list(APPEND PKG_CFG_EXTRAS ${extra})
elseif(EXISTS ${base}.in)
configure_file(${base}.in
${CATKIN_DEVEL_PREFIX}/share/${PROJECT_NAME}/cmake/${extra}
@ONLY
)
- list(APPEND PKG_CFG_EXTRAS ${CATKIN_DEVEL_PREFIX}/share/${PROJECT_NAME}/cmake/${extra})
+ list(APPEND PKG_CFG_EXTRAS ${extra})
else()
message(FATAL_ERROR "catkin_package() could not find CFG_EXTRAS file. Either 'cmake/${extra}', 'cmake/${extra}.em', 'cmake/${extra}.develspace.em' or 'cmake/${extra}.in' must exist.")
endif()
@@ -376,7 +376,7 @@ function(_catkin_package)
else()
message(FATAL_ERROR "catkin_package() could not find CFG_EXTRAS file. Either 'cmake/${extra}', 'cmake/${extra}.em', 'cmake/${extra}.installspace.em' or 'cmake/${extra}.in' must exist.")
endif()
- list(APPEND PKG_CFG_EXTRAS ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/cmake/${extra})
+ list(APPEND PKG_CFG_EXTRAS ${extra})
endforeach()
install(FILES
${installable_cfg_extras}
diff --git a/cmake/templates/pkgConfig.cmake.in b/cmake/templates/pkgConfig.cmake.in
index 6ed4f96..8e451de 100644
--- a/cmake/templates/pkgConfig.cmake.in
+++ b/cmake/templates/pkgConfig.cmake.in
@@ -155,5 +155,9 @@ if(@PROJECT_NAME@_LIBRARIES)
endif()
foreach(extra @PKG_CFG_EXTRAS@)
- include(${extra})
+ if(IS_ABSOLUTE ${extra})
+ include(${extra})
+ else()
+ include(${CMAKE_CURRENT_LIST_DIR}/${extra})
+ endif()
endforeach()
--
1.7.0.4

View File

@ -0,0 +1,85 @@
From 0f10cb9e60b4556e80535c4d67183f056520f4ab Mon Sep 17 00:00:00 2001
From: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
Date: Tue, 26 Feb 2013 16:46:27 +0100
Subject: [PATCH 1/2] pkgConfig.cmake: use filenames in PKG_CFG_EXTRAS
Signed-off-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
---
cmake/catkin_package.cmake | 16 ++++++++++------
cmake/templates/pkgConfig.cmake.in | 4 +++-
2 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/cmake/catkin_package.cmake b/cmake/catkin_package.cmake
index 7c37d03..c758dae 100644
--- a/cmake/catkin_package.cmake
+++ b/cmake/catkin_package.cmake
@@ -328,7 +328,7 @@ function(_catkin_package)
${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/${extra}.develspace.context.cmake.py
${em_template}
${CATKIN_DEVEL_PREFIX}/share/${PROJECT_NAME}/cmake/${extra})
- list(APPEND PKG_CFG_EXTRAS ${CATKIN_DEVEL_PREFIX}/share/${PROJECT_NAME}/cmake/${extra})
+ list(APPEND PKG_CFG_EXTRAS ${extra})
elseif(EXISTS ${base}.in OR EXISTS ${base}.develspace.in)
if(EXISTS ${base}.develspace.in)
set(in_template ${base}.develspace.in)
@@ -339,9 +339,13 @@ function(_catkin_package)
${CATKIN_DEVEL_PREFIX}/share/${PROJECT_NAME}/cmake/${extra}
@ONLY
)
- list(APPEND PKG_CFG_EXTRAS ${CATKIN_DEVEL_PREFIX}/share/${PROJECT_NAME}/cmake/${extra})
+ list(APPEND PKG_CFG_EXTRAS ${extra})
elseif(EXISTS ${base})
- list(APPEND PKG_CFG_EXTRAS ${base})
+ configure_file(${base}
+ ${CATKIN_DEVEL_PREFIX}/share/${PROJECT_NAME}/cmake/${extra}
+ COPYONLY
+ )
+ list(APPEND PKG_CFG_EXTRAS ${extra})
elseif(NOT EXISTS ${base}.installspace.em AND NOT EXISTS ${base}.installspace.in)
message(FATAL_ERROR "catkin_package() could not find CFG_EXTRAS file. Either 'cmake/${extra}.develspace.em', 'cmake/${extra}.em', 'cmake/${extra}.develspace.in', 'cmake/${extra}.in', 'cmake/${extra}' or a variant specific to the installspace must exist.")
endif()
@@ -430,7 +434,7 @@ function(_catkin_package)
${em_template}
${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${extra})
list(APPEND installable_cfg_extras ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${extra})
- list(APPEND PKG_CFG_EXTRAS ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/cmake/${extra})
+ list(APPEND PKG_CFG_EXTRAS ${extra})
elseif(EXISTS ${base}.in OR EXISTS ${base}.installspace.in)
if(EXISTS ${base}.installspace.in)
set(in_template ${base}.installspace.in)
@@ -442,10 +446,10 @@ function(_catkin_package)
@ONLY
)
list(APPEND installable_cfg_extras ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace/${extra})
- list(APPEND PKG_CFG_EXTRAS ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/cmake/${extra})
+ list(APPEND PKG_CFG_EXTRAS ${extra})
elseif(EXISTS ${base})
list(APPEND installable_cfg_extras ${base})
- list(APPEND PKG_CFG_EXTRAS ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/cmake/${extra})
+ list(APPEND PKG_CFG_EXTRAS ${extra})
elseif(NOT EXISTS ${base}.develspace.em AND NOT EXISTS ${base}.develspace.in)
message(FATAL_ERROR "catkin_package() could not find CFG_EXTRAS file. Either 'cmake/${extra}.installspace.em', 'cmake/${extra}.em', 'cmake/${extra}.installspace.in', 'cmake/${extra}.in', 'cmake/${extra}'or a variant specific to the develspace must exist.")
endif()
diff --git a/cmake/templates/pkgConfig.cmake.in b/cmake/templates/pkgConfig.cmake.in
index 03e8a1c..0ee9231 100644
--- a/cmake/templates/pkgConfig.cmake.in
+++ b/cmake/templates/pkgConfig.cmake.in
@@ -70,6 +70,8 @@ else()
set(@PROJECT_NAME@_PREFIX ${@PROJECT_NAME@_INSTALL_PREFIX})
endif()
+set(@PROJECT_NAME@_EXTRAS_DIR ${CMAKE_CURRENT_LIST_DIR})
+
# warn when using a deprecated package
if(NOT "@PROJECT_DEPRECATED@" STREQUAL "")
set(_msg "WARNING: package '@PROJECT_NAME@' is deprecated")
@@ -165,5 +167,5 @@ if(@PROJECT_NAME@_LIBRARIES)
endif()
foreach(extra @PKG_CFG_EXTRAS@)
- include(${extra})
+ include(${@PROJECT_NAME@_EXTRAS_DIR}/${extra})
endforeach()
--
1.7.0.4

View File

@ -1,35 +0,0 @@
From fcdeade11a2d2e882512fcbaa0ea32bc0d5fd6d0 Mon Sep 17 00:00:00 2001
From: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
Date: Fri, 15 Feb 2013 13:06:36 +0100
Subject: [PATCH 2/2] catkinConfig: use curent path for catkin_EXTRA_DIR
Signed-off-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
---
cmake/catkin_package.cmake | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmake/catkin_package.cmake b/cmake/catkin_package.cmake
index ee107c7..8b2bf2c 100644
--- a/cmake/catkin_package.cmake
+++ b/cmake/catkin_package.cmake
@@ -255,7 +255,7 @@ function(_catkin_package)
# prepend library path of this workspace
set(PKG_CONFIG_LIB_PATHS ${lib_paths})
list(INSERT PKG_CONFIG_LIB_PATHS 0 ${PROJECT_SPACE_DIR}/lib)
- set(PKG_CMAKE_DIR ${PROJECT_SPACE_DIR}/share/${PROJECT_NAME}/cmake)
+ set(PKG_CMAKE_DIR "\${CMAKE_CURRENT_LIST_DIR}")
if("${PROJECT_NAME}" STREQUAL "catkin")
set(PKG_CMAKE_DIR "${catkin_EXTRAS_DIR}")
endif()
@@ -336,7 +336,7 @@ function(_catkin_package)
# prepend library path of this workspace
set(PKG_CONFIG_LIB_PATHS ${lib_paths})
list(INSERT PKG_CONFIG_LIB_PATHS 0 ${PROJECT_SPACE_DIR}/lib)
- set(PKG_CMAKE_DIR ${PROJECT_SPACE_DIR}/share/${PROJECT_NAME}/cmake)
+ set(PKG_CMAKE_DIR "\${CMAKE_CURRENT_LIST_DIR}")
# ensure that output folder exists
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/catkin_generated/installspace)
--
1.7.0.4

View File

@ -0,0 +1,52 @@
From 11807c9e751f53781419cfc5503e2544aac354d8 Mon Sep 17 00:00:00 2001
From: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
Date: Tue, 26 Feb 2013 16:51:30 +0100
Subject: [PATCH 2/2] catkin_package.cmake: use ${PROJECT_NAME}_EXTRAS_DIR for PKG_CMAKE_DIR
Signed-off-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
---
cmake/catkinConfig.cmake.in | 2 +-
cmake/catkin_package.cmake | 7 ++-----
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/cmake/catkinConfig.cmake.in b/cmake/catkinConfig.cmake.in
index f265b59..2b4fafa 100644
--- a/cmake/catkinConfig.cmake.in
+++ b/cmake/catkinConfig.cmake.in
@@ -11,7 +11,7 @@
# contains the include dirs / library dirs / libraries of the searched component <comp>.
if(CATKIN_TOPLEVEL_FIND_PACKAGE OR NOT CATKIN_TOPLEVEL)
- set(catkin_EXTRAS_DIR "@PKG_CMAKE_DIR@")
+ set(catkin_EXTRAS_DIR ${CMAKE_CURRENT_LIST_DIR})
# prevent multiple inclusion from repeated find_package() calls in non-workspace context
# as long as this variable is in the scope the variables from all.cmake are also, so no need to be evaluated again
diff --git a/cmake/catkin_package.cmake b/cmake/catkin_package.cmake
index c758dae..b1b7811 100644
--- a/cmake/catkin_package.cmake
+++ b/cmake/catkin_package.cmake
@@ -294,10 +294,7 @@ function(_catkin_package)
# prepend library path of this workspace
set(PKG_CONFIG_LIB_PATHS ${lib_paths})
list(INSERT PKG_CONFIG_LIB_PATHS 0 ${PROJECT_SPACE_DIR}/lib)
- set(PKG_CMAKE_DIR ${PROJECT_SPACE_DIR}/share/${PROJECT_NAME}/cmake)
- if("${PROJECT_NAME}" STREQUAL "catkin")
- set(PKG_CMAKE_DIR "${catkin_EXTRAS_DIR}")
- endif()
+ set(PKG_CMAKE_DIR "\${${PROJECT_NAME}_EXTRAS_DIR}")
if(NOT PROJECT_SKIP_PKG_CONFIG_GENERATION)
# ensure that output folder exists
@@ -398,7 +395,7 @@ function(_catkin_package)
# prepend library path of this workspace
set(PKG_CONFIG_LIB_PATHS ${lib_paths})
list(INSERT PKG_CONFIG_LIB_PATHS 0 ${PROJECT_SPACE_DIR}/lib)
- set(PKG_CMAKE_DIR ${PROJECT_SPACE_DIR}/share/${PROJECT_NAME}/cmake)
+ set(PKG_CMAKE_DIR "\${${PROJECT_NAME}_EXTRAS_DIR}")
if(NOT PROJECT_SKIP_PKG_CONFIG_GENERATION)
# ensure that output folder exists
--
1.7.0.4

View File

@ -5,13 +5,15 @@ LIC_FILES_CHKSUM = "file://package.xml;beginline=7;endline=7;md5=d566ef916e9dedc
DEPENDS = "cmake python-empy python-catkin-pkg" DEPENDS = "cmake python-empy python-catkin-pkg"
SRC_URI = "https://github.com/ros/${BPN}/archive/${PV}.tar.gz;downloadfilename=${BP}.tar.gz \ SRC_URI = "git://github.com/ros/${BPN}.git \
file://0001-catkin_package-use-relative-paths-in-PKG_CFG_EXTRAS.patch \ file://0001-pkgConfig.cmake-use-filenames-in-PKG_CFG_EXTRAS.patch \
file://0002-catkinConfig-use-curent-path-for-catkin_EXTRA_DIR.patch \ file://0002-catkin_package.cmake-use-PROJECT_NAME-_EXTRAS_DIR-fo.patch \
" "
SRC_URI[md5sum] = "e4df85e60dc792af9324334547cc76aa" SRCREV = "cbe6a0ce3ac6d13914d3b4b010148f72e7984149"
SRC_URI[sha256sum] = "dd99cc04eeaf16a13185dd0a2f576939fa997dfb16a40ba45068c4d2ebbcb44b" PV = "0.5.63+gitr${SRCPV}"
S = "${WORKDIR}/git"
inherit catkin inherit catkin

View File

@ -0,0 +1,14 @@
DESCRIPTION = "Package modeling the run-time dependencies for language bindings of messages."
SECTION = "devel"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://package.xml;beginline=7;endline=7;md5=d566ef916e9dedc494f5f793a6690ba5"
DEPENDS = "gencpp"
SRC_URI = "https://github.com/ros/${ROS_BPN}/archive/${PV}.tar.gz;downloadfilename=${ROS_BP}.tar.gz"
SRC_URI[md5sum] = "10a516326a3bf18f5b5b4523c6e53940"
SRC_URI[sha256sum] = "87f6b56679ea6b90512e2f2d299dd129d361b4a5d167237a9d28ac56ce6f2a36"
S = "${WORKDIR}/${ROS_BPN}-${PV}"
inherit catkin

View File

@ -3,7 +3,7 @@ SECTION = "devel"
LICENSE = "BSD" LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://package.xml;beginline=8;endline=8;md5=d566ef916e9dedc494f5f793a6690ba5" LIC_FILES_CHKSUM = "file://package.xml;beginline=8;endline=8;md5=d566ef916e9dedc494f5f793a6690ba5"
DEPENDS = "message-generation std-msgs" DEPENDS = "message-generation message-runtime std-msgs"
require ros-comm.inc require ros-comm.inc

View File

@ -0,0 +1,25 @@
From 2dc8c3356e38a9b6343c362f70c0cf900ed51296 Mon Sep 17 00:00:00 2001
From: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
Date: Thu, 21 Feb 2013 10:33:19 +0100
Subject: [PATCH] rosunit-extras.cmake.em: remove NO_CMAKE_FIND_ROOT_PATH from find_program
---
tools/rosunit/cmake/rosunit-extras.cmake.em | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tools/rosunit/cmake/rosunit-extras.cmake.em b/tools/rosunit/cmake/rosunit-extras.cmake.em
index 4b9bb0d..30db4d1 100644
--- a/tools/rosunit/cmake/rosunit-extras.cmake.em
+++ b/tools/rosunit/cmake/rosunit-extras.cmake.em
@@ -14,7 +14,7 @@ macro(rosunit_initialize_tests)
# find binary and scripts in installspace
find_program(ROSUNIT_EXE rosunit
PATHS @(CMAKE_INSTALL_PREFIX)/bin
- NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
+ NO_DEFAULT_PATH)
if(NOT ROSUNIT_EXE)
message(FATAL_ERROR "'rosunit' not found")
endif()
--
1.7.0.4

View File

@ -5,6 +5,8 @@ LIC_FILES_CHKSUM = "file://package.xml;beginline=8;endline=8;md5=d566ef916e9dedc
require ros.inc require ros.inc
SRC_URI += "file://0001-rosunit-extras.cmake.em-remove-NO_CMAKE_FIND_ROOT_PA.patch;striplevel=3"
S = "${WORKDIR}/ros-${PV}/tools/${BPN}" S = "${WORKDIR}/ros-${PV}/tools/${BPN}"
BBCLASSEXTEND += "native" BBCLASSEXTEND += "native"

View File

@ -2,9 +2,9 @@ DESCRIPTION = "Standard ROS Messages including common message types representing
For common, generic robot-specific message types, please see common_msgs." For common, generic robot-specific message types, please see common_msgs."
SECTION = "devel" SECTION = "devel"
LICENSE = "BSD" LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://package.xml;beginline=9;endline=9;md5=d566ef916e9dedc494f5f793a6690ba5" LIC_FILES_CHKSUM = "file://package.xml;beginline=9;endline=9;md5=5ee5b8b046ae48ad94a2037ca953a67b"
DEPENDS = "message-generation genlisp" DEPENDS = "message-generation genlisp genpy"
SRC_URI = "https://github.com/ros/${ROS_BPN}/archive/${PV}.tar.gz;downloadfilename=${ROS_BP}.tar.gz" SRC_URI = "https://github.com/ros/${ROS_BPN}/archive/${PV}.tar.gz;downloadfilename=${ROS_BP}.tar.gz"
SRC_URI[md5sum] = "ea40e6dd8ea19fe54a2b476358c0ceea" SRC_URI[md5sum] = "ea40e6dd8ea19fe54a2b476358c0ceea"