summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 83bf7632e2721a7036c470a92d5441c24773e218 (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
# Maintainer: v01d <nospam@gmail.com>
# Contributor: Yuxin Wu <ppwwyyxxc@gmail.com>
# Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: hauptmech
# Contributor: figo.zhang
# Contributor: lubosz

pkgname=pcl-no-examples
pkgver=1.8.0rc1
pkgrel=1
pkgdesc="A comprehensive open source library for n-D Point Clouds and 3D geometry processing"
arch=('x86_64' 'i686')
url='http://www.pointclouds.org'
license=('BSD')
depends=('boost' 'eigen' 'flann' 'vtk' 'qhull' 'qt5-base' 'glu' 'qt5-webkit'
  'openmpi' 'python2' 'libxt')
makedepends=('cmake' 'gl2ps')
optdepends=('cuda' 'openni2' 'python-sphinx')
source=("https://github.com/PointCloudLibrary/pcl/archive/pcl-${pkgver}.tar.gz"
        "vtk7.patch")
sha256sums=('18ff4519026a7885d2fd0ee1d06939a7755e83e082840e4929fb2883948e5142'
            'eaf5f90ded00d47ae8fbb34c3cc8878e694f44b684038a9c593c432035a0b2c1')
conflicts=(pcl)
provides=(pcl)

prepare() {
  cd "${srcdir}/pcl-pcl-${pkgver}"

  # Patch to support boost 1.5.6:
  # 1. Api change. See http://www.pcl-users.org/PCL-compilation-errors-Please-help-me-td4035209.html
  # This patch is not necessary for now.
  # sed -i "s/boost::property_tree::xml_writer_settings.*/boost::property_tree::xml_writer_settings<std::string> settings = boost::property_tree::xml_writer_make_settings<std::string>('\\\t', 1);/g" io/src/lzf_image_io.cpp
  # 2. Qt moc parser fails on some boost headers files. Try to get around.
  grep -rl '#include <boost/date_time/posix_time/posix_time.hpp>' . \
    | xargs sed -i "s/#include <boost.*posix_time.hpp>/#ifndef Q_MOC_RUN\n\r#include <boost\\/date_time\\/posix_time\\/posix_time.hpp>\n\r#endif/g"

  patch -p1 < ../vtk7.patch

  # [[ -d build ]] && rm -r build
  mkdir -p build && cd build

  # -DBUILD_gpu_people=OFF \ Disable until CUDA npp detection is fixed in cmake
  cmake .. \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DBUILD_apps=ON \
    -DBUILD_apps_cloud_composer=OFF \
    -DBUILD_apps_in_hand_scanner=ON \
    -DBUILD_apps_modeler=ON \
    -DBUILD_apps_point_cloud_editor=OFF \
    -DBUILD_examples=OFF \
    -DBUILD_global_tests=OFF \
    -DBUILD_surface_on_nurbs=ON \
    -DBUILD_CUDA=ON \
    -DBUILD_cuda_io=ON \
    -DBUILD_cuda_apps=ON \
    -DBUILD_GPU=ON \
    -DBUILD_gpu_surface=ON \
    -DBUILD_gpu_tracking=ON \
    -DBUILD_app_3d_rec_framework=ON \
    -DBUILD_simulation=ON
}

build() {
  cd "${srcdir}/pcl-pcl-${pkgver}/build"
  make
}

package() {
  cd "${srcdir}/pcl-pcl-${pkgver}/build"
  make DESTDIR=${pkgdir} install

  install -Dm644 ../LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}