blob: 38a5d2ecf89676df762c160d45dfdb8fe3dbe922 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
# Created by: Rene Ladan <rene@FreeBSD.org>
# $FreeBSD$
PORTNAME= ros-geometry
PORTVERSION= 1.4.2
PORTREVISION= 3
CATEGORIES= math
MASTER_SITES= https://code.ros.org/svn/release/download/stacks/${STACKNAME}/${STACKNAME}-${PORTVERSION}/:rel \
http://pr.willowgarage.com/downloads/:pr \
https://code.ros.org/svn/release/download/thirdparty/eigen/:tp
DISTFILES= geometry-${PORTVERSION}.tar.bz2:rel \
bullet-2.76-patched2.tar.gz:pr \
eigen-3.0prebeta3.tar.bz2:tp kdl-32171.tar.gz:pr
DIST_SUBDIR= ros
EXTRACT_ONLY= geometry-${PORTVERSION}.tar.bz2
MAINTAINER= ports@FreeBSD.org
COMMENT= Robot Operating System - geometric and math libraries
#LICENSE_COMB= multi
#LICENSE= BSD LGPL* Zlib # which LGPL and Zlib not defined yet
STACKNAME= ${PORTNAME:S/ros-//}
WRKSRC= ${WRKDIR}/${STACKNAME}-${PORTVERSION}
BUILD_DEPENDS= rosmake:${PORTSDIR}/devel/ros \
${LOCALBASE}/ros/stacks/ros_comm/stack.xml:${PORTSDIR}/devel/ros_comm \
${LOCALBASE}/ros/stacks/common_msgs/stack.xml:${PORTSDIR}/devel/ros-common_msgs \
chrpath:${PORTSDIR}/devel/chrpath \
cppunit-config:${PORTSDIR}/devel/cppunit \
${PYTHON_SITELIBDIR}/sipconfig.py:${PORTSDIR}/devel/py-sip
RUN_DEPENDS= roscore:${PORTSDIR}/devel/ros \
${LOCALBASE}/ros/stacks/ros_comm/stack.xml:${PORTSDIR}/devel/ros_comm \
${LOCALBASE}/ros/stacks/common_msgs/stack.xml:${PORTSDIR}/devel/ros-common_msgs
USE_PYTHON= yes
USE_BZIP2= yes
USE_LDCONFIG= yes
USE_GL= glut
# rosmake does its own threading
MAKE_JOBS_UNSAFE= yes
CFLAGS+= -I${LOCALBASE}/include
MAKE_ENV+= CPATH=${LOCALBASE}/include \
LIBRARY_PATH=${LOCALBASE}/lib \
MAKE=${LOCALBASE}/bin/gmake \
ROS_ROOT=${LOCALBASE}/ros/ros \
ROS_PACKAGE_PATH=${LOCALBASE}/ros/stacks/common_msgs:${LOCALBASE}/ros/stacks/ros_comm:${WRKSRC} \
PYTHONPATH=${LOCALBASE}/ros/ros/core/roslib/src
MAKE_ARGS= -i --no-rosdep --status-rate=0 --disable-logging
NO_STAGE= yes
post-extract:
# move 3rd-party distfiles into place
${MKDIR} ${WRKSRC}/bullet/build
${CP} ${_DISTDIR}/bullet-2.76-patched2.tar.gz ${WRKSRC}/bullet/build
${MKDIR} ${WRKSRC}/eigen/build
${CP} ${_DISTDIR}/eigen-3.0prebeta3.tar.bz2 ${WRKSRC}/eigen/build
${MKDIR} ${WRKSRC}/kdl/build
${CP} ${_DISTDIR}/kdl-32171.tar.gz ${WRKSRC}/kdl/build
# already extract and mark as such because we have to patch it (clang)
# fixed in bullet 2.77
(cd ${WRKSRC}/bullet/build ; \
${TAR} -xf bullet-2.76-patched2.tar.gz ; \
${TOUCH} bullet_svn/unpacked)
do-build:
(cd ${WRKSRC} ; ${MAKE_ENV} ${LOCALBASE}/bin/rosmake ${MAKE_ARGS})
do-install:
${MKDIR} ${PREFIX}/ros/stacks/${STACKNAME}
# update .pc file
${REINPLACE_CMD} -E -e "s|${WRKSRC}|${PREFIX}/ros/stacks/${STACKNAME}|" \
${WRKSRC}/kdl/lib/pkgconfig/orocos-kdl.pc
${INSTALL_DATA} ${WRKSRC}/kdl/lib/pkgconfig/orocos-kdl.pc ${PREFIX}/libdata/pkgconfig
# delete files explicitly because negation in find (for COPYTREE_SHARE) is bogus
.for d in angles bullet eigen eigen_conversions kdl tf tf_conversions
${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 -or -name \*.pc -type f \
-or -name \*.md5sum -type f -or -name installed -type f \
-or -name wiped -type f| ${XARGS} ${RM} -rf
(cd ${WRKSRC} ; ${COPYTREE_SHARE} ${d} ${PREFIX}/ros/stacks/${STACKNAME})
.endfor
.for f in CMakeLists.txt Makefile stack.xml rosdep.yaml
${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/ros/stacks/${STACKNAME}
.endfor
# strip ELF programs and make them executable
.for f in tf/bin/change_notifier tf/bin/static_transform_publisher \
tf/bin/tf_echo tf/bin/tf_monitor tf/test/btTest tf/test/testBroadcaster
${STRIP_CMD} ${PREFIX}/ros/stacks/${STACKNAME}/${f}
${LOCALBASE}/bin/chrpath -d ${PREFIX}/ros/stacks/${STACKNAME}/${f}
${CHMOD} 0555 ${PREFIX}/ros/stacks/${STACKNAME}/${f}
.endfor
# strip and symlink ELF libaries
.for f in bullet/lib/libBulletCollision.so.2.76 \
bullet/lib/libBulletDynamics.so.2.76 bullet/lib/libBulletSoftBody.so.2.76 \
bullet/lib/libLinearMath.so.2.76 \
eigen_conversions/lib/libeigen_conversions.so \
kdl/lib/liborocos-kdl.so.1.0.99 kdl/lib/PyKDL.so tf/lib/_tf.so \
tf/lib/libtf.so tf_conversions/lib/libtf_conversions.so
${STRIP_CMD} ${PREFIX}/ros/stacks/${STACKNAME}/${f}
${LOCALBASE}/bin/chrpath -d ${PREFIX}/ros/stacks/${STACKNAME}/${f}
${LN} -s ${PREFIX}/ros/stacks/${STACKNAME}/${f} ${PREFIX}/lib
.endfor
# symbolic links
.for f in bullet/lib/libBulletCollision.so bullet/lib/libBulletDynamics.so \
bullet/lib/libBulletSoftBody.so bullet/lib/libLinearMath.so \
kdl/lib/liborocos-kdl.so kdl/lib/liborocos-kdl.so.1.0
${LN} -s ${PREFIX}/ros/stacks/${STACKNAME}/${f} ${PREFIX}/lib
.endfor
# make scripts executable
.for f in eigen/scripts/e2_to_eigen2support.sh \
eigen/scripts/recursive_eigen2_port.sh \
tf/scripts/python_benchmark.py \
tf/scripts/tf_remap tf/scripts/view_frames \
tf/test/test_datatype_conversion.py
${CHMOD} 0555 ${PREFIX}/ros/stacks/${STACKNAME}/${f}
.endfor
post-install:
${PYTHON_CMD} -O -mcompileall ${PREFIX}/ros/stacks/${STACKNAME}/
${PYTHON_CMD} -mcompileall ${PREFIX}/ros/stacks/${STACKNAME}/
.include <bsd.port.mk>
|