dev-ros/rospack: add custom patch to return proper package paths with our package...
authorAlexis Ballier <aballier@gentoo.org>
Mon, 28 Nov 2016 14:30:30 +0000 (15:30 +0100)
committerAlexis Ballier <aballier@gentoo.org>
Mon, 28 Nov 2016 15:04:28 +0000 (16:04 +0100)
Package-Manager: portage-2.3.2

dev-ros/rospack/files/gentoo.patch [new file with mode: 0644]
dev-ros/rospack/rospack-2.3.1-r1.ebuild [moved from dev-ros/rospack/rospack-2.3.1.ebuild with 93% similarity]
dev-ros/rospack/rospack-9999.ebuild

diff --git a/dev-ros/rospack/files/gentoo.patch b/dev-ros/rospack/files/gentoo.patch
new file mode 100644 (file)
index 0000000..7090d7b
--- /dev/null
@@ -0,0 +1,18 @@
+Index: rospack-2.3.1/src/rospack.cpp
+===================================================================
+--- rospack-2.3.1.orig/src/rospack.cpp
++++ rospack-2.3.1/src/rospack.cpp
+@@ -191,6 +191,13 @@ class Stackage
+           break;
+         }
+       }
++
++      // On Gentoo we move package.xml to /usr/share/ros_packages/... but need to keep standard stuff in /usr/share, so correct this here.
++      try {
++              fs::path p = fs::canonical("../../" + name_, path_);
++      path_ = p.string();
++      }
++      catch(fs::filesystem_error& e) {};
+     }
+     bool isStack() const
similarity index 93%
rename from dev-ros/rospack/rospack-2.3.1.ebuild
rename to dev-ros/rospack/rospack-2.3.1-r1.ebuild
index 60535c584ae8eb460e651deb6ad74eb03775476c..61b544e45a9257097bfeeb0edddc05eeb010b329 100644 (file)
@@ -17,6 +17,7 @@ DESCRIPTION="Retrieves information about ROS packages available on the filesyste
 LICENSE="BSD"
 SLOT="0"
 IUSE=""
+PATCHES=( "${FILESDIR}/gentoo.patch" )
 
 RDEPEND="dev-libs/boost:=
        dev-libs/tinyxml
index 4d7f1ab66b65972585068385b799e3ed1eb44105..61b544e45a9257097bfeeb0edddc05eeb010b329 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -17,6 +17,7 @@ DESCRIPTION="Retrieves information about ROS packages available on the filesyste
 LICENSE="BSD"
 SLOT="0"
 IUSE=""
+PATCHES=( "${FILESDIR}/gentoo.patch" )
 
 RDEPEND="dev-libs/boost:=
        dev-libs/tinyxml