aboutsummaryrefslogtreecommitdiffstats
path: root/testing/opensubdiv/APKBUILD
blob: 0cd1421d621fa3f703e616b85d864b85cb8ff6e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Contributor: Mark Riedesel <mark@klowner.com>
# Maintainer: Mark Riedesel <mark@klowner.com>
pkgname=opensubdiv
_pkgname=OpenSubdiv
pkgver=3.0.5
_pkgver=${pkgver//./_}
pkgrel=4
pkgdesc="An Open-Source subdivision surface library"
url="http://graphics.pixar.com/opensubdiv"
arch="all"
license="Apache-2.0"
makedepends="cmake glew-dev glfw-dev doxygen py3-docutils libxcursor-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tutorials $pkgname-tools"
source="$pkgname-$pkgver.tar.gz::https://github.com/PixarAnimationStudios/$_pkgname/archive/v$_pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$_pkgver"

build() {
	mkdir -p "$builddir"/build
	cd "$builddir"/build

	cmake .. \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_SKIP_RPATH=TRUE \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DNO_TBB=TRUE \
		-DNO_PTEX=TRUE \
		-DNO_MAYA=TRUE \
		-DNO_CUDA=TRUE \
		-DNO_OPENCL=TRUE
	make
}

package() {
	cd "$builddir"/build
	make DESTDIR="$pkgdir" install
}

tutorials() {
	pkgdesc="$pkgdesc (tutorials)"
	depends="$pkgname"

	cd "$pkgdir"

	mkdir -p "$subpkgdir"/usr/bin/
	local tut; for tut in ./usr/bin/tutorials/*; do
		mv $tut "$subpkgdir"/usr/bin/opensubdiv_${tut##*/}
	done
	rmdir ./usr/bin/tutorials
}

tools() {
	pkgdesc="$pkgdesc (tools)"

	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

sha512sums="cee4c13fd0ef0a8dac6f880bdda8b6eed1ac3c17f7eadbd5f00bb8fe0140ca12a244b7e51edc98186af0551a26ac88e402651837f3f49195d3a9697437b86bf8  opensubdiv-3.0.5.tar.gz"