public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-ros/roslib/, dev-ros/roslib/files/
@ 2017-03-11  9:14 Alexis Ballier
  0 siblings, 0 replies; only message in thread
From: Alexis Ballier @ 2017-03-11  9:14 UTC (permalink / raw
  To: gentoo-commits

commit:     1781d604ee0c6a5094e09fe607dc7dedffa1e2a0
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 11 09:13:57 2017 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Sat Mar 11 09:14:08 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1781d604

dev-ros/roslib: Patch env hooks to work better on Gentoo.

Use env python instead of hardcoder python version at build time. Honour CATKIN_PREFIX_PATH.

Package-Manager: Portage-2.3.4, Repoman-2.3.2

 dev-ros/roslib/files/envhook.patch                 | 34 ++++++++++++++++++++++
 ...oslib-1.14.0.ebuild => roslib-1.14.0-r1.ebuild} |  1 +
 dev-ros/roslib/roslib-9999.ebuild                  |  1 +
 3 files changed, 36 insertions(+)

diff --git a/dev-ros/roslib/files/envhook.patch b/dev-ros/roslib/files/envhook.patch
new file mode 100644
index 00000000000..d4e24e93735
--- /dev/null
+++ b/dev-ros/roslib/files/envhook.patch
@@ -0,0 +1,34 @@
+Use env python for running python so that it uses the proper version on Gentoo.
+Honour CATKIN_PREFIX_PATH gentoo addition.
+
+Index: roslib/env-hooks/10.ros.sh.em
+===================================================================
+--- roslib.orig/env-hooks/10.ros.sh.em
++++ roslib/env-hooks/10.ros.sh.em
+@@ -1,8 +1,5 @@
+ # generated from ros/env-hooks/10.ros.sh.em
+ 
+-# scrub old ROS bin dirs, to avoid accidentally finding the wrong executables
+-export PATH="`@(PYTHON_EXECUTABLE) -c \"import os; print(os.pathsep.join([x for x in \\\"$PATH\\\".split(os.pathsep) if not any([d for d in ['cturtle', 'diamondback', 'electric', 'fuerte'] if d in x])]))\"`"
+-
+ @{
+ # This is a build-time environment variable which allows a build engineer to override the expected
+ # ROS_DISTRO value for a workspace, for example to deliberately use a newer version of roslib with
+@@ -19,7 +16,7 @@ export ROS_DISTRO=@(ROS_DISTRO)
+ PYTHON_CODE_BUILD_ROS_PACKAGE_PATH=$(cat <<EOF
+ from __future__ import print_function
+ import os
+-env_name = 'CMAKE_PREFIX_PATH'
++env_name = 'CATKIN_PREFIX_PATH'
+ paths = [path for path in os.environ[env_name].split(os.pathsep)] if env_name in os.environ and os.environ[env_name] != '' else []
+ workspaces = [path for path in paths if os.path.exists(os.path.join(path, '.catkin'))]
+ paths = []
+@@ -38,7 +35,7 @@ for workspace in workspaces:
+ print(os.pathsep.join(paths))
+ EOF
+ )
+-export ROS_PACKAGE_PATH="`@(PYTHON_EXECUTABLE) -c \"$PYTHON_CODE_BUILD_ROS_PACKAGE_PATH\"`"
++export ROS_PACKAGE_PATH="`/usr/bin/env python -c \"$PYTHON_CODE_BUILD_ROS_PACKAGE_PATH\"`"
+ 
+ @[if DEVELSPACE]@
+ # env variables in develspace

diff --git a/dev-ros/roslib/roslib-1.14.0.ebuild b/dev-ros/roslib/roslib-1.14.0-r1.ebuild
similarity index 93%
rename from dev-ros/roslib/roslib-1.14.0.ebuild
rename to dev-ros/roslib/roslib-1.14.0-r1.ebuild
index 0ba96a53071..1866c312cfe 100644
--- a/dev-ros/roslib/roslib-1.14.0.ebuild
+++ b/dev-ros/roslib/roslib-1.14.0-r1.ebuild
@@ -25,3 +25,4 @@ DEPEND="${RDEPEND}
 		dev-cpp/gtest
 		dev-python/nose[${PYTHON_USEDEP}]
 	)"
+PATCHES=( "${FILESDIR}/envhook.patch" )

diff --git a/dev-ros/roslib/roslib-9999.ebuild b/dev-ros/roslib/roslib-9999.ebuild
index 0ba96a53071..1866c312cfe 100644
--- a/dev-ros/roslib/roslib-9999.ebuild
+++ b/dev-ros/roslib/roslib-9999.ebuild
@@ -25,3 +25,4 @@ DEPEND="${RDEPEND}
 		dev-cpp/gtest
 		dev-python/nose[${PYTHON_USEDEP}]
 	)"
+PATCHES=( "${FILESDIR}/envhook.patch" )


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-11  9:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-11  9:14 [gentoo-commits] repo/gentoo:master commit in: dev-ros/roslib/, dev-ros/roslib/files/ Alexis Ballier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox