summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: de01aa785cff1b43dfbf73b2f3c582b5ff28773c (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
# Maintainer: Torsten Ke├čler <t dot kessler at posteo dot de>
# Contributor: acxz <akashpatel2008 at yahoo dot com>
# Contributer: JP-Ellis <josh@jpellis.me>

pkgname=mivisionx
pkgver=5.1.3
pkgrel=1
pkgdesc="Set of comprehensive computer vision and machine intelligence libraries, utilities"
arch=('x86_64')
url="https://gpuopen-professionalcompute-libraries.github.io/MIVisionX/"
license=('MIT')
depends=('rocm-core' 'rocm-cmake' 'miopengemm' 'miopen' 'protobuf' 'opencv' 'ffmpeg4.4' 'qt5-base')
makedepends=('cmake')
source=("$pkgname-$pkgver.tar.gz::https://github.com/GPUOpen-ProfessionalCompute-Libraries/MIVisionX/archive/rocm-$pkgver.tar.gz")
options=(!lto)
sha256sums=('62591d5caedc13832c3ccef629a88d9c2a43c884daad1124ddcb9c5f7d5470e9')

build() {
  mkdir -p "$srcdir/build"
  cd "$srcdir/build"

  export CXXFLAGS="${CXXFLAGS} -fcf-protection=none -fPIC -isystem /usr/include/ffmpeg4.4"

  cmake -DBACKEND=HIP \
        -DCMAKE_INSTALL_PREFIX=/opt/rocm/mivisionx \
        "$srcdir/MIVisionX-rocm-$pkgver"
  make
}

package() {
  cd "$srcdir/build"

  make DESTDIR="$pkgdir" install

  # add links
  install -d "$pkgdir/usr/bin"
  local _fn
  for _file in bin/* ; do
    _fn="$(basename -- $_file)"
    ln -s "/opt/rocm/mivisionx/bin/$_fn" "$pkgdir/usr/bin/$_fn"
  done
}