# Contributor: Mark Riedesel # Contributor: Leon Marz # Maintainer: Leon Marz pkgname=opensubdiv pkgver=3.5.0 _pkgver=${pkgver//./_} pkgrel=0 pkgdesc="An Open-Source subdivision surface library" url="https://graphics.pixar.com/opensubdiv" arch="all !s390x" # ptex isn't available on this arch license="Apache-2.0" makedepends="cmake doxygen glfw-dev libxcursor-dev libxi-dev libxrandr-dev onetbb-dev opencl-dev ptex-dev ptex py3-docutils samurai zlib-dev " subpackages="$pkgname-dev $pkgname-tutorials $pkgname-tools" source="$pkgname-$pkgver.tar.gz::https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v$_pkgver.tar.gz 0001-remove-rpath.patch 0002-Support-oneTBB-2021.patch " builddir="$srcdir/OpenSubdiv-$_pkgver" build() { cmake -B build -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=/usr \ -DNO_CLEW=ON \ -DNO_CUDA=ON \ -DNO_GLTESTS=ON \ -DNO_DOC=ON cmake --build build } check() { cd build CTEST_OUTPUT_ON_FAILURE=TRUE ctest } package() { DESTDIR="$pkgdir" cmake --install build } tutorials() { pkgdesc="$pkgdesc (tutorials)" depends="$pkgname" mkdir -p "$subpkgdir"/usr/bin/ local tut; for tut in "$pkgdir"/usr/bin/tutorials/*; do mv $tut "$subpkgdir"/usr/bin/opensubdiv_${tut##*/} done rmdir "$pkgdir"/usr/bin/tutorials } tools() { pkgdesc="$pkgdesc (tools)" amove usr/bin } sha512sums=" 7ede8f3f335a6306486d649199117401ab4285d360a3b53a536f25046d94741b5e7eacbc06a55d8a0bd5798c810c1b3cfd7964859f04f95363ad26411310b320 opensubdiv-3.5.0.tar.gz 7e82d76196b1be5dd0d0d485e1124bbfe2d75a98155a520d3457135106148ea1313abbb89c8f87acf51f577faacdc09898b67784ea1d4291cbee2a52df4a17c4 0001-remove-rpath.patch ec7327081e614612ca49eff673c95873bcb521041f136de06912f5c2cfe7db84dd00d376ec4630580348e8ca19c03fe52f5d31dad374b824d03c359c1ba12ede 0002-Support-oneTBB-2021.patch "