dev-ros/kdl_parser: fix build with urdfdom1.
authorAlexis Ballier <aballier@gentoo.org>
Tue, 26 Jul 2016 08:13:41 +0000 (10:13 +0200)
committerAlexis Ballier <aballier@gentoo.org>
Tue, 26 Jul 2016 09:18:30 +0000 (11:18 +0200)
Package-Manager: portage-2.3.0

dev-ros/kdl_parser/files/urdfdom1.patch [new file with mode: 0644]
dev-ros/kdl_parser/kdl_parser-1.12.3-r1.ebuild [moved from dev-ros/kdl_parser/kdl_parser-1.12.3.ebuild with 74% similarity]

diff --git a/dev-ros/kdl_parser/files/urdfdom1.patch b/dev-ros/kdl_parser/files/urdfdom1.patch
new file mode 100644 (file)
index 0000000..c4b1d5c
--- /dev/null
@@ -0,0 +1,34 @@
+Index: kdl_parser/src/kdl_parser.cpp
+===================================================================
+--- kdl_parser.orig/src/kdl_parser.cpp
++++ kdl_parser/src/kdl_parser.cpp
+@@ -64,7 +64,7 @@ Frame toKdl(urdf::Pose p)
+ }
+ // construct joint
+-Joint toKdl(boost::shared_ptr<urdf::Joint> jnt)
++Joint toKdl(std::shared_ptr<urdf::Joint> jnt)
+ {
+   Frame F_parent_jnt = toKdl(jnt->parent_to_joint_origin_transform);
+@@ -93,7 +93,7 @@ Joint toKdl(boost::shared_ptr<urdf::Join
+ }
+ // construct inertia
+-RigidBodyInertia toKdl(boost::shared_ptr<urdf::Inertial> i)
++RigidBodyInertia toKdl(std::shared_ptr<urdf::Inertial> i)
+ {
+   Frame origin = toKdl(i->origin);
+   
+@@ -124,9 +124,9 @@ RigidBodyInertia toKdl(boost::shared_ptr
+ // recursive function to walk through tree
+-bool addChildrenToTree(boost::shared_ptr<const urdf::Link> root, Tree& tree)
++bool addChildrenToTree(std::shared_ptr<const urdf::Link> root, Tree& tree)
+ {
+-  std::vector<boost::shared_ptr<urdf::Link> > children = root->child_links;
++  std::vector<std::shared_ptr<urdf::Link> > children = root->child_links;
+   ROS_DEBUG("Link %s had %i children", root->name.c_str(), (int)children.size());
+   // constructs the optional inertia
similarity index 74%
rename from dev-ros/kdl_parser/kdl_parser-1.12.3.ebuild
rename to dev-ros/kdl_parser/kdl_parser-1.12.3-r1.ebuild
index 372f508af7eafecd46226662ee35668d50b11b07..7e6a2bd8227848057562ceb438c71b477123da2a 100644 (file)
@@ -8,7 +8,7 @@ KEYWORDS="~amd64 ~arm"
 ROS_SUBDIR=${PN}
 PYTHON_COMPAT=( python2_7 )
 
-inherit ros-catkin
+inherit ros-catkin flag-o-matic
 
 DESCRIPTION="Constructs a KDL tree from an XML robot representation in URDF"
 LICENSE="BSD"
@@ -19,9 +19,15 @@ RDEPEND="
        dev-libs/boost:=
        dev-ros/roscpp
        dev-ros/rosconsole
-       dev-ros/urdf
+       >=dev-ros/urdf-1.12.3-r1
        sci-libs/orocos_kdl
        dev-libs/tinyxml
 "
 DEPEND="${RDEPEND}
        test? ( dev-ros/rostest[${PYTHON_USEDEP}] )"
+PATCHES=( "${FILESDIR}/urdfdom1.patch" )
+
+src_configure() {
+       append-cxxflags -std=gnu++11
+       ros-catkin_src_configure
+}