1# Contributor: Leo <thinkabit.ukim@gmail.com>2# Contributor: Matthias Ahouansou <matthias@ahouansou.cz>3maintainer="Lindsay Zhou <i@lin.moe>"4pkgname=intel-gmmlib-lg5_pkgname=intel-gmmlib6pkgver=22.9.07pkgrel=08pkgdesc="Intel Graphics Memory Management Library"9options="!check" # tests can't run in check(), only on install10url="https://github.com/intel/gmmlib/"11arch="loongarch64"12license="MIT"13makedepends="cmake samurai simde-lg-dev"14subpackages="$pkgname-dev"15source="$_pkgname-$pkgver.tar.gz::https://github.com/intel/gmmlib/archive/intel-gmmlib-$pkgver.tar.gz16 add-loongarch64-build-support.patch17 "18builddir="$srcdir/gmmlib-intel-gmmlib-$pkgver"1920build() {21 if [ "$CBUILD" != "$CHOST" ]; then22 CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"23 fi2425 cmake -B build -G Ninja \26 -DCMAKE_INSTALL_PREFIX=/usr \27 -DCMAKE_INSTALL_LIBDIR=lib \28 -DBUILD_SHARED_LIBS=True \29 -DCMAKE_BUILD_TYPE=Release \30 -DRUN_TEST_SUITE=OFF --log-level=VERBOSE \31 $CMAKE_CROSSOPTS32 cmake --build build33}3435package() {36 DESTDIR="$pkgdir" cmake --install build37}3839sha512sums="40c54581e4927bfedd7cb4084111cce69c9ee14f0047f6d16d26358e9d41feb8d28d5158f7fbdfbe4980dae904e7c2065deed19fd2f91e32b49fd7b984d47c0f44 intel-gmmlib-22.9.0.tar.gz41890aa85cc0832572c80308d9352ed421ee526a82d42102ee67d872afe601fbed3c6287d76ab922cc537bd5a6dbeba82c134fca0e1ab00e588e36525b5ecb519c add-loongarch64-build-support.patch42"