diff --git a/recipes-ros/gencpp/gencpp/0001-gencpp-extras.cmake.em-Use-find_program-for-GENCPP_B.patch b/recipes-ros/gencpp/gencpp/0001-gencpp-extras.cmake.em-Use-find_program-for-GENCPP_B.patch
deleted file mode 100644
index 8eef1267e79203de86d28cfb151e4193e36503e4..0000000000000000000000000000000000000000
--- a/recipes-ros/gencpp/gencpp/0001-gencpp-extras.cmake.em-Use-find_program-for-GENCPP_B.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 4e51c828b27eb1d67a3199c692aac1783f853493 Mon Sep 17 00:00:00 2001
-From: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
-Date: Fri, 12 Jul 2013 09:59:13 +0200
-Subject: [PATCH] gencpp-extras.cmake.em: Use find_program for GENCPP_BIN
-
-This patch was originally created by
-Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>.
-I only adjusted it to the current version.
-
-Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
----
- cmake/gencpp-extras.cmake.em |   10 +++++++---
- 1 file changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/cmake/gencpp-extras.cmake.em b/cmake/gencpp-extras.cmake.em
-index 87f46fd..4fc5284 100644
---- a/cmake/gencpp-extras.cmake.em
-+++ b/cmake/gencpp-extras.cmake.em
-@@ -1,13 +1,17 @@
- @[if DEVELSPACE]@
- # bin and template dir variables in develspace
--set(GENCPP_BIN "@(CMAKE_CURRENT_SOURCE_DIR)/scripts/gen_cpp.py")
-+set(GENCPP_BIN_DIR "@(CMAKE_CURRENT_SOURCE_DIR)/scripts")
- set(GENCPP_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(GENCPP_BIN "@(CMAKE_INSTALL_PREFIX)/@(CATKIN_PACKAGE_BIN_DESTINATION)/gen_cpp.py")
--set(GENCPP_TEMPLATE_DIR "@(CMAKE_INSTALL_PREFIX)/@(CATKIN_PACKAGE_SHARE_DESTINATION)")
-+set(GENCPP_BIN_DIR "@(CMAKE_INSTALL_PREFIX)/@(CATKIN_PACKAGE_BIN_DESTINATION)")
-+set(GENCPP_TEMPLATE_DIR "${CMAKE_CURRENT_LIST_DIR}/..")
-+set(CATKIN_FIND_ROOT_PATH_MODE "")
- @[end if]@
- 
-+find_program(GENCPP_BIN gen_cpp.py PATHS ${GENCPP_BIN_DIR} NO_DEFAULT_PATH ${CATKIN_FIND_ROOT_PATH_MODE})
-+
- # Generate .msg->.h for cpp
- # The generated .h files should be added ALL_GEN_OUTPUT_FILES_cpp
- macro(_generate_msg_cpp ARG_PKG ARG_MSG ARG_IFLAGS ARG_MSG_DEPS ARG_GEN_OUTPUT_DIR)
--- 
-1.7.9.5
-
diff --git a/recipes-ros/gencpp/gencpp/0001-resolve-gencpp-path-in-installspace-at-runtime.patch b/recipes-ros/gencpp/gencpp/0001-resolve-gencpp-path-in-installspace-at-runtime.patch
new file mode 100644
index 0000000000000000000000000000000000000000..cd0cfa20a08f7ef3c76c1c0c29981c04686c1d29
--- /dev/null
+++ b/recipes-ros/gencpp/gencpp/0001-resolve-gencpp-path-in-installspace-at-runtime.patch
@@ -0,0 +1,28 @@
+From e5acaf690d6276d427f6b0ecaab67b52f55bbe8a Mon Sep 17 00:00:00 2001
+From: Dirk Thomas <dthomas@osrfoundation.org>
+Date: Fri, 26 Jul 2013 13:33:58 -0700
+Subject: [PATCH] resolve gencpp path in installspace at runtime
+ (ros/catkin#490)
+
+---
+ cmake/gencpp-extras.cmake.em | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/cmake/gencpp-extras.cmake.em b/cmake/gencpp-extras.cmake.em
+index 87f46fd..88ce935 100644
+--- a/cmake/gencpp-extras.cmake.em
++++ b/cmake/gencpp-extras.cmake.em
+@@ -4,8 +4,8 @@ set(GENCPP_BIN "@(CMAKE_CURRENT_SOURCE_DIR)/scripts/gen_cpp.py")
+ set(GENCPP_TEMPLATE_DIR "@(CMAKE_CURRENT_SOURCE_DIR)/scripts")
+ @[else]@
+ # bin and template dir variables in installspace
+-set(GENCPP_BIN "@(CMAKE_INSTALL_PREFIX)/@(CATKIN_PACKAGE_BIN_DESTINATION)/gen_cpp.py")
+-set(GENCPP_TEMPLATE_DIR "@(CMAKE_INSTALL_PREFIX)/@(CATKIN_PACKAGE_SHARE_DESTINATION)")
++set(GENCPP_BIN "${gencpp_DIR}/../../../@(CATKIN_PACKAGE_BIN_DESTINATION)/gen_cpp.py")
++set(GENCPP_TEMPLATE_DIR "${gencpp_DIR}/..")
+ @[end if]@
+ 
+ # Generate .msg->.h for cpp
+-- 
+1.8.1.6
+
diff --git a/recipes-ros/gencpp/gencpp_0.4.13.bb b/recipes-ros/gencpp/gencpp_0.4.13.bb
index e9cb4ba5d93306fef8a51626c92f366a14ff9ea8..91143f9d2c418b565877abf4d73dfb0385b21060 100644
--- a/recipes-ros/gencpp/gencpp_0.4.13.bb
+++ b/recipes-ros/gencpp/gencpp_0.4.13.bb
@@ -5,12 +5,12 @@ LIC_FILES_CHKSUM = "file://package.xml;beginline=7;endline=7;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] = "801b40dcfab468f761dbdae33f848782"
 SRC_URI[sha256sum] = "d1dcd6655c8c4d4325ab067c25284032d40e00aa3409a5a5cf069d310a60d485"
 
-SRC_URI += "file://0001-gencpp-extras.cmake.em-Use-find_program-for-GENCPP_B.patch"
+SRC_URI += "file://0001-resolve-gencpp-path-in-installspace-at-runtime.patch"
 
 inherit catkin