2013-08-13 21:08:15 +08:00
|
|
|
#
|
|
|
|
# Copyright (c) 2013 Stefan Herbrechtsmeier, Bielefeld University
|
2019-03-19 03:03:41 +08:00
|
|
|
# Copyright (c) 2019 LG Electronics, Inc.
|
|
|
|
#
|
2013-08-13 21:08:15 +08:00
|
|
|
|
2019-03-29 01:32:22 +08:00
|
|
|
export ros_prefix = "${base_prefix}/opt/ros/${ROS_DISTRO}"
|
2014-08-15 03:29:02 +08:00
|
|
|
|
|
|
|
export ros_bindir = "${ros_prefix}/bin"
|
|
|
|
export ros_libdir = "${ros_prefix}/${baselib}"
|
|
|
|
export ros_libexecdir = "${ros_libdir}/${ROS_BPN}"
|
|
|
|
export ros_includedir = "${ros_prefix}/include"
|
|
|
|
export ros_datadir = "${ros_prefix}/share"
|
|
|
|
export ros_sysconfdir = "${ros_prefix}/etc"
|
|
|
|
export ros_stacksdir = "${ros_prefix}/stacks"
|
|
|
|
|
|
|
|
PREPROCESS_RELOCATE_DIRS += " \
|
|
|
|
${ros_bindir} \
|
|
|
|
${ros_libdir} \
|
|
|
|
"
|
|
|
|
|
2019-04-23 07:07:16 +08:00
|
|
|
# ROS_PYTHON_VERSION is set in generated-ros-distro.inc, ie, it will never be unset here.
|
|
|
|
inherit ${@'python3-dir' if d.getVar('ROS_PYTHON_VERSION', True) == '3' else 'python-dir'}
|
|
|
|
|
2014-08-15 03:29:02 +08:00
|
|
|
PKG_CONFIG_PATH .= ":${PKG_CONFIG_DIR}:${STAGING_DIR_HOST}${ros_libdir}/pkgconfig:${STAGING_DATADIR}/pkgconfig"
|
|
|
|
PYTHON_SITEPACKAGES_DIR = "${ros_libdir}/${PYTHON_DIR}/site-packages"
|
|
|
|
export PYTHONPATH = "${STAGING_DIR_NATIVE}${PYTHON_SITEPACKAGES_DIR}"
|
2015-05-29 04:14:52 +08:00
|
|
|
PYTHONPATH_class-native = "${PYTHON_SITEPACKAGES_DIR}"
|
2014-08-15 03:29:02 +08:00
|
|
|
|
2013-08-13 21:08:15 +08:00
|
|
|
FILES_${PN} += "\
|
2019-03-27 04:40:22 +08:00
|
|
|
${ros_bindir} ${ros_libexecdir} ${ros_libdir}/lib*.so \
|
2014-08-15 03:29:02 +08:00
|
|
|
${PYTHON_SITEPACKAGES_DIR} \
|
|
|
|
${ros_datadir} \
|
|
|
|
${ros_sysconfdir} \
|
|
|
|
${ros_stacksdir} \
|
2013-08-13 21:08:15 +08:00
|
|
|
"
|
|
|
|
|
|
|
|
FILES_${PN}-dev += "\
|
2014-08-15 03:29:02 +08:00
|
|
|
${ros_includedir} \
|
|
|
|
${ros_libdir}/pkgconfig \
|
|
|
|
${PYTHON_SITEPACKAGES_DIR}/*.la \
|
|
|
|
${ros_datadir}/${ROS_BPN}/cmake \
|
2013-08-13 21:08:15 +08:00
|
|
|
${datadir}/${ROS_BPN}/cmake \
|
|
|
|
${datadir}/${ROS_BPN}/*.template \
|
|
|
|
"
|
|
|
|
|
|
|
|
FILES_${PN}-dbg += "\
|
2014-08-15 03:29:02 +08:00
|
|
|
${ros_bindir}/.debug ${ros_libexecdir}/.debug ${ros_libdir}/.debug \
|
|
|
|
${ros_datadir}/*/bin/.debug \
|
|
|
|
${PYTHON_SITEPACKAGES_DIR}/.debug \
|
|
|
|
${PYTHON_SITEPACKAGES_DIR}/*/.debug \
|
|
|
|
${PYTHON_SITEPACKAGES_DIR}/*/*/.debug \
|
|
|
|
"
|
|
|
|
|
|
|
|
FILES_${PN}-staticdev += "\
|
|
|
|
${ros_libdir}/*.a \
|
|
|
|
${ros_libdir}/${BPN}/*.a \
|
2013-08-13 21:08:15 +08:00
|
|
|
"
|
|
|
|
|
|
|
|
PACKAGES += "${PN}-commonlisp"
|
|
|
|
|
|
|
|
FILES_${PN}-commonlisp += " \
|
|
|
|
${datadir}/common-lisp/ \
|
|
|
|
"
|
2014-08-15 03:29:02 +08:00
|
|
|
|
2019-03-19 04:03:08 +08:00
|
|
|
SYSROOT_PREPROCESS_FUNCS += "catkin_ros_prefix_sysroot_preprocess"
|
|
|
|
catkin_ros_prefix_sysroot_preprocess () {
|
2014-08-15 03:29:02 +08:00
|
|
|
sysroot_stage_dir ${D}${ros_includedir} ${SYSROOT_DESTDIR}${ros_includedir}
|
|
|
|
if [ "${BUILD_SYS}" = "${HOST_SYS}" ]; then
|
|
|
|
sysroot_stage_dir ${D}${ros_bindir} ${SYSROOT_DESTDIR}${ros_bindir}
|
|
|
|
sysroot_stage_dir ${D}${ros_sysconfdir} ${SYSROOT_DESTDIR}${ros_sysconfdir}
|
|
|
|
fi
|
|
|
|
if [ -d ${D}${ros_libdir} ]; then
|
2016-05-26 18:29:19 +08:00
|
|
|
sysroot_stage_dir ${D}${ros_libdir} ${SYSROOT_DESTDIR}${ros_libdir}
|
2014-08-15 03:29:02 +08:00
|
|
|
fi
|
|
|
|
sysroot_stage_dir ${D}${ros_datadir} ${SYSROOT_DESTDIR}${ros_datadir}
|
|
|
|
if [ -d ${D}${ros_stacksdir} ]; then
|
|
|
|
sysroot_stage_dir ${D}${ros_stacksdir} ${SYSROOT_DESTDIR}${ros_stacksdir}
|
|
|
|
fi
|
|
|
|
}
|