From ff4eff09855b87c9ced2b9dae7303b9d8c7a8761 Mon Sep 17 00:00:00 2001
From: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
Date: Tue, 13 Aug 2013 15:08:15 +0200
Subject: [PATCH] ros.bbclass: Move common ros code into its own class

Signed-off-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
---
 classes/catkin.bbclass | 29 +----------------------------
 classes/ros.bbclass    | 30 ++++++++++++++++++++++++++++++
 2 files changed, 31 insertions(+), 28 deletions(-)
 create mode 100644 classes/ros.bbclass

diff --git a/classes/catkin.bbclass b/classes/catkin.bbclass
index 5a515d9..97daff6 100644
--- a/classes/catkin.bbclass
+++ b/classes/catkin.bbclass
@@ -2,7 +2,7 @@
 # Copyright (c) 2013 Stefan Herbrechtsmeier, Bielefeld University
 # 
 
-inherit cmake distutils-base
+inherit cmake distutils-base ros
 
 DEPENDS_prepend = "${@['catkin-native ', ''][d.getVar('BPN', True) == 'catkin']}"
 
@@ -28,33 +28,6 @@ OECMAKE_BUILDPATH = "${S}/build"
 export BUILD_SYS
 export HOST_SYS
 
-FILES_SOLIBSDEV = ""
-FILES_${PN} += "${libdir}/lib*${SOLIBSDEV}"
-
-ROS_BPN = "${@d.getVar('BPN', True).replace('-', '_')}"
-ROS_BP = "${ROS_BPN}-${PV}"
-
-FILES_${PN} += "\
-    ${prefix}/etc \
-    ${datadir}/ros/config/${ROS_BPN}.config \
-    ${datadir}/${ROS_BPN} \
-    "
-
-FILES_${PN}-dev += "\
-    ${datadir}/${ROS_BPN}/cmake \
-    ${datadir}/${ROS_BPN}/*.template \
-    "
-
-FILES_${PN}-dbg += "\
-    ${libdir}/${ROS_BPN}/.debug/* \
-    "
-
-PACKAGES += "${PN}-commonlisp"
-
-FILES_${PN}-commonlisp += " \
-    ${datadir}/common-lisp/ \
-    "
-
 SYSROOT_PREPROCESS_FUNCS += "catkin_sysroot_preprocess"
 
 catkin_sysroot_preprocess () {
diff --git a/classes/ros.bbclass b/classes/ros.bbclass
new file mode 100644
index 0000000..3a1c9ce
--- /dev/null
+++ b/classes/ros.bbclass
@@ -0,0 +1,30 @@
+#
+# Copyright (c) 2013 Stefan Herbrechtsmeier, Bielefeld University
+# 
+
+ROS_BPN = "${@d.getVar('BPN', True).replace('-', '_')}"
+ROS_BP = "${ROS_BPN}-${PV}"
+
+FILES_SOLIBSDEV = ""
+FILES_${PN} += "${libdir}/lib*${SOLIBSDEV}"
+
+FILES_${PN} += "\
+    ${prefix}/etc \
+    ${datadir}/ros/config/${ROS_BPN}.config \
+    ${datadir}/${ROS_BPN} \
+    "
+
+FILES_${PN}-dev += "\
+    ${datadir}/${ROS_BPN}/cmake \
+    ${datadir}/${ROS_BPN}/*.template \
+    "
+
+FILES_${PN}-dbg += "\
+    ${libdir}/${ROS_BPN}/.debug/* \
+    "
+
+PACKAGES += "${PN}-commonlisp"
+
+FILES_${PN}-commonlisp += " \
+    ${datadir}/common-lisp/ \
+    "
-- 
GitLab