From 75f1c5f5f317bd836d6ee924b6c2f5310255e4b2 Mon Sep 17 00:00:00 2001
From: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
Date: Tue, 13 Aug 2013 16:19:26 +0200
Subject: [PATCH] genlisp: Backport relocation changes

Signed-off-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
---
 ...make.em-Use-find_program-for-GENLISP.patch | 38 -------------------
 ...lisp-path-in-installspace-at-runtime.patch | 28 ++++++++++++++
 recipes-ros/genlisp/genlisp_0.4.11.bb         |  4 +-
 3 files changed, 30 insertions(+), 40 deletions(-)
 delete mode 100644 recipes-ros/genlisp/genlisp/0001-genlisp-extras.cmake.em-Use-find_program-for-GENLISP.patch
 create mode 100644 recipes-ros/genlisp/genlisp/0001-resolve-genlisp-path-in-installspace-at-runtime.patch

diff --git a/recipes-ros/genlisp/genlisp/0001-genlisp-extras.cmake.em-Use-find_program-for-GENLISP.patch b/recipes-ros/genlisp/genlisp/0001-genlisp-extras.cmake.em-Use-find_program-for-GENLISP.patch
deleted file mode 100644
index dc5507f..0000000
--- a/recipes-ros/genlisp/genlisp/0001-genlisp-extras.cmake.em-Use-find_program-for-GENLISP.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 4efc32314f5ee02e5be759ea288e11b6de64f1a1 Mon Sep 17 00:00:00 2001
-From: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
-Date: Tue, 4 Jun 2013 17:58:41 +0200
-Subject: [PATCH] genlisp-extras.cmake.em: Use find_program for GENLISP_BIN
-
-Signed-off-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
----
- cmake/genlisp-extras.cmake.em |   10 +++++++---
- 1 files changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/cmake/genlisp-extras.cmake.em b/cmake/genlisp-extras.cmake.em
-index 0d135d0..db52d54 100644
---- a/cmake/genlisp-extras.cmake.em
-+++ b/cmake/genlisp-extras.cmake.em
-@@ -1,13 +1,17 @@
- @[if DEVELSPACE]@
- # bin and template dir variables in develspace
--set(GENLISP_BIN "@(CMAKE_CURRENT_SOURCE_DIR)/scripts/gen_lisp.py")
-+set(GENLISP_BIN_DIR "@(CMAKE_CURRENT_SOURCE_DIR)/scripts/gen_lisp.py")
- set(GENLISP_TEMPLATE_DIR "@(CMAKE_CURRENT_SOURCE_DIR)/scripts")
-+set(CATKIN_FIND_ROOT_PATH_MODE NO_CMAKE_FIND_ROOT_PATH)
- @[else]@
- # bin and template dir variables in installspace
--set(GENLISP_BIN "@(CMAKE_INSTALL_PREFIX)/@(CATKIN_PACKAGE_BIN_DESTINATION)/gen_lisp.py")
--set(GENLISP_TEMPLATE_DIR "@(CMAKE_INSTALL_PREFIX)/@(CATKIN_PACKAGE_SHARE_DESTINATION)")
-+set(GENLISP_BIN_DIR "@(CMAKE_INSTALL_PREFIX)/@(CATKIN_PACKAGE_BIN_DESTINATION)/")
-+set(GENLISP_TEMPLATE_DIR "${CMAKE_CURRENT_LIST_DIR}/..")
-+set(CATKIN_FIND_ROOT_PATH_MODE "")
- @[end if]@
- 
-+find_program(GENLISP_BIN gen_lisp.py PATHS ${GENLISP_BIN_DIR} NO_DEFAULT_PATH ${CATKIN_FIND_ROOT_PATH_MODE})
-+
- # Generate .msg or .srv -> .lisp
- # The generated .lisp files should be added ALL_GEN_OUTPUT_FILES_lisp
- macro(_generate_lisp ARG_PKG ARG_MSG ARG_IFLAGS ARG_MSG_DEPS ARG_GEN_OUTPUT_DIR)
--- 
-1.7.0.4
-
diff --git a/recipes-ros/genlisp/genlisp/0001-resolve-genlisp-path-in-installspace-at-runtime.patch b/recipes-ros/genlisp/genlisp/0001-resolve-genlisp-path-in-installspace-at-runtime.patch
new file mode 100644
index 0000000..1dbf347
--- /dev/null
+++ b/recipes-ros/genlisp/genlisp/0001-resolve-genlisp-path-in-installspace-at-runtime.patch
@@ -0,0 +1,28 @@
+From 42458c1d0a4ca1d3e78b8b1b2cac5e8fb2169a60 Mon Sep 17 00:00:00 2001
+From: Dirk Thomas <dthomas@osrfoundation.org>
+Date: Fri, 26 Jul 2013 13:34:11 -0700
+Subject: [PATCH] resolve genlisp path in installspace at runtime
+ (ros/catkin#490)
+
+---
+ cmake/genlisp-extras.cmake.em | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/cmake/genlisp-extras.cmake.em b/cmake/genlisp-extras.cmake.em
+index a8dec4b..c62037d 100644
+--- a/cmake/genlisp-extras.cmake.em
++++ b/cmake/genlisp-extras.cmake.em
+@@ -4,8 +4,8 @@ set(GENLISP_BIN "@(CMAKE_CURRENT_SOURCE_DIR)/scripts/gen_lisp.py")
+ set(GENLISP_TEMPLATE_DIR "@(CMAKE_CURRENT_SOURCE_DIR)/scripts")
+ @[else]@
+ # bin and template dir variables in installspace
+-set(GENLISP_BIN "@(CMAKE_INSTALL_PREFIX)/@(CATKIN_PACKAGE_BIN_DESTINATION)/gen_lisp.py")
+-set(GENLISP_TEMPLATE_DIR "@(CMAKE_INSTALL_PREFIX)/@(CATKIN_PACKAGE_SHARE_DESTINATION)")
++set(GENLISP_BIN "${genlisp_DIR}/../../../@(CATKIN_PACKAGE_BIN_DESTINATION)/gen_lisp.py")
++set(GENLISP_TEMPLATE_DIR "${genlisp_DIR}/..")
+ @[end if]@
+ 
+ # Generate .msg or .srv -> .lisp
+-- 
+1.8.1.6
+
diff --git a/recipes-ros/genlisp/genlisp_0.4.11.bb b/recipes-ros/genlisp/genlisp_0.4.11.bb
index a51863d..c0e0125 100644
--- a/recipes-ros/genlisp/genlisp_0.4.11.bb
+++ b/recipes-ros/genlisp/genlisp_0.4.11.bb
@@ -5,12 +5,12 @@ LIC_FILES_CHKSUM = "file://package.xml;beginline=9;endline=9;md5=d566ef916e9dedc
 
 DEPENDS = "genmsg-native"
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "https://github.com/ros/${ROS_SPN}/archive/${PV}.tar.gz;downloadfilename=${ROS_SP}.tar.gz"
 SRC_URI[md5sum] = "b9be0a57abf76187a1057fb62cdc31e1"
 SRC_URI[sha256sum] = "cc373440fcbf57cafb758795cb50045fdd96de717b93d3d5956b7a1a2af4d3e2"
 
-SRC_URI += "file://0001-genlisp-extras.cmake.em-Use-find_program-for-GENLISP.patch"
+SRC_URI += "file://0001-resolve-genlisp-path-in-installspace-at-runtime.patch"
 
 inherit catkin
-- 
GitLab