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=('7086e5fcf69635801bb311261173cb8d173b712ca1bd78be03df48fad884674e85512861190e45a1a62d5627aaad65cde08c175c44a3be9afa410d3dfd5358d4'
17 '8741ad94b6c46c226d89aebc8ab06d8a11bac3c04d3f0a2bf7a7524792a3375aa7bf7d295410b16fbeb4c348a31057b4570acdebe9bbaea251f44daca8d9fe81')
21 sed -i '/SET_TARGET_PROPERTIES(pybullet PROPERTIES PREFIX/d' examples/pybullet/CMakeLists.txt
25 cp -r bullet3-${_pkgver} bullet3-${_pkgver}-dp
27 export CXXFLAGS+=" -ffat-lto-objects"
32 -DCMAKE_INSTALL_PREFIX=/usr \
33 -DBUILD_SHARED_LIBS=1 \
35 -DINSTALL_EXTRA_LIBS=1 \
37 -DBUILD_PYBULLET_NUMPY=ON \
38 -DBUILD_OPENGL3_DEMOS=ON \
39 -DCMAKE_BUILD_TYPE=Release \
40 -DBULLET2_MULTITHREADING=ON \
41 -DCMAKE_SKIP_RPATH=YES
44 # For Python and docs it doesn't matter whether we build multithreaded or not.
48 cd ../bullet3-${_pkgver}-dp
52 -DCMAKE_INSTALL_PREFIX=/usr \
53 -DBUILD_SHARED_LIBS=1 \
55 -DINSTALL_EXTRA_LIBS=1 \
57 -DBUILD_PYBULLET_NUMPY=ON \
58 -DBUILD_OPENGL3_DEMOS=ON \
59 -DCMAKE_BUILD_TYPE=Release \
60 -DBULLET2_MULTITHREADING=ON \
61 -DUSE_DOUBLE_PRECISION=ON \
62 -DCMAKE_SKIP_RPATH=YES
67 DESTDIR="${pkgdir}" ninja -C build install
71 install -Dm755 examples/ExampleBrowser/libBulletExampleBrowserLib.so.${pkgver} "${pkgdir}"/usr/lib/libBulletExampleBrowserLib.so.${pkgver}
72 install -Dm755 examples/OpenGLWindow/libOpenGLWindow.so "${pkgdir}"/usr/lib/libOpenGLWindow.so
73 install -Dm755 examples/ThirdPartyLibs/Gwen/libgwen.so "${pkgdir}"/usr/lib/libgwen.so
74 install -Dm755 examples/ThirdPartyLibs/BussIK/libBussIK.so "${pkgdir}"/usr/lib/libBussIK.so
75 install -Dm755 "${srcdir}"/bullet3_examplebrowser.sh "${pkgdir}"/usr/bin/bullet3_examplebrowser
76 install -Dm755 examples/ExampleBrowser/App_ExampleBrowser "${pkgdir}"/opt/bullet/App_ExampleBrowser
77 cp -r data "${pkgdir}"/opt/bullet/
79 install -Dm644 ../LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
83 optdepends=('glu: for the example browser'
84 'python: python bindings'
85 'python-numpy: python bindings'
86 'bullet-docs: documentation')
94 pkgdesc="A 3D Collision Detection and Rigid Body Dynamics Library for games and animation (double precision)"
97 optdepends=('glu: for the example browser'
98 'python: python bindings'
99 'python-numpy: python bindings'
100 'bullet-docs: documentation')
102 cd bullet3-${_pkgver}-dp
107 package_python-pybullet() {
108 pkgdesc="Bullet Python bindings"
109 depends+=('bullet' 'gcc-libs')
111 cd bullet3-${_pkgver}
113 install -Dm755 build/examples/pybullet/libpybullet.so.${pkgver} "${pkgdir}"/usr/lib/libpybullet.so.${pkgver}
114 python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
116 install -Dm644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
119 package_bullet-docs() {
120 pkgdesc="Documentation for bullet"
122 cd bullet3-${_pkgver}
125 install -Dm644 docs/GPU_rigidbody_using_OpenCL.pdf "${pkgdir}"/usr/share/doc/bullet/GPU_rigidbody_using_OpenCL.pdf
126 install -Dm644 docs/Bullet_User_Manual.pdf "${pkgdir}"/usr/share/doc/bullet/Bullet_User_Manual.pdf
127 install -Dm644 docs/BulletQuickstart.pdf "${pkgdir}"/usr/share/doc/bullet/BulletQuickstart.pdf
128 cp -r html "${pkgdir}"/usr/share/doc/bullet/html