blob: 560fe519eb3f225e4800d2924199a6800896da05 (
plain)
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
|
# $FreeBSD$
PORTNAME= pcl
DISTVERSIONPREFIX= ${PORTNAME}-
DISTVERSION= 1.9.1
PORTREVISION= 3
CATEGORIES= graphics math
PKGNAMESUFFIX= -pointclouds
PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
PATCHFILES+= 5605910a26f2.patch:-p1
MAINTAINER= yuri@FreeBSD.org
COMMENT= Point Cloud Library
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
BROKEN_i386= undefined reference to `__atomic_load'
NOT_FOR_ARCHS= armv6 armv7
NOT_FOR_ARCHS_REASON= common/include/pcl/pcl_macros.h:420:4: error: aligned_malloc not supported on your platform
LIB_DEPENDS= libboost_system.so:devel/boost-libs \
libexpat.so:textproc/expat2 \
libflann_cpp.so:math/flann \
libfreetype.so:print/freetype2 \
libpcap.so:net/libpcap \
libtiff.so:graphics/tiff
USES= cmake eigen:3 jpeg python
USE_GITHUB= yes
GH_ACCOUNT= PointCloudLibrary
USE_XORG= x11 xext xt ice sm
USE_LDCONFIG= yes
PLIST_SUB= SHL3=${DISTVERSION} SHL2=${DISTVERSION:R}
DATADIR= ${PREFIX}/share/${PORTNAME}-${DISTVERSION:R} # match the directory where the project installs .cmake files
OPTIONS_DEFINE= OPENGL PNG QHULL QT5 VTK
OPTIONS_DEFAULT= PNG QHULL
OPTIONS_SUB= yes
OPENGL_CMAKE_BOOL= WITH_OPENGL # it finds OpenGL, but no binaries are linked with it: https://github.com/PointCloudLibrary/pcl/issues/2641
OPENGL_USES= gl
OPENGL_USE= GL=gl,glu
PNG_CMAKE_BOOL= WITH_PNG
PNG_LIB_DEPENDS= libpng.so:graphics/png
QHULL_DESC= Include convex-hull operations
QHULL_CMAKE_BOOL= WITH_QHULL
QHULL_LIB_DEPENDS= libqhull.so:math/qhull5
QT5_CMAKE_BOOL= WITH_QT
QT5_BROKEN= WITH_QT doesn't do anything, should be used by apps, but apps is also broken: see https://github.com/PointCloudLibrary/pcl/issues/2642
VTK_DESC= Build VTK-Visualizations
VTK_CMAKE_BOOL= WITH_VTK
VTK_LIB_DEPENDS= libvtkCommonCore-8.1.so:math/vtk8
VTK_BROKEN= VTK has missing ompxx symbols: https://gitlab.kitware.com/vtk/vtk/issues/17444
.if !exists(/usr/lib/libstdc++.so)
# use clang from ports because cmake can't find OpenMP with base clang, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223678
# This should also be an port option, but PCL fails to build w/out OpenMP: https://github.com/PointCloudLibrary/pcl/issues/2638
BUILD_DEPENDS+= clang${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT}
CPP= clang-cpp${LLVM_DEFAULT}
CC= clang${LLVM_DEFAULT}
CXX= clang++${LLVM_DEFAULT}
.else
USE_GCC= yes
.endif
post-patch: # 10 doesn't have std::sqrt, switching to ::sqrt from math.h
@${GREP} -rl std::sqrt ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e 's|::std::sqrt|::sqrt|g ; s|std::sqrt|::sqrt|g'
.include <bsd.port.mk>
|