summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Chrétien2014-06-07 17:08:54 +0200
committerBenjamin Chrétien2014-06-07 17:08:54 +0200
commit98eb304545b5b6fee47bed28b356dc0af7e69cce (patch)
tree2decc73abbac7ad675cf3f6620fbbcbea15b9da8
parente5226706ee33a391c241188c21918761212c8525 (diff)
downloadaur-98eb304545b5b6fee47bed28b356dc0af7e69cce.tar.gz
Add helper script to check patches.
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD13
-rw-r--r--python.patch28
3 files changed, 41 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ac6a8494279a..69cd6be01e04 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = ros-indigo-roslib
pkgdesc = ROS - Base dependencies and support libraries for ROS.
pkgver = 1.11.1
- pkgrel = 3
+ pkgrel = 4
url = http://ros.org/wiki/roslib
arch = any
license = BSD
@@ -15,7 +15,9 @@ pkgbase = ros-indigo-roslib
depends = ros-indigo-catkin
depends = python2-rospkg
source = roslib::git+https://github.com/ros-gbp/ros-release.git#tag=release/indigo/roslib/1.11.1-1
+ source = python.patch
md5sums = SKIP
+ md5sums = a77b0082d8951c13c6693fd87186590a
pkgname = ros-indigo-roslib
diff --git a/PKGBUILD b/PKGBUILD
index 1f8275f3923a..55e966b3bca7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@ pkgname='ros-indigo-roslib'
pkgver='1.11.1'
_pkgver_patch=1
arch=('any')
-pkgrel=3
+pkgrel=4
license=('BSD')
ros_makedepends=(ros-indigo-rospack
@@ -23,14 +23,21 @@ depends=(${ros_depends[@]}
_tag=release/indigo/roslib/${pkgver}-${_pkgver_patch}
_dir=roslib
-source=("${_dir}"::"git+https://github.com/ros-gbp/ros-release.git"#tag=${_tag})
-md5sums=('SKIP')
+source=("${_dir}"::"git+https://github.com/ros-gbp/ros-release.git"#tag=${_tag}
+ "python.patch")
+md5sums=('SKIP'
+ 'a77b0082d8951c13c6693fd87186590a')
build() {
# Use ROS environment variables
source /usr/share/ros-build-tools/clear-ros-env.sh
[ -f /opt/ros/indigo/setup.bash ] && source /opt/ros/indigo/setup.bash
+ # Apply patch
+ msg "Patching source code"
+ cd ${srcdir}/${_dir}
+ git apply ${srcdir}/python.patch
+
# Create build directory
[ -d ${srcdir}/build ] || mkdir ${srcdir}/build
cd ${srcdir}/build
diff --git a/python.patch b/python.patch
new file mode 100644
index 000000000000..3dfa5851e812
--- /dev/null
+++ b/python.patch
@@ -0,0 +1,28 @@
+commit 61ce004a566ed0840eca442a8b806a212f59e952
+Author: Benjamin Chrétien <chretien@lirmm.fr>
+Date: Sat Jun 7 17:01:55 2014 +0200
+
+ Fix Python 2 call in hook.
+
+diff --git a/env-hooks/10.ros.sh.em b/env-hooks/10.ros.sh.em
+index 86fa0c4..73a78be 100644
+--- a/env-hooks/10.ros.sh.em
++++ b/env-hooks/10.ros.sh.em
+@@ -1,7 +1,7 @@
+ # generated from ros/env-hooks/10.ros.sh.em
+
+ # scrub old ROS bin dirs, to avoid accidentally finding the wrong executables
+-export PATH="`python -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])]))\"`"
++export PATH="`python2 -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])]))\"`"
+
+ if [ -n "$ROS_DISTRO" -a "$ROS_DISTRO" != "indigo" ]; then
+ echo "ROS_DISTRO was set to '$ROS_DISTRO' before. Please make sure that the environment does not mix paths from different distributions."
+@@ -30,7 +30,7 @@ for workspace in workspaces:
+ print(os.pathsep.join(paths))
+ EOF
+ )
+-export ROS_PACKAGE_PATH="`python -c \"$PYTHON_CODE_BUILD_ROS_PACKAGE_PATH\"`"
++export ROS_PACKAGE_PATH="`python2 -c \"$PYTHON_CODE_BUILD_ROS_PACKAGE_PATH\"`"
+
+ @[if DEVELSPACE]@
+ # env variables in develspace