From 2846a8f39f4935b7d50c681d916f1f138a503bfb Mon Sep 17 00:00:00 2001 From: Gustavo Jose de Sousa Date: Fri, 18 Nov 2016 18:53:12 +0000 Subject: [PATCH] ros-mavlink: add recipe A patch for the config file is also necessary because the include directory path was being hardcoded in the generated file, which caused problems for cross compilation. That patch has already been applied on upstream but for a newer version, so we're backporting it here. Apparently, the Kinetic release for this package is supposed to work fine with indigo distribution. That could be tried later, so that we can get rid of the local patch. Authors: JochiPochi Gustavo Jose de Sousa --- ...1-Fix-PKG_NAME-_INCLUDE_DIR-variable.patch | 31 +++++++++++++++++++ recipes-ros/ros-mavlink/ros-mavlink_git.bb | 14 +++++++++ 2 files changed, 45 insertions(+) create mode 100644 recipes-ros/ros-mavlink/files/0001-Fix-PKG_NAME-_INCLUDE_DIR-variable.patch create mode 100644 recipes-ros/ros-mavlink/ros-mavlink_git.bb diff --git a/recipes-ros/ros-mavlink/files/0001-Fix-PKG_NAME-_INCLUDE_DIR-variable.patch b/recipes-ros/ros-mavlink/files/0001-Fix-PKG_NAME-_INCLUDE_DIR-variable.patch new file mode 100644 index 0000000..26d9437 --- /dev/null +++ b/recipes-ros/ros-mavlink/files/0001-Fix-PKG_NAME-_INCLUDE_DIR-variable.patch @@ -0,0 +1,31 @@ +From af522ba6b85be00a712618c719e831b941a8ffdc Mon Sep 17 00:00:00 2001 +From: Gustavo Jose de Sousa +Date: Wed, 16 Nov 2016 13:23:49 -0200 +Subject: [PATCH] Fix @PKG_NAME@_INCLUDE_DIR variable + +The previous approach hardcoded the path to the include directory and cross +compilation using a sysroot directory would fail. This patch takes the +resulting config files generated from other ROS packages as reference. + +Upstream-Status: Backport [https://github.com/mavlink/mavlink-gbp-release/pull/5] +--- + config.cmake.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/config.cmake.in b/config.cmake.in +index b62ab64..34bed61 100644 +--- a/config.cmake.in ++++ b/config.cmake.in +@@ -3,7 +3,8 @@ if (@PKG_NAME@_CONFIG_INCLUDED) + endif() + set(@PKG_NAME@_CONFIG_INCLUDED TRUE) + +-set(@PKG_NAME@_INCLUDE_DIRS "@CMAKE_INSTALL_PREFIX@/include") ++get_filename_component(include "${@PKG_NAME@_DIR}/../../../include" ABSOLUTE) ++set(@PKG_NAME@_INCLUDE_DIRS ${include}) + set(@PKG_NAME@_DIALECTS @PKG_MAVLINK_DIALECTS@) + set(@PKG2_NAME@_DIALECTS @PKG2_MAVLINK_DIALECTS@) + +-- +2.10.2 + diff --git a/recipes-ros/ros-mavlink/ros-mavlink_git.bb b/recipes-ros/ros-mavlink/ros-mavlink_git.bb new file mode 100644 index 0000000..64cfa26 --- /dev/null +++ b/recipes-ros/ros-mavlink/ros-mavlink_git.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "MAVLink message marshaling library" +LICENSE = "LGPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=54ad3cbe91bebcf6b1823970ff1fb97f" + +SRC_URI = "git://github.com/mavlink/mavlink-gbp-release.git;branch=release/${ROSDISTRO}/mavlink" +SRCREV = "${AUTOREV}" + +SRC_URI += "file://0001-Fix-PKG_NAME-_INCLUDE_DIR-variable.patch" + +S = "${WORKDIR}/git" + +DEPENDS = "python-setuptools" + +inherit catkin