summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4b2efb2bf0171a3b033be0e885d523a153bb8c1c (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
# Maintainer: Blair Bonnett <blair.bonnett@gmail.com>

pkgname=displaz-git
pkgdesc='A hackable LIDAR viewer (Git version)'
pkgver=0.4.0.r107.g91ecf30
pkgrel=1
url='http://c42f.github.io/displaz/'
license=('BSD')
arch=('x86_64')

depends=('glew' 'libLASlib.so' 'libglvnd' 'qt5-base')
makedepends=('cmake' 'git' 'imath' 'python-docutils')

source=(
  'git+https://github.com/c42f/displaz.git'
)
sha256sums=(
  'SKIP'
)

pkgver() {
  cd displaz
  git describe --long --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd displaz/src/render
  sed -i '/#include <string>/a #include <vector>' FrameRate.h
}

build() {
  cmake -B build -S displaz \
        -DCMAKE_BUILD_TYPE='None' \
        -DCMAKE_INSTALL_PREFIX='/usr' \
		-DLASLIB_INCLUDE_DIRS=/usr/include/LASlib \
        -DDISPLAZ_EMBED_GLEW=False \
        -Wno-dev
  cmake --build build
}

check() {
    ctest --test-dir build --output-on-failure
}

package() {
  DESTDIR="$pkgdir" cmake --install build
  cd displaz
  install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE.txt
}