1 # Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
2 # Contributor: Christoph Zeiler <archNOSPAM_at_moonblade.dot.org>
5 pkgname=('bullet' 'bullet-dp' 'bullet-docs' 'python-pybullet')
9 pkgdesc="A 3D Collision Detection and Rigid Body Dynamics Library for games and animation"
11 url="http://www.bulletphysics.com/Bullet/"
12 license=('custom:zlib')
13 makedepends=('cmake' 'doxygen' 'graphviz' 'ttf-dejavu' 'mesa' 'glu' 'python' 'python-numpy' 'python-setuptools' 'ninja')
14 source=("$pkgname-$pkgver.tar.gz::https://github.com/bulletphysics/bullet3/archive/refs/tags/${_pkgver}.tar.gz"
15 bullet3_examplebrowser.sh)
16 sha512sums=('0f8cf009e50853b2ff461414893f09f752774dac3fb51ba158ef670865b61140a13567cadbf7b19d643d24d6207a23f825773edb86234591f83bd19e3fb3d054'
17 '8741ad94b6c46c226d89aebc8ab06d8a11bac3c04d3f0a2bf7a7524792a3375aa7bf7d295410b16fbeb4c348a31057b4570acdebe9bbaea251f44daca8d9fe81')
21 sed -i '/SET_TARGET_PROPERTIES(pybullet PROPERTIES PREFIX/d' examples/pybullet/CMakeLists.txt
25 cp -r bullet3-${_pkgver} bullet3-${_pkgver}-dp
31 -DCMAKE_INSTALL_PREFIX=/usr \
32 -DBUILD_SHARED_LIBS=1 \
34 -DINSTALL_EXTRA_LIBS=1 \
36 -DBUILD_PYBULLET_NUMPY=ON \
37 -DBUILD_OPENGL3_DEMOS=ON \
38 -DCMAKE_BUILD_TYPE=Release \
39 -DBULLET2_MULTITHREADING=ON \
40 -DCMAKE_SKIP_RPATH=YES
43 # For Python and docs it doesn't matter whether we build multithreaded or not.
47 cd ../bullet3-${_pkgver}-dp
51 -DCMAKE_INSTALL_PREFIX=/usr \
52 -DBUILD_SHARED_LIBS=1 \
54 -DINSTALL_EXTRA_LIBS=1 \
56 -DBUILD_PYBULLET_NUMPY=ON \
57 -DBUILD_OPENGL3_DEMOS=ON \
58 -DCMAKE_BUILD_TYPE=Release \
59 -DBULLET2_MULTITHREADING=ON \
60 -DUSE_DOUBLE_PRECISION=ON \
61 -DCMAKE_SKIP_RPATH=YES
66 DESTDIR="${pkgdir}" ninja -C build install
70 install -Dm755 examples/ExampleBrowser/libBulletExampleBrowserLib.so.${pkgver} "${pkgdir}"/usr/lib/libBulletExampleBrowserLib.so.${pkgver}
71 install -Dm755 examples/OpenGLWindow/libOpenGLWindow.so "${pkgdir}"/usr/lib/libOpenGLWindow.so
72 install -Dm755 examples/ThirdPartyLibs/Gwen/libgwen.so "${pkgdir}"/usr/lib/libgwen.so
73 install -Dm755 examples/ThirdPartyLibs/BussIK/libBussIK.so "${pkgdir}"/usr/lib/libBussIK.so
74 install -Dm755 "${srcdir}"/bullet3_examplebrowser.sh "${pkgdir}"/usr/bin/bullet3_examplebrowser
75 install -Dm755 examples/ExampleBrowser/App_ExampleBrowser "${pkgdir}"/opt/bullet/App_ExampleBrowser
76 cp -r data "${pkgdir}"/opt/bullet/
78 install -Dm644 ../LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
82 optdepends=('glu: for the example browser'
83 'python: python bindings'
84 'python-numpy: python bindings'
85 'bullet-docs: documentation')
93 pkgdesc="A 3D Collision Detection and Rigid Body Dynamics Library for games and animation (double precision)"
96 optdepends=('glu: for the example browser'
97 'python: python bindings'
98 'python-numpy: python bindings'
99 'bullet-docs: documentation')
101 cd bullet3-${_pkgver}-dp
106 package_python-pybullet() {
107 pkgdesc="Bullet Python bindings"
108 depends+=('bullet' 'gcc-libs')
110 cd bullet3-${_pkgver}
112 install -Dm755 build/examples/pybullet/libpybullet.so.${pkgver} "${pkgdir}"/usr/lib/libpybullet.so.${pkgver}
113 python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
115 install -Dm644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
118 package_bullet-docs() {
119 pkgdesc="Documentation for bullet"
121 cd bullet3-${_pkgver}
124 install -Dm644 docs/GPU_rigidbody_using_OpenCL.pdf "${pkgdir}"/usr/share/doc/bullet/GPU_rigidbody_using_OpenCL.pdf
125 install -Dm644 docs/Bullet_User_Manual.pdf "${pkgdir}"/usr/share/doc/bullet/Bullet_User_Manual.pdf
126 install -Dm644 docs/BulletQuickstart.pdf "${pkgdir}"/usr/share/doc/bullet/BulletQuickstart.pdf
127 cp -r html "${pkgdir}"/usr/share/doc/bullet/html