eclass/ros-catkin.eclass: Add support for nodejs messages.
authorAlexis Ballier <aballier@gentoo.org>
Wed, 11 May 2016 08:24:03 +0000 (10:24 +0200)
committerAlexis Ballier <aballier@gentoo.org>
Wed, 11 May 2016 08:45:28 +0000 (10:45 +0200)
eclass/ros-catkin.eclass

index 30132b70c4b974be9ea8cee7d8cc6e96ab01d1a5..28cf80dba3d25b7a6df2df5412b4d6b807233e49 100644 (file)
@@ -78,12 +78,13 @@ fi
 # In that case, CATKIN_MESSAGES_TRANSITIVE_DEPS should contain a space-separated list of atoms
 # representing those dependencies. The eclass uses it to ensure proper dependencies on these packages. 
 if [ -n "${CATKIN_HAS_MESSAGES}" ] ; then
-       IUSE="${IUSE} +ros_messages_python +ros_messages_cxx ros_messages_eus ros_messages_lisp"
+       IUSE="${IUSE} +ros_messages_python +ros_messages_cxx ros_messages_eus ros_messages_lisp ros_messages_nodejs"
        RDEPEND="${RDEPEND}
-               ros_messages_cxx?    ( dev-ros/gencpp:=${CATKIN_PYTHON_USEDEP}  )
-               ros_messages_eus?    ( dev-ros/geneus:=${CATKIN_PYTHON_USEDEP}  )
-               ros_messages_python? ( dev-ros/genpy:=${CATKIN_PYTHON_USEDEP}   )
-               ros_messages_lisp?   ( dev-ros/genlisp:=${CATKIN_PYTHON_USEDEP} )
+               ros_messages_cxx?    ( dev-ros/gencpp:=${CATKIN_PYTHON_USEDEP}    )
+               ros_messages_eus?    ( dev-ros/geneus:=${CATKIN_PYTHON_USEDEP}    )
+               ros_messages_python? ( dev-ros/genpy:=${CATKIN_PYTHON_USEDEP}     )
+               ros_messages_lisp?   ( dev-ros/genlisp:=${CATKIN_PYTHON_USEDEP}   )
+               ros_messages_nodejs? ( dev-ros/gennodejs:=${CATKIN_PYTHON_USEDEP} )
                dev-ros/message_runtime
        "
        DEPEND="${DEPEND} ${RDEPEND}
@@ -92,7 +93,7 @@ if [ -n "${CATKIN_HAS_MESSAGES}" ] ; then
        "
        if [ -n "${CATKIN_MESSAGES_TRANSITIVE_DEPS}" ] ; then
                for i in ${CATKIN_MESSAGES_TRANSITIVE_DEPS} ; do
-                       ds="${i}[ros_messages_python(-)?,ros_messages_cxx(-)?,ros_messages_lisp(-)?,ros_messages_eus(-)?] ros_messages_python? ( ${i}[${PYTHON_USEDEP}] )"
+                       ds="${i}[ros_messages_python(-)?,ros_messages_cxx(-)?,ros_messages_lisp(-)?,ros_messages_eus(-)?,ros_messages_nodejs(-)?] ros_messages_python? ( ${i}[${PYTHON_USEDEP}] )"
                        RDEPEND="${RDEPEND} ${ds}"
                        DEPEND="${DEPEND} ${ds}"
                done
@@ -119,6 +120,11 @@ CATKIN_MESSAGES_LISP_USEDEP="ros_messages_lisp(-)"
 # Use it as cat/pkg[${CATKIN_MESSAGES_EUS_USEDEP}] to indicate a dependency on the EusLisp messages of cat/pkg.
 CATKIN_MESSAGES_EUS_USEDEP="ros_messages_eus(-)"
 
+# @ECLASS-VARIABLE: CATKIN_MESSAGES_NODEJS_USEDEP
+# @DESCRIPTION:
+# Use it as cat/pkg[${CATKIN_MESSAGES_NODEJS_USEDEP}] to indicate a dependency on the nodejs messages of cat/pkg.
+CATKIN_MESSAGES_NODEJS_USEDEP="ros_messages_nodejs(-)"
+
 if [ "${PV#9999}" != "${PV}" ] ; then
        SRC_URI=""
        KEYWORDS=""
@@ -171,6 +177,7 @@ ros-catkin_src_configure() {
                use ros_messages_eus    || ROS_LANG_DISABLE="${ROS_LANG_DISABLE}:geneus"
                use ros_messages_lisp   || ROS_LANG_DISABLE="${ROS_LANG_DISABLE}:genlisp"
                use ros_messages_python || ROS_LANG_DISABLE="${ROS_LANG_DISABLE}:genpy"
+               use ros_messages_nodejs || ROS_LANG_DISABLE="${ROS_LANG_DISABLE}:gennodejs"
                export ROS_LANG_DISABLE
        fi
        local mycmakeargs=(