PKGNAME=intel-compute-runtime
PKGSEC=libs
PKGDEP="gcc-runtime intel-gmmlib intel-graphics-compiler"
BUILDDEP="igsc level-zero libva opencl-registry-api"
PKGDES="Intel Graphics Compute Runtime for oneAPI Level Zero and OpenCL Driver"

ABTYPE=cmakeninja
CMAKE_AFTER=(
    "-DKHRONOS_GL_HEADERS_DIR=/usr/include"
    "-DKHRONOS_HEADERS_DIR=/usr/include"
    "-DNEO_DISABLE_LD_GOLD:BOOL=ON"
    "-DNEO_OCL_VERSION_MAJOR=${PKGVER%%.*}"
    "-DNEO_OCL_VERSION_MINOR=$(echo ${PKGVER} | cut -d . -f2)"
    "-DNEO_VERSION_BUILD=$(echo ${PKGVER} | cut -d . -f3)"
    "-DSKIP_UNIT_TESTS=1"
    "-DSUPPORT_DG1=ON"
    "-DSUPPORT_DG2=ON"
)

NOLTO=1
FAIL_ARCH="@(loongarch64_nosimd|loongson3|riscv64|ppc64el)"
