diff options
author | mva <mva@FreeBSD.org> | 2013-11-25 00:57:06 +0800 |
---|---|---|
committer | mva <mva@FreeBSD.org> | 2013-11-25 00:57:06 +0800 |
commit | 572bfa7eb3e48adbbf21e6310007baf01557921f (patch) | |
tree | c05981056cd516f778993e87d3dc0d1c34181564 /devel | |
parent | 39ed0277abe4380860497e3c736bb2afd86c056c (diff) | |
download | freebsd-ports-gnome-572bfa7eb3e48adbbf21e6310007baf01557921f.tar.gz freebsd-ports-gnome-572bfa7eb3e48adbbf21e6310007baf01557921f.tar.zst freebsd-ports-gnome-572bfa7eb3e48adbbf21e6310007baf01557921f.zip |
- Fix the usage of 'python' to get rid of the implicit lang/python
dependency
Diffstat (limited to 'devel')
-rw-r--r-- | devel/ros-common_msgs/Makefile | 14 | ||||
-rw-r--r-- | devel/ros-documentation/Makefile | 4 | ||||
-rw-r--r-- | devel/ros-nxt/Makefile | 8 | ||||
-rw-r--r-- | devel/ros/Makefile | 13 | ||||
-rw-r--r-- | devel/ros_comm/Makefile | 6 |
5 files changed, 35 insertions, 10 deletions
diff --git a/devel/ros-common_msgs/Makefile b/devel/ros-common_msgs/Makefile index 2a25520916d5..0230024add86 100644 --- a/devel/ros-common_msgs/Makefile +++ b/devel/ros-common_msgs/Makefile @@ -5,7 +5,7 @@ PORTNAME= ros-common_msgs PORTVERSION= 1.4.0 PORTREVISION= 1 CATEGORIES= devel -MASTER_SITES= https://code.ros.org/svn/release/download/stacks/common_msgs/common_msgs-${PORTVERSION}/ +MASTER_SITES= https://code.ros.org/svn/release/download/stacks/common_msgs/common_msgs-${PORTVERSION}/ DISTNAME= common_msgs-${PORTVERSION} DIST_SUBDIR= ros @@ -20,10 +20,18 @@ BUILD_DEPENDS= rosmake:${PORTSDIR}/devel/ros \ ${LOCALBASE}/ros/stacks/ros_comm/stack.xml:${PORTSDIR}/devel/ros_comm RUN_DEPENDS= roscore:${PORTSDIR}/devel/ros \ ${LOCALBASE}/ros/stacks/ros_comm/stack.xml:${PORTSDIR}/devel/ros_comm -USE_PYTHON= yes + +USES= shebangfix +USE_PYTHON= 2 USE_BZIP2= yes USE_LDCONFIG= yes +python_OLD_CMD= /usr/bin/env python +python_CMD= /usr/bin/env python2 +SHEBANG_FILES= actionlib_msgs/genaction.py \ + stereo_msgs/migration_rules/split_rawstereo.py \ + test_common_msgs/test/test_common_msgs_migration.py + # rosmake does its own threading MAKE_JOBS_UNSAFE= yes @@ -55,7 +63,7 @@ do-install: ${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/ros/stacks/${STACKNAME} .endfor #strip and symlink ELF libraries -.for f in sensor_msgs/lib/libsensor_msgs.so +.for f in sensor_msgs/lib/libsensor_msgs.so ${STRIP_CMD} ${PREFIX}/ros/stacks/${STACKNAME}/${f} ${LN} -s ${PREFIX}/ros/stacks/${STACKNAME}/${f} ${PREFIX}/lib .endfor diff --git a/devel/ros-documentation/Makefile b/devel/ros-documentation/Makefile index 9afc6a837f8d..e5760473671b 100644 --- a/devel/ros-documentation/Makefile +++ b/devel/ros-documentation/Makefile @@ -23,7 +23,7 @@ RUN_DEPENDS= rosrun:${PORTSDIR}/devel/ros \ sphinx-build:${PORTSDIR}/textproc/py-sphinx \ doxygen:${PORTSDIR}/devel/doxygen \ epydoc:${PORTSDIR}/devel/epydoc -USE_PYTHON= yes +USE_PYTHON= 2 USE_BZIP2= yes # rosmake does its own threading @@ -40,6 +40,8 @@ MAKE_ARGS= -i --no-rosdep --status-rate=0 --disable-logging NO_STAGE= yes post-patch: + @${GREP} -l -r "^#\!/usr/bin/env python" ${WRKSRC} | ${XARGS} \ + ${REINPLACE_CMD} -E -e "s|#!/usr/bin/env python|#!/usr/bin/env python2|" # fix path to bash ${GREP} -l -r "^#\! /bin/bash" ${WRKSRC} | ${XARGS} \ ${REINPLACE_CMD} -E -e "s|#! /bin/bash|#!${LOCALBASE}/bin/bash|" diff --git a/devel/ros-nxt/Makefile b/devel/ros-nxt/Makefile index 592cb9fd5bd9..5268287ff3c1 100644 --- a/devel/ros-nxt/Makefile +++ b/devel/ros-nxt/Makefile @@ -36,7 +36,7 @@ RUN_DEPENDS= roscore:${PORTSDIR}/devel/ros \ ${LOCALBASE}/ros/stacks/common_msgs/stack.xml:${PORTSDIR}/devel/ros-common_msgs \ ${LOCALBASE}/ros/stacks/geometry/stack.xml:${PORTSDIR}/math/ros-geometry \ ${PYTHON_SITELIBDIR}/usb.so:${PORTSDIR}/devel/py-usb -USE_PYTHON= yes +USE_PYTHON= 2 USE_BZIP2= yes # rosmake does its own threading @@ -67,6 +67,12 @@ post-extract: # and keeping it here breaks rospack ${RM} -rf ${WRKSRC}/nxt_rviz_plugin +post-patch: + @${GREP} -l -r "^#\!/usr/bin/env python" ${WRKSRC} | ${XARGS} \ + ${REINPLACE_CMD} -E -e "s|#!/usr/bin/env python|#!/usr/bin/env python2|" + @${REINPLACE_CMD} -e 's|python setup.py|python2 setup.py|' \ + ${WRKSRC}/nxt_python/Makefile + do-build: (cd ${WRKSRC} ; ${MAKE_ENV} ${LOCALBASE}/bin/rosmake ${MAKE_ARGS}) diff --git a/devel/ros/Makefile b/devel/ros/Makefile index 8264007b75a7..42d2f911b7b9 100644 --- a/devel/ros/Makefile +++ b/devel/ros/Makefile @@ -30,7 +30,7 @@ RUN_DEPENDS= ${PYTHON_SITELIBDIR}/yaml/__init__.py:${PORTSDIR}/devel/py-yaml \ gmake:${PORTSDIR}/devel/gmake \ sudo:${PORTSDIR}/security/sudo \ wget:${PORTSDIR}/ftp/wget -USE_PYTHON= yes +USE_PYTHON= 2 USE_BZIP2= yes USE_LDCONFIG= yes USES= pkgconfig @@ -56,12 +56,19 @@ PORTDOCS= AUTHORS README NO_STAGE= yes post-patch: + ${GREP} -l -r "^#! /usr/bin/env python" ${WRKSRC} | ${XARGS} \ + ${REINPLACE_CMD} -E -e "s|^#! /usr/bin/env python$$|#!/usr/bin/env python2|;" + ${GREP} -l -r "^#!/usr/bin/env python$$" ${WRKSRC} | ${XARGS} \ + ${REINPLACE_CMD} -E -e "s|^#!/usr/bin/env python$$|#!/usr/bin/env python2|;" # fix path to bash ${GREP} -l -r "^#\!/bin/bash" ${WRKSRC} | ${XARGS} \ - ${REINPLACE_CMD} -E -e "s|#!/bin/bash|#!${LOCALBASE}/bin/bash|" + ${REINPLACE_CMD} -E -e "s|#!/bin/bash|#!${LOCALBASE}/bin/bash|" # temporarily alter how ROS is built for the port build ${REINPLACE_CMD} -E -e "s|rosmake --rosdep-install|bin/rosmake --no-rosdep --disable-logging -i -a|" \ - ${WRKSRC}/Makefile + ${WRKSRC}/Makefile + ${REINPLACE_CMD} -e 's|COMMAND python|COMMAND python2|' \ + ${WRKSRC}/core/rosbuild/public.cmake \ + ${WRKSRC}/core/rosbuild/private.cmake post-build: # restore original ROS Makefile diff --git a/devel/ros_comm/Makefile b/devel/ros_comm/Makefile index 5a19bf03a524..c252a83fd8d5 100644 --- a/devel/ros_comm/Makefile +++ b/devel/ros_comm/Makefile @@ -22,7 +22,7 @@ BUILD_DEPENDS= rosmake:${PORTSDIR}/devel/ros \ RUN_DEPENDS= roscore:${PORTSDIR}/devel/ros \ f2py:${PORTSDIR}/math/py-numpy \ pilconvert.py:${PORTSDIR}/graphics/py-imaging -USE_PYTHON= yes +USE_PYTHON= 2 USE_BZIP2= yes USE_LDCONFIG= yes @@ -43,6 +43,8 @@ post-patch: # fix path to bash ${GREP} -l -r "^#\!/bin/bash" ${WRKSRC} | ${XARGS} \ ${REINPLACE_CMD} -E -e "s|#!/bin/bash|#!${LOCALBASE}/bin/bash|" + ${GREP} -l -r "^#\!/usr/bin/env python" ${WRKSRC} | ${XARGS} \ + ${REINPLACE_CMD} -E -e "s|#!/usr/bin/env python|#!/usr/bin/env python2|" do-build: (cd ${WRKSRC} ; ${MAKE_ENV} ${LOCALBASE}/bin/rosmake ${MAKE_ARGS}) @@ -58,7 +60,7 @@ do-install: ${FIND} ${WRKSRC}/${d} -name build -type d -or -name \*.bak -type f \ -or -name .svnignore -type f -or -name .cvsignore -type f \ -or -name \*.orig -type f | ${XARGS} ${RM} -rf - (cd ${WRKSRC} && ${COPYTREE_SHARE} ${d} ${PREFIX}/ros/stacks/${STACKNAME}) + (cd ${WRKSRC} && ${COPYTREE_SHARE} ${d} ${PREFIX}/ros/stacks/${STACKNAME}) .endfor # strip and symlink ELF libraries .for f in clients/cpp/roscpp/lib/libros.so \ |