diff --git a/.gitignore b/.gitignore index 54ae289..dc1f6ec 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ bullet-2.75-free.tar.gz /bullet-2.81-rev2613-free.tar.gz /bullet-2.82-r2704-free.tar.gz /bullet3-2.83-free.tar.xz +/bullet3-2.87-free.tar.xz diff --git a/bullet-2.87-tinyxml.patch b/bullet-2.87-tinyxml.patch new file mode 100644 index 0000000..f6438f0 --- /dev/null +++ b/bullet-2.87-tinyxml.patch @@ -0,0 +1,73 @@ +diff -up ./CMakeLists.txt.tinyxml ./CMakeLists.txt +--- ./CMakeLists.txt.tinyxml 2017-09-29 19:20:39.000000000 -0400 ++++ ./CMakeLists.txt 2017-11-28 19:14:12.377026680 -0500 +@@ -324,6 +324,8 @@ OPTION(BUILD_PYBULLET "Set when you want + OPTION(BUILD_ENET "Set when you want to build apps with enet UDP networking support" ON) + OPTION(BUILD_CLSOCKET "Set when you want to build apps with enet TCP networking support" ON) + ++include(FindPkgConfig) ++pkg_check_modules(tinyxml REQUIRED tinyxml) + + IF(BUILD_PYBULLET) + FIND_PACKAGE(PythonLibs) +diff -up ./Extras/BulletRobotics/CMakeLists.txt.tinyxml ./Extras/BulletRobotics/CMakeLists.txt +--- ./Extras/BulletRobotics/CMakeLists.txt.tinyxml 2017-09-29 19:20:39.000000000 -0400 ++++ ./Extras/BulletRobotics/CMakeLists.txt 2017-11-28 19:14:12.377026680 -0500 +@@ -1,5 +1,6 @@ + + INCLUDE_DIRECTORIES( ++ ${tinyxml_INCLUDE_DIRS} + ${BULLET_PHYSICS_SOURCE_DIR}/src + ${BULLET_PHYSICS_SOURCE_DIR}/examples + ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs +@@ -59,11 +60,6 @@ SET(BulletRobotics_SRCS + ../../examples/Utils/b3ReferenceFrameHelper.hpp + ../../examples/Utils/ChromeTraceUtil.cpp + +- ../../examples/ThirdPartyLibs/tinyxml/tinystr.cpp +- ../../examples/ThirdPartyLibs/tinyxml/tinyxml.cpp +- ../../examples/ThirdPartyLibs/tinyxml/tinyxmlerror.cpp +- ../../examples/ThirdPartyLibs/tinyxml/tinyxmlparser.cpp +- + ../../examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.cpp + ../../examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.h + +@@ -162,7 +158,7 @@ SET_TARGET_PROPERTIES(BulletRobotics PRO + SET_TARGET_PROPERTIES(BulletRobotics PROPERTIES SOVERSION ${BULLET_VERSION}) + + IF (BUILD_SHARED_LIBS) +- TARGET_LINK_LIBRARIES(BulletRobotics BulletInverseDynamicsUtils BulletWorldImporter BulletFileLoader BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamics LinearMath Bullet3Common) ++ TARGET_LINK_LIBRARIES(BulletRobotics BulletInverseDynamicsUtils BulletWorldImporter BulletFileLoader BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamics LinearMath Bullet3Common ${tinyxml_LIBRARIES}) + ENDIF (BUILD_SHARED_LIBS) + + IF (INSTALL_EXTRA_LIBS) +diff -up ./Extras/Serialize/BulletXmlWorldImporter/CMakeLists.txt.tinyxml ./Extras/Serialize/BulletXmlWorldImporter/CMakeLists.txt +--- ./Extras/Serialize/BulletXmlWorldImporter/CMakeLists.txt.tinyxml 2017-11-28 19:15:57.409991121 -0500 ++++ ./Extras/Serialize/BulletXmlWorldImporter/CMakeLists.txt 2017-11-28 19:16:25.840981495 -0500 +@@ -1,4 +1,5 @@ + INCLUDE_DIRECTORIES( ++ ${tinyxml_INCLUDE_DIRS} + ${BULLET_PHYSICS_SOURCE_DIR}/src + ${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/BulletFileLoader + ${BULLET_PHYSICS_SOURCE_DIR}/Extras/Serialize/BulletWorldImporter +@@ -10,19 +11,13 @@ ADD_LIBRARY( + btBulletXmlWorldImporter.h + string_split.cpp + string_split.h +- tinyxml.cpp +- tinyxml.h +- tinystr.cpp +- tinystr.h +- tinyxmlerror.cpp +- tinyxmlparser.cpp + ) + + SET_TARGET_PROPERTIES(BulletXmlWorldImporter PROPERTIES VERSION ${BULLET_VERSION}) + SET_TARGET_PROPERTIES(BulletXmlWorldImporter PROPERTIES SOVERSION ${BULLET_VERSION}) + + IF (BUILD_SHARED_LIBS) +- TARGET_LINK_LIBRARIES(BulletXmlWorldImporter BulletWorldImporter BulletDynamics BulletCollision BulletFileLoader LinearMath) ++ TARGET_LINK_LIBRARIES(BulletXmlWorldImporter BulletWorldImporter BulletDynamics BulletCollision BulletFileLoader LinearMath ${tinyxml_LIBRARIES}) + ENDIF (BUILD_SHARED_LIBS) + + IF (INSTALL_EXTRA_LIBS) diff --git a/bullet.spec b/bullet.spec index 96b1e36..5bb89db 100644 --- a/bullet.spec +++ b/bullet.spec @@ -1,8 +1,8 @@ %global _docdir_fmt %{name} Name: bullet -Version: 2.83 -Release: 6%{?dist} +Version: 2.87 +Release: 1%{?dist} Summary: 3D Collision Detection and Rigid Body Dynamics Library Group: Development/Libraries License: zlib and MIT and BSD and Boost @@ -13,9 +13,12 @@ Source0: %{name}3-%{version}-free.tar.xz # this script to remove the non-free code before shipping it. # Download the upstream tarball and invoke this script while in the # tarball's directory: -# ./generate-tarball.sh 2.82-r2704 +# ./generate-tarball.sh 2.87 Source1: generate-tarball.sh +# Build against system tinyxml +Patch0: %{name}-2.87-tinyxml.patch + BuildRequires: cmake BuildRequires: dos2unix BuildRequires: doxygen @@ -69,9 +72,19 @@ Development headers and libraries for %{name} extra libraries. %prep %setup -q -n %{name}3-%{version} -rm -rf examples -dos2unix README.md +%patch0 -p0 -b .tinyxml +# The examples directory isn't needed for building +rm -r examples + +# Fix the pkg-config module so it doesn't list the prefix twice in the include install dir. sed -i 's|-I@CMAKE_INSTALL_PREFIX@/@INCLUDE_INSTALL_DIR@|-I@INCLUDE_INSTALL_DIR@|' bullet.pc.cmake + +# BulletRobotics and obj2sdf require several bundled libs not yet packaged in the distribution +sed -i 's|BulletRobotics||' Extras/CMakeLists.txt +sed -i 's|obj2sdf||' Extras/CMakeLists.txt + +# Fix up file permissions and formats +dos2unix README.md chmod -x src/BulletDynamics/ConstraintSolver/btSliderConstraint.h chmod -x src/BulletDynamics/ConstraintSolver/btSliderConstraint.cpp @@ -79,11 +92,14 @@ chmod -x src/BulletDynamics/ConstraintSolver/btSliderConstraint.cpp mkdir build pushd build %cmake .. \ + -DCLSOCKET_DEP_ONLY=ON \ -DBUILD_BULLET2_DEMOS=OFF \ -DBUILD_EXTRAS=ON \ + -DBUILD_OPENGL_DEMOS=OFF \ + -DBUILD_CPU_DEMOS=OFF \ + -DBUILD_UNIT_TESTS=OFF \ -DINSTALL_EXTRA_LIBS=ON \ - -DCMAKE_BUILD_TYPE=NONE \ - -DCMAKE_SKIP_BUILD_RPATH=ON \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DINCLUDE_INSTALL_DIR=%{_includedir}/bullet/ make %{?_smp_mflags} @@ -92,22 +108,7 @@ popd doxygen Doxyfile %install -rm -rf $RPM_BUILD_ROOT -pushd build -make install DESTDIR=$RPM_BUILD_ROOT -popd - -# Create symlinks for .so.X -pushd $RPM_BUILD_ROOT%{_libdir} -for f in lib*.so.*.* -do - ln -sf $f ${f%\.*} -done -popd - - -%clean -rm -rf $RPM_BUILD_ROOT +%make_install -C build %post -p /sbin/ldconfig @@ -128,6 +129,7 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libBullet3OpenCL_clew.so.* %{_libdir}/libBulletCollision.so.* %{_libdir}/libBulletDynamics.so.* +%{_libdir}/libBulletInverseDynamics.so.* %{_libdir}/libBulletSoftBody.so.* %{_libdir}/libLinearMath.so.* @@ -141,7 +143,9 @@ rm -rf $RPM_BUILD_ROOT %{_includedir}/%{name}/Bullet3OpenCL %{_includedir}/%{name}/BulletCollision %{_includedir}/%{name}/BulletDynamics +%{_includedir}/%{name}/BulletInverseDynamics %{_includedir}/%{name}/BulletSoftBody +%{_includedir}/%{name}/InverseDynamics %{_includedir}/%{name}/LinearMath %{_libdir}/libBullet3Collision.so %{_libdir}/libBullet3Common.so @@ -150,6 +154,7 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libBullet3OpenCL_clew.so %{_libdir}/libBulletCollision.so %{_libdir}/libBulletDynamics.so +%{_libdir}/libBulletInverseDynamics.so %{_libdir}/libBulletSoftBody.so %{_libdir}/libLinearMath.so %{_libdir}/pkgconfig/bullet.pc @@ -167,6 +172,7 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libHACD.so.* %{_libdir}/libBulletFileLoader.so.* %{_libdir}/libBullet2FileLoader.so.* +%{_libdir}/libBulletInverseDynamicsUtils.so.* %{_libdir}/libBulletWorldImporter.so.* %{_libdir}/libBulletXmlWorldImporter.so.* @@ -183,10 +189,14 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libHACD.so %{_libdir}/libBulletFileLoader.so %{_libdir}/libBullet2FileLoader.so +%{_libdir}/libBulletInverseDynamicsUtils.so %{_libdir}/libBulletWorldImporter.so %{_libdir}/libBulletXmlWorldImporter.so %changelog +* Mon Dec 18 2017 Rich Mattes - 2.87-1 +- Update to release 2.87 (rhbz#1442838) + * Sun Aug 06 2017 Björn Esser - 2.83-6 - Rebuilt for AutoReq cmake-filesystem diff --git a/generate-tarball.sh b/generate-tarball.sh index e949bc9..8466b81 100644 --- a/generate-tarball.sh +++ b/generate-tarball.sh @@ -16,7 +16,8 @@ tar -xzvf $NAME-$VERSION.tgz rm -rf $NAME-$VERSION/build3/*.{bat,exe} rm -rf $NAME-$VERSION/build3/xcode* rm -rf $NAME-$VERSION/build3/*osx* -rm -rf $NAME-$VERSION/build3/premake4_* +rm -rf $NAME-$VERSION/build3/premake* rm -rf $NAME-$VERSION/data +rm -rf $NAME-$VERSION/examples/ThirdPartyLibs tar -cJvf $NAME-$VERSION-free.tar.xz $NAME-$VERSION diff --git a/sources b/sources index 915c303..0719e2b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -392430f0909a3f913f07fcdb599d4950 bullet3-2.83-free.tar.xz +SHA512 (bullet3-2.87-free.tar.xz) = 391fd2cdfe0932f4bf7e78555d56c2de5c5051cc251d3a3c7d72d942a3f764330295ae207cf670294157fe9508e8a667faf6b75099a282f8c2e2757f01c56b47