From cce95f197d2df81a5f1046b10aa7283cd4be86fb Mon Sep 17 00:00:00 2001 From: Rich Mattes Date: Fri, 16 May 2014 16:57:31 -0400 Subject: [PATCH 1/2] Install all of the bullet extras (rhbz#1097452) - Spec file cleanup --- bullet-2.77-extras-version.patch | 12 ----- bullet-2.77-lib.patch | 24 --------- bullet-2.77-zero_initialize.patch | 23 -------- bullet.spec | 88 ++++++++++++++++--------------- 4 files changed, 45 insertions(+), 102 deletions(-) delete mode 100644 bullet-2.77-extras-version.patch delete mode 100644 bullet-2.77-lib.patch delete mode 100644 bullet-2.77-zero_initialize.patch diff --git a/bullet-2.77-extras-version.patch b/bullet-2.77-extras-version.patch deleted file mode 100644 index bc7769a..0000000 --- a/bullet-2.77-extras-version.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up bullet-2.77/Extras/glui/CMakeLists.txt.extras-version bullet-2.77/Extras/glui/CMakeLists.txt ---- bullet-2.77/Extras/glui/CMakeLists.txt.extras-version 2010-03-06 16:23:36.000000000 +0100 -+++ bullet-2.77/Extras/glui/CMakeLists.txt 2010-07-26 12:09:01.000000000 +0200 -@@ -61,6 +61,8 @@ arcball.cpp glui_button.cpp glui_fil - - ) - -+SET_TARGET_PROPERTIES(GLUI PROPERTIES VERSION ${BULLET_VERSION}) -+SET_TARGET_PROPERTIES(GLUI PROPERTIES SOVERSION ${BULLET_VERSION}) - IF (BUILD_SHARED_LIBS) - TARGET_LINK_LIBRARIES(GLUI ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}) - ENDIF (BUILD_SHARED_LIBS) diff --git a/bullet-2.77-lib.patch b/bullet-2.77-lib.patch deleted file mode 100644 index 9575add..0000000 --- a/bullet-2.77-lib.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -up bullet-2.77/src/BulletMultiThreaded/CMakeLists.txt.lib bullet-2.77/src/BulletMultiThreaded/CMakeLists.txt ---- bullet-2.77/src/BulletMultiThreaded/CMakeLists.txt.lib 2010-10-08 12:45:59.000000000 +0200 -+++ bullet-2.77/src/BulletMultiThreaded/CMakeLists.txt 2010-10-08 12:46:26.000000000 +0200 -@@ -84,7 +84,7 @@ IF (INSTALL_LIBS) - IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) - INSTALL(TARGETS BulletMultiThreaded DESTINATION .) - ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) -- INSTALL(TARGETS BulletMultiThreaded DESTINATION lib) -+ INSTALL(TARGETS BulletMultiThreaded DESTINATION lib${LIB_SUFFIX}) - INSTALL(DIRECTORY - ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING - PATTERN "*.h" PATTERN ".svn" EXCLUDE PATTERN "CMakeFiles" EXCLUDE) -diff -up bullet-2.77/src/MiniCL/CMakeLists.txt.lib bullet-2.77/src/MiniCL/CMakeLists.txt ---- bullet-2.77/src/MiniCL/CMakeLists.txt.lib 2010-10-08 12:44:50.000000000 +0200 -+++ bullet-2.77/src/MiniCL/CMakeLists.txt 2010-10-08 12:46:42.000000000 +0200 -@@ -32,7 +32,7 @@ IF (INSTALL_LIBS) - IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) - INSTALL(TARGETS MiniCL DESTINATION .) - ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) -- INSTALL(TARGETS MiniCL DESTINATION lib) -+ INSTALL(TARGETS MiniCL DESTINATION lib${LIB_SUFFIX}) - INSTALL(DIRECTORY - ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING - PATTERN "*.h" PATTERN ".svn" EXCLUDE PATTERN "CMakeFiles" EXCLUDE) diff --git a/bullet-2.77-zero_initialize.patch b/bullet-2.77-zero_initialize.patch deleted file mode 100644 index c9db2fb..0000000 --- a/bullet-2.77-zero_initialize.patch +++ /dev/null @@ -1,23 +0,0 @@ -Index: src/BulletSoftBody/btSoftBodyInternals.h -=================================================================== ---- src/BulletSoftBody/btSoftBodyInternals.h (revision 2286) -+++ src/BulletSoftBody/btSoftBodyInternals.h (working copy) -@@ -25,7 +25,7 @@ - #include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" - #include "BulletCollision/CollisionShapes/btConvexInternalShape.h" - #include "BulletCollision/NarrowPhaseCollision/btGjkEpa2.h" -- -+#include //for memset - // - // btSymMatrix - // -@@ -172,8 +172,7 @@ - template - static inline void ZeroInitialize(T& value) - { -- static const T zerodummy; -- value=zerodummy; -+ memset(&value,0,sizeof(T)); - } - // - template diff --git a/bullet.spec b/bullet.spec index 028cc06..25050d6 100644 --- a/bullet.spec +++ b/bullet.spec @@ -2,7 +2,7 @@ Name: bullet Version: 2.81 -Release: 2%{?dist} +Release: 3%{?dist} Summary: 3D Collision Detection and Rigid Body Dynamics Library Group: Development/Libraries License: zlib and MIT and BSD @@ -16,8 +16,6 @@ Source0: %{name}-%{version}-rev%{svnrev}-free.tar.gz # ./generate-tarball.sh 2.81-rev2613 Source1: generate-tarball.sh -Patch0: %{name}-2.77-extras-version.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: cmake @@ -61,7 +59,6 @@ Development headers and libraries for %{name} extra libraries. %prep %setup -q -n %{name}-%{version}-rev%{svnrev} -%patch0 -p1 -b .extras-version # Set these files to right permission chmod 644 src/LinearMath/btPoolAllocator.h @@ -75,25 +72,24 @@ mv ChangeLog.utf8 ChangeLog %build mkdir build pushd build -%cmake -DBUILD_DEMOS=OFF -DBUILD_EXTRAS=ON -DCMAKE_BUILD_TYPE=NONE -DCMAKE_SKIP_BUILD_RPATH=ON -DINCLUDE_INSTALL_DIR=%{_includedir}/bullet .. +%cmake .. \ + -DBUILD_DEMOS=OFF \ + -DBUILD_EXTRAS=ON \ + -DINSTALL_EXTRA_LIBS=ON \ + -DCMAKE_BUILD_TYPE=NONE \ + -DCMAKE_SKIP_BUILD_RPATH=ON \ + -DINCLUDE_INSTALL_DIR=%{_includedir}/bullet + make %{?_smp_mflags} popd - %install rm -rf $RPM_BUILD_ROOT pushd build -#make install/fast DESTDIR=$RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT - -# install libs from Extras -pushd Extras -cp -a ConvexDecomposition/*so* $RPM_BUILD_ROOT%{_libdir} -cp -a glui/*so* $RPM_BUILD_ROOT%{_libdir} -popd - popd +# Create symlinks for .so.X pushd $RPM_BUILD_ROOT%{_libdir} for f in lib*.so.*.* do @@ -101,18 +97,10 @@ do done popd -# install includes from Extras -pushd Extras -install -p -m 644 ConvexDecomposition/Convex*.h $RPM_BUILD_ROOT%{_includedir}/bullet -install -p -m 644 ConvexDecomposition/vlookup.h $RPM_BUILD_ROOT%{_includedir}/bullet -cp -a glui/GL $RPM_BUILD_ROOT%{_includedir}/bullet -popd - %clean rm -rf $RPM_BUILD_ROOT - %post -p /sbin/ldconfig %postun -p /sbin/ldconfig @@ -123,40 +111,54 @@ rm -rf $RPM_BUILD_ROOT %files -%defattr(-,root,root,-) %doc README AUTHORS COPYING NEWS ChangeLog -%{_libdir}/*.so.* -%exclude %{_libdir}/libConvexDecomposition.so.* -%exclude %{_libdir}/libGLUI.so.* +%{_libdir}/libBulletCollision.so.* +%{_libdir}/libBulletDynamics.so.* +%{_libdir}/libBulletSoftBody.so.* +%{_libdir}/libLinearMath.so.* %files devel -%defattr(-,root,root,-) %doc Bullet_User_Manual.pdf -%{_includedir}/bullet -%exclude %{_includedir}/bullet/Convex*.h -%exclude %{_includedir}/bullet/vlookup.h -%exclude %{_includedir}/bullet/GL -%{_libdir}/*.so -%exclude %{_libdir}/libConvexDecomposition.so -%exclude %{_libdir}/libGLUI.so +%dir %{_includedir}/%{name} +%{_includedir}/%{name}/*.h +%{_includedir}/%{name}/BulletCollision +%{_includedir}/%{name}/BulletDynamics +%{_includedir}/%{name}/BulletSoftBody +%{_includedir}/%{name}/LinearMath +%{_includedir}/%{name}/vectormath +%{_libdir}/libBulletCollision.so +%{_libdir}/libBulletDynamics.so +%{_libdir}/libBulletSoftBody.so +%{_libdir}/libLinearMath.so %{_libdir}/pkgconfig/bullet.pc %files extras -%defattr(-,root,root,-) %{_libdir}/libConvexDecomposition.so.* -%{_libdir}/libGLUI.so.* +%{_libdir}/libGIMPACTUtils.so.* +%{_libdir}/libHACD.so.* +%{_libdir}/libBulletFileLoader.so.* +%{_libdir}/libBulletWorldImporter.so.* +%{_libdir}/libBulletXmlWorldImporter.so.* %files extras-devel -%defattr(-,root,root,-) -%doc Extras/glui/readme.txt -%{_includedir}/bullet/Convex*.h -%{_includedir}/bullet/vlookup.h -%{_includedir}/bullet/GL +%{_includedir}/%{name}/ConvexDecomposition +%{_includedir}/%{name}/GIMPACTUtils +%{_includedir}/%{name}/HACD +%{_includedir}/%{name}/BulletFileLoader +%{_includedir}/%{name}/BulletWorldImporter +%{_includedir}/%{name}/BulletXmlWorldImporter %{_libdir}/libConvexDecomposition.so -%{_libdir}/libGLUI.so - +%{_libdir}/libGIMPACTUtils.so +%{_libdir}/libHACD.so +%{_libdir}/libBulletFileLoader.so +%{_libdir}/libBulletWorldImporter.so +%{_libdir}/libBulletXmlWorldImporter.so %changelog +* Sun May 18 2014 Rich Mattes - 2.81-3 +- Fix installation of bullet extras (rhbz#1097452) +- Spec file cleanup + * Wed Feb 13 2013 Fedora Release Engineering - 2.81-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild From 2f710f13c4e8715117637c7ef3e9a8b1574e9128 Mon Sep 17 00:00:00 2001 From: Rich Mattes Date: Wed, 29 Jul 2020 19:02:21 -0400 Subject: [PATCH 2/2] Apply upstream patch for compiler warnings (rhbz#1856910) --- bullet-compile-warning.patch | 42 ++++++++++++++++++++++++++++++++++++ bullet.spec | 10 ++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 bullet-compile-warning.patch diff --git a/bullet-compile-warning.patch b/bullet-compile-warning.patch new file mode 100644 index 0000000..9c9338a --- /dev/null +++ b/bullet-compile-warning.patch @@ -0,0 +1,42 @@ +From 886650a038f610081d9fe420f64d23d89b9a139c Mon Sep 17 00:00:00 2001 +From: "erwin.coumans@gmail.com" + +Date: Sun, 17 Nov 2013 20:13:50 +0000 +Subject: [PATCH] fix 'unused' warning. Fixes Issue 770 + +--- + src/LinearMath/btScalar.h | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/src/LinearMath/btScalar.h b/src/LinearMath/btScalar.h +index 37c6dec191..225d49f3ff 100644 +--- a/src/LinearMath/btScalar.h ++++ b/src/LinearMath/btScalar.h +@@ -284,6 +284,10 @@ static int btNanMask = 0x7F800001; + #ifndef BT_INFINITY + static int btInfinityMask = 0x7F800000; + #define BT_INFINITY (*(float*)&btInfinityMask) ++inline int btGetInfinityMask()//suppress stupid compiler warning ++{ ++ return btInfinityMask; ++} + #endif + + //use this, in case there are clashes (such as xnamath.h) +@@ -336,6 +340,10 @@ inline __m128 operator * (const __m128 A, const __m128 B) + #ifndef BT_INFINITY + static int btInfinityMask = 0x7F800000; + #define BT_INFINITY (*(float*)&btInfinityMask) ++ inline int btGetInfinityMask()//suppress stupid compiler warning ++ { ++ return btInfinityMask; ++ } + #endif + #endif//BT_USE_NEON + +@@ -728,4 +736,5 @@ template T* btAlignPointer(T* unalignedPtr, size_t alignment) + return converter.ptr; + } + ++ + #endif //BT_SCALAR_H diff --git a/bullet.spec b/bullet.spec index 7dd8c40..cb12272 100644 --- a/bullet.spec +++ b/bullet.spec @@ -2,7 +2,7 @@ Name: bullet Version: 2.82 -Release: 2%{?dist} +Release: 3%{?dist} Summary: 3D Collision Detection and Rigid Body Dynamics Library Group: Development/Libraries License: zlib and MIT and BSD @@ -22,6 +22,10 @@ BuildRequires: cmake BuildRequires: freeglut-devel BuildRequires: libICE-devel +# Patch to silence some compiler warnings. +# Backport of upstream 886650a03 +# rhbz#1856910 +Patch0: bullet-compile-warning.patch %description Bullet is a 3D Collision Detection and Rigid Body Dynamics Library for games @@ -59,6 +63,7 @@ Development headers and libraries for %{name} extra libraries. %prep %setup -q -n %{name}-%{version}-r%{svnrev} +%patch0 -p1 # Set these files to right permission chmod 644 src/LinearMath/btPoolAllocator.h @@ -157,6 +162,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libBulletXmlWorldImporter.so %changelog +* Wed Jul 29 2020 Rich Mattes - 2.82-3 +- Apply upstream patch for compiler warnings (rhbz#1856910) + * Sun Sep 07 2014 Rich Mattes - 2.82-2 - Install all of the bullet extras (rhbz#1097452) - Spec file cleanup