makedepends=(cmake intel-media-driver xorg-libdrm libva)

description="oneVPL runtime implementation for Intel GPUs (Tiger Lake and newer)"
url="https://www.intel.com/content/www/us/en/developer/tools/oneapi/onevpl.html"

packager="Great-OS Team"
maintainer="Great-OS Team"

name="onevpl-intel-gpu"
version="24.2.0"
release=1

source=(https://github.com/oneapi-src/oneVPL-intel-gpu/archive/intel-onevpl-$version/onevpl-intel-gpu-$version.tar.gz)

build () { 

  export CFLAGS+=' -DNDEBUG'
  export CXXFLAGS+=' -DNDEBUG'

  cmake -B build -S "vpl-gpu-rt-intel-onevpl-${version}" \
                 -G 'Unix Makefiles' \
                 -DCMAKE_BUILD_TYPE:STRING='None' \
                 -DCMAKE_INSTALL_PREFIX:PATH='/usr' \
                 -DBUILD_TESTS:BOOL='OFF' \
                 -DMFX_ENABLE_AENC:BOOL='ON' \
                 -Wno-dev
  cmake --build build
}

package () { 
  DESTDIR="$PKG" cmake --install build
  install -D -m644 "vpl-gpu-rt-intel-onevpl-${version}"/{LICENSE,NOTICE} -t "${PKG}/usr/share/licenses/${name}"
}
