ros.bbclass: Move common ros code into its own class

Signed-off-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
This commit is contained in:
Stefan Herbrechtsmeier 2013-08-13 15:08:15 +02:00 committed by Lukas Bulwahn
parent cd16977300
commit ff4eff0985
2 changed files with 31 additions and 28 deletions

View File

@ -2,7 +2,7 @@
# Copyright (c) 2013 Stefan Herbrechtsmeier, Bielefeld University # 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']}" DEPENDS_prepend = "${@['catkin-native ', ''][d.getVar('BPN', True) == 'catkin']}"
@ -28,33 +28,6 @@ OECMAKE_BUILDPATH = "${S}/build"
export BUILD_SYS export BUILD_SYS
export HOST_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" SYSROOT_PREPROCESS_FUNCS += "catkin_sysroot_preprocess"
catkin_sysroot_preprocess () { catkin_sysroot_preprocess () {

30
classes/ros.bbclass Normal file
View File

@ -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/ \
"