aboutsummaryrefslogtreecommitdiffstats
path: root/community/bullet/APKBUILD
blob: b2e71a62fb356b7afa95fd80a9c7b6906faffdc6 (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
61
62
63
64
65
# Contributor: Danct12 <danct12@disroot.org>
# Contributor: Asriel Dreemurr <asriel.danctnix@gmail.com>
# Maintainer: Danct12 <danct12@disroot.org>
pkgname=bullet
pkgver=3.24
pkgrel=0
pkgdesc="A 3D Collision Detection and Rigid Body Dynamics Library for games and animation"
url="https://pybullet.org/Bullet/phpBB3/"
arch="all"
license="Zlib"
makedepends="
	cmake
	doxygen
	font-dejavu
	glu-dev
	graphviz-dev
	mesa-dev
	py3-numpy-dev
	python3-dev
	samurai
	"
options="!check" # cannot build tests
subpackages="$pkgname-dev $pkgname-doc py3-$pkgname:py3"
source="bullet3-$pkgver.tar.gz::https://github.com/bulletphysics/bullet3/archive/$pkgver.tar.gz
	ppc64le.patch
	"
builddir="$srcdir/bullet3-$pkgver"

build() {
	CXXFLAGS="$CXXFLAGS -flto=auto" \
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=Release \
		-DBUILD_PYBULLET=ON \
		-DBUILD_PYBULLET_NUMPY=ON \
		-DBUILD_SHARED_LIBS=True \
		-DBUILD_UNIT_TESTS=OFF \
		-DBULLET2_MULTITHREADING=ON \
		-DCMAKE_SKIP_RPATH=ON \
		-DINSTALL_EXTRA_LIBS=ON \
		-DINSTALL_LIBS=ON \
		-DUSE_DOUBLE_PRECISION=ON
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build

	# Install LICENSE
	install -Dm644 "$builddir"/LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
	install -Dm644 "$builddir"/docs/GPU_rigidbody_using_OpenCL.pdf "$pkgdir"/usr/share/doc/bullet/GPU_rigidbody_using_OpenCL.pdf
	install -Dm644 "$builddir"/docs/Bullet_User_Manual.pdf "$pkgdir"/usr/share/doc/bullet/Bullet_User_Manual.pdf
	install -Dm644 "$builddir"/docs/BulletQuickstart.pdf "$pkgdir"/usr/share/doc/bullet/BulletQuickstart.pdf
}

py3() {
	pkgdesc="$pkgdesc (python module)"

	amove usr/lib/python3*
}

sha512sums="
0f8cf009e50853b2ff461414893f09f752774dac3fb51ba158ef670865b61140a13567cadbf7b19d643d24d6207a23f825773edb86234591f83bd19e3fb3d054  bullet3-3.24.tar.gz
39902a1c147cb866bbbade32a2a3eaa0e855ed8203cd55de30fab8c6c43c5f15dea706b4d2123938b34b82105767fa919a4505c473d8139a28193111c967bc76  ppc64le.patch
"