aboutsummaryrefslogblamecommitdiffstats
path: root/community/opencl/APKBUILD
blob: 4e1d732c6e7dffe4a862015f1d7e61df1963280a (plain) (tree)
1
2
3
4
5
6
7
8
9


                                         
                 
        



                                
                           
                              
                                                          
                                             
                                                                                                                
                                                      







                                                 

         
                                 

                                             
                                             
                                         
                                              



                           


                                               


                                            

 
            
                                                                                                                                                                      
 
# Contributor: Leon Marz <main@lmarz.org>
# Maintainer: Leon Marz <main@lmarz.org>
pkgname=opencl
pkgver=2022.09.30
pkgrel=0
pkgdesc="OpenCL ICD Loader"
url="https://khronos.org/opencl"
arch="all"
license="Apache-2.0"
makedepends="cmake samurai"
depends_dev="$pkgname-headers"
subpackages="$pkgname-headers:headers:noarch $pkgname-dev"
provides="opencl-icd-loader=$pkgver-r$pkgrel"
source="https://github.com/KhronosGroup/OpenCL-SDK/releases/download/v$pkgver/OpenCL-SDK-v$pkgver-Source.tar.gz"
options="!check" # tests are not functioning correctly
builddir="$srcdir/OpenCL-SDK-v$pkgver-Source"

prepare() {
	default_prepare

	# build artifacts are somehow included...
	rm -rf "$builddir/build"
}

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_INSTALL_DATADIR=lib \
		-DCMAKE_BUILD_TYPE=None \
		-DOPENCL_SDK_BUILD_SAMPLES=OFF
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

headers() {
	pkgdesc="OpenCL development headers"
	amove usr/include
}

sha512sums="
df7af993b286f2beba660b17e54e0419b049f8d0bcfec13386b22b4a631362058d1903e39765bb9e5ad26fdca0fb1223fdc0b128c32b0935edda99affc6cc1bc  OpenCL-SDK-v2022.09.30-Source.tar.gz
"