summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9c262d849e8771ad09a4ca22927ebda69d06dc43 (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
# Maintainer: cysp74 at gmail dot com
_name=pocl
pkgname="${_name}-git"
pkgver=6.0.RC2.r506.gdc61b6ea8
pkgrel=1
epoch=1
pkgdesc="Portable OpenCL is an open-source implementation of OpenCL which can be easily adapted for new targets (git version)"
arch=('x86_64')
url="http://portablecl.org/"
license=('GPL')
depends=('clang' 'hwloc' 'opencl-icd-loader')
makedepends=('git' 'llvm' 'cmake' 'opencl-headers' 'ocl-icd')
provides=("${_name}=${pkgver}" "${_name}-git=${pkgver}")
conflicts=("${_name}")
source=("${_name}::git+https://github.com/pocl/pocl.git")
sha256sums=('SKIP')

pkgver() {
  git -C "${_name}" describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//g'
}

build() {
  mkdir -p build
  cd build

  cmake \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DCMAKE_BUILD_TYPE=Release \
    "${srcdir}/${_name}"
  make
}

package() {
  cd build
  make DESTDIR="${pkgdir}"/ install
}