ros-mavlink: updating to kinetic version

Due to the update to the kinetic branch, this commit drops the
backported patch, but provides another new patch that is needed.
This commit is contained in:
Lukas Bulwahn 2017-04-29 20:46:33 +02:00
parent fb00393ba7
commit 8756123ce3
3 changed files with 46 additions and 34 deletions

View File

@ -1,31 +0,0 @@
From af522ba6b85be00a712618c719e831b941a8ffdc Mon Sep 17 00:00:00 2001
From: Gustavo Jose de Sousa <gustavo.sousa@intel.com>
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

View File

@ -0,0 +1,43 @@
From 6ac7498052f0e97e978c8adf887b9bbf851d58e2 Mon Sep 17 00:00:00 2001
From: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Date: Sun, 7 May 2017 07:02:49 +0200
Subject: [PATCH 2/2] provide path to find mavgen_c
When compiling mavlink, it failed with:
```
| Generating C headers
| Traceback (most recent call last):
| File "/home/lukas/work/repositories/openembedded.org/openembedded-core/build/tmp-glibc/work/core2-64-oe-linux/ros-mavlink/git-r0/git/pymavlink/tools/mavgen.py", line 30, in <module>
| mavgen.mavgen(args, args.definitions)
| File "/home/lukas/work/repositories/openembedded.org/openembedded-core/build/tmp-glibc/work/core2-64-oe-linux/ros-mavlink/git-r0/git/pymavlink/generator/mavgen.py", line 154, in mavgen
| mavgen_cpp11.generate(opts.output, xml)
| File "/home/lukas/work/repositories/openembedded.org/openembedded-core/build/tmp-glibc/work/core2-64-oe-linux/ros-mavlink/git-r0/git/pymavlink/generator/mavgen_cpp11.py", line 451, in generate
| import mavgen_c
| ImportError: No module named 'mavgen_c'
```
This commit provides the path to find mavgen_c, as already done in
many other places.
Upstream-Status: Pending
---
pymavlink/generator/mavgen_cpp11.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pymavlink/generator/mavgen_cpp11.py b/pymavlink/generator/mavgen_cpp11.py
index 797ab2e..5fc824a 100644
--- a/pymavlink/generator/mavgen_cpp11.py
+++ b/pymavlink/generator/mavgen_cpp11.py
@@ -448,7 +448,7 @@ def generate_one(basename, xml):
def generate(basename, xml_list):
'''generate serialization MAVLink C++ implemenation'''
print("Generating C headers")
- import mavgen_c
+ from . import mavgen_c
mavgen_c.generate(basename, xml_list)
for xml in xml_list:
generate_one(basename, xml)
--
1.9.1

View File

@ -2,14 +2,14 @@ DESCRIPTION = "MAVLink message marshaling library"
LICENSE = "LGPLv3" LICENSE = "LGPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=54ad3cbe91bebcf6b1823970ff1fb97f" LIC_FILES_CHKSUM = "file://COPYING;md5=54ad3cbe91bebcf6b1823970ff1fb97f"
SRC_URI = "git://github.com/mavlink/mavlink-gbp-release.git;branch=release/${ROSDISTRO}/mavlink" SRC_URI = "git://github.com/mavlink/mavlink-gbp-release.git;branch=release/kinetic/mavlink"
SRCREV = "${AUTOREV}" SRCREV = "${AUTOREV}"
SRC_URI += "file://0001-Fix-PKG_NAME-_INCLUDE_DIR-variable.patch"
SRC_URI += "file://0001-do-not-require-python2.patch" SRC_URI += "file://0001-do-not-require-python2.patch"
SRC_URI += "file://0002-provide-path-to-find-mavgen_c.patch"
S = "${WORKDIR}/git" S = "${WORKDIR}/git"
DEPENDS = "${PYTHON_PN}-setuptools-native" DEPENDS = "${PYTHON_PN}-setuptools-native ${PYTHON_PN}-future-native"
inherit catkin inherit catkin