archrelease: copy trunk to community-any
[ArchLinux/community.git] / opensubdiv / repos / community-x86_64 / PKGBUILD
blob02c6ed8e5b3d35ab2d06100f8811ccfc1e6bad43
1 # Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
2 pkgname=opensubdiv
3 pkgver=3.5.0
4 pkgrel=2
5 pkgdesc="An Open-Source subdivision surface library"
6 arch=(x86_64)
7 url="http://graphics.pixar.com/opensubdiv"
8 license=('APACHE')
9 depends=('ptex' 'intel-tbb' 'libxcursor' 'xorg-xrandr' 'libxinerama' 'libxi')
10 makedepends=('cmake' 'doxygen' 'glfw' 'glew' 'python' 'python-pygments' 'python-docutils' 'opencl-headers' 'cuda' 'libglvnd')
11 source=("https://github.com/PixarAnimationStudios/OpenSubdiv/archive/v${pkgver//./_}.tar.gz"
12         cuda11.patch
13         opensubdiv-tbb2021.patch::https://github.com/PixarAnimationStudios/OpenSubdiv/commit/9079a517.patch)
14 sha512sums=('7ede8f3f335a6306486d649199117401ab4285d360a3b53a536f25046d94741b5e7eacbc06a55d8a0bd5798c810c1b3cfd7964859f04f95363ad26411310b320'
15             '9006762976c15a57d30607189d52d0e620b5024da478dcd41a79a88b350740144a88c1a4f455bfb1b79a9f605e0587c1c828a9b0813301acec8bbb516c2bb292'
16             'c65770d3e65a63c88aa1061e10c5dd6be8616a2479bd5f6d3928c97a5895cfa7d0aac455121db7ee610b9731bfbf07c3f8a26e9cd47623cd1baa046d9aa68cdf')
17 options=(!lto)
19 prepare() {
20   cd "OpenSubdiv-${pkgver//./_}"
22   patch -Np1 -i "${srcdir}"/cuda11.patch
23   patch -Np1 -i "${srcdir}"/opensubdiv-tbb2021.patch # Support TBB 2021
26 build() {
27   cd "OpenSubdiv-${pkgver//./_}"
29   cmake \
30       -Bbuild \
31       -DNO_EXAMPLES=ON \
32       -DNO_REGRESSION=ON \
33       -DNO_TUTORIALS=ON \
34       -DCMAKE_BUILD_TYPE=Release \
35       -DOSD_CUDA_NVCC_FLAGS="-gencode=arch=compute_52,code=sm_52 \
36                              -gencode=arch=compute_53,code=sm_53 \
37                              -gencode=arch=compute_60,code=sm_60 \
38                              -gencode=arch=compute_61,code=sm_61 \
39                              -gencode=arch=compute_62,code=sm_62 \
40                              -gencode=arch=compute_70,code=sm_70 \
41                              -gencode=arch=compute_72,code=sm_72 \
42                              -gencode=arch=compute_75,code=sm_75 \
43                              -gencode=arch=compute_80,code=sm_80 \
44                              -gencode=arch=compute_86,code=sm_86 \
45                              -gencode=arch=compute_87,code=sm_87 \
46                              -gencode=arch=compute_89,code=sm_89 \
47                              -gencode=arch=compute_90,code=sm_90 \
48                              -gencode=arch=compute_90,code=compute_90" \
49       -DCUDA_HOST_COMPILER=/usr/bin/g++ \
50       -DCMAKE_INSTALL_PREFIX=/usr
52   make -C build
55 package() {
56   cd "OpenSubdiv-${pkgver//./_}"
58   DESTDIR="$pkgdir/" make -C build install