commit:     e504013dc705a9ab392b14b65716f9b02833ad3c
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 28 14:30:30 2016 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Mon Nov 28 15:04:28 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e504013d

dev-ros/rospack: add custom patch to return proper package paths with our 
package.xml moved to ros_packages.

Package-Manager: portage-2.3.2

 dev-ros/rospack/files/gentoo.patch                     | 18 ++++++++++++++++++
 .../{rospack-2.3.1.ebuild => rospack-2.3.1-r1.ebuild}  |  1 +
 dev-ros/rospack/rospack-9999.ebuild                    |  3 ++-
 3 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/dev-ros/rospack/files/gentoo.patch 
b/dev-ros/rospack/files/gentoo.patch
new file mode 100644
index 00000000..7090d7b
--- /dev/null
+++ b/dev-ros/rospack/files/gentoo.patch
@@ -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

diff --git a/dev-ros/rospack/rospack-2.3.1.ebuild 
b/dev-ros/rospack/rospack-2.3.1-r1.ebuild
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 60535c5..61b544e 100644
--- a/dev-ros/rospack/rospack-2.3.1.ebuild
+++ b/dev-ros/rospack/rospack-2.3.1-r1.ebuild
@@ -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

diff --git a/dev-ros/rospack/rospack-9999.ebuild 
b/dev-ros/rospack/rospack-9999.ebuild
index 4d7f1ab..61b544e 100644
--- a/dev-ros/rospack/rospack-9999.ebuild
+++ b/dev-ros/rospack/rospack-9999.ebuild
@@ -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

Reply via email to