summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 77f9b654770e51a812151303ac4b81131ae8e4f6 (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
# Maintainer: acxz <akashpatel2008 at yahoo dot com>

pkgname=comgr
pkgdesc='Radeon Open Compute - compiler support'
pkgver=3.3.0
pkgrel=2
arch=('x86_64')
url='https://github.com/RadeonOpenCompute/ROCm-CompilerSupport'
license=('custom:NCSAOSL')
depends=()
makedepends=(cmake rocm-cmake rocm-device-libs llvm-amdgpu)
source=("$url/archive/rocm-$pkgver.tar.gz"
        "comgr-find-lld-includes.patch")
sha256sums=('01e2524e0f28ecd6f46c9720f279207de935d826b0172158792aa3ec86af9ca7'
            '4571b16961f15249e8cc8b9a9ae7f0863600345aa5e95959192149eacdb01d2e')
_dirname="$(basename "$url")-$(basename "${source[0]}" .tar.gz)"

prepare() {
  patch -uN ${srcdir}/${_dirname}/lib/comgr/CMakeLists.txt comgr-find-lld-includes.patch
}

build() {
  cmake -DCMAKE_INSTALL_PREFIX=/opt/rocm \
        -DCMAKE_PREFIX_PATH="/opt/rocm/llvm;/opt/rocm" \
        "$_dirname/lib/comgr"

  make
}

package() {
  DESTDIR="$pkgdir" make install
  install -Dm644 "$_dirname/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}