[packages/bullet] - updated to 2.82 - updated link patch

qboosh qboosh at pld-linux.org
Sun Dec 1 20:07:52 CET 2013


commit 099662900ddaa67847e18f7e34418e5f218beed5
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Dec 1 20:09:02 2013 +0100

    - updated to 2.82
    - updated link patch

 bullet-link.patch | 55 +++++++++++++++++++++++++++++-------------------
 bullet.spec       | 63 +++++++++++++++++++++++++++++++++----------------------
 2 files changed, 71 insertions(+), 47 deletions(-)
---
diff --git a/bullet.spec b/bullet.spec
index de73408..d7813d9 100644
--- a/bullet.spec
+++ b/bullet.spec
@@ -1,19 +1,25 @@
 #
-# TODO: fix linking
+# Conditional build:
+%bcond_with	opencl_amd	# AMD OpenCL
+%bcond_with	opencl_intel	# Intel OpenCL (64-bit)
+%bcond_with	opencl_nvidia	# NVidia OpenCL
 #
 Summary:	Bullet - vollision detection and rigid body dynamics library
 Summary(pl.UTF-8):	Bullet - biblioteka wykrywania kolizji oraz dynamiki ciała sztywnego
 Name:		bullet
-Version:	2.78
+Version:	2.82
 Release:	1
-License:	Zlib
-Group:		Applications
-Source0:	http://bullet.googlecode.com/files/%{name}-%{version}.zip
-# Source0-md5:	99d4070864c9f73521481ba9cda25038
+License:	Zlib (BSD-like)
+Group:		Libraries
+#Source0Download: https://code.google.com/p/bullet/downloads/list
+Source0:	http://bullet.googlecode.com/files/%{name}-%{version}-r2704.tgz
+# Source0-md5:	70b3c8d202dee91a0854b4cbc88173e8
 Patch0:		%{name}-link.patch
 URL:		http://bulletphysics.org/wordpress/
+BuildRequires:	OpenCL-devel
+BuildRequires:	OpenGL-GLU-devel
 BuildRequires:	OpenGL-glut-devel
-BuildRequires:	cmake
+BuildRequires:	cmake >= 2.4.3
 BuildRequires:	rpmbuild(macros) >= 1.600
 BuildRequires:	unzip
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -22,41 +28,43 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 Bullet is a collision detection and rigid nody dynamics library.
 
 %description -l pl.UTF-8
-Bullet to biblioteka wykrywania kolizji oraz dynamiki ciała sztywnego
+Bullet to biblioteka wykrywania kolizji oraz dynamiki ciała sztywnego.
 
 %package devel
-Summary:	Header files for bullet library
-Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki bullet
+Summary:	Header files for bullet libraries
+Summary(pl.UTF-8):	Pliki nagłówkowe bibliotek bullet
 Group:		Development/Libraries
 Requires:	%{name} = %{version}-%{release}
+Requires:	OpenCL-devel
+Requires:	OpenGL-GLU-devel
+Requires:	OpenGL-glut-devel
 
 %description devel
-Header files for bullet library.
+Header files for bullet libraries.
 
 %description devel -l pl.UTF-8
-Pliki nagłówkowe biblioteki bullet.
+Pliki nagłówkowe bibliotek bullet.
 
 %prep
-%setup -q
-%undos src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/NVidia/CMakeLists.txt
-%undos src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/MiniCL/CMakeLists.txt
+%setup -q -n %{name}-%{version}-r2704
 %patch0 -p1
 
 %build
-mkdir build
-cd build
-%cmake \
+install -d pkgbuild
+cd pkgbuild
+%cmake .. \
+	%{!?with_opencl_amd:-DAMD_OPENCL_BASE_DIR:BOOL=OFF} \
 	-DBUILD_DEMOS=OFF \
 	-DBUILD_EXTRAS=ON \
+	-DBUILD_MULTITHREADING=ON \
 	-DINCLUDE_INSTALL_DIR=%{_includedir}/%{name} \
-	..
 
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} -C build install \
+%{__make} -C pkgbuild install \
 	DESTDIR=$RPM_BUILD_ROOT
 
 %clean
@@ -67,13 +75,15 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS ChangeLog NEWS README
+%doc AUTHORS COPYING ChangeLog NEWS README
 %attr(755,root,root) %{_libdir}/libBulletCollision.so.*.*
 %attr(755,root,root) %{_libdir}/libBulletDynamics.so.*.*
 %attr(755,root,root) %{_libdir}/libBulletMultiThreaded.so.*.*
 %attr(755,root,root) %{_libdir}/libBulletSoftBody.so.*.*
-%attr(755,root,root) %{_libdir}/libBulletSoftBodySolvers_CPU.so.*.*
 %attr(755,root,root) %{_libdir}/libBulletSoftBodySolvers_OpenCL_Mini.so.*.*
+%{?with_opencl_amd:%attr(755,root,root) %{_libdir}/libBulletSoftBodySolvers_OpenCL_AMD.so.*.*}
+%{?with_opencl_intel:%attr(755,root,root) %{_libdir}/libBulletSoftBodySolvers_OpenCL_Intel.so.*.*}
+%{?with_opencl_nvidia:%attr(755,root,root) %{_libdir}/libBulletSoftBodySolvers_OpenCL_NVidia.so.*.*}
 %attr(755,root,root) %{_libdir}/libLinearMath.so.*.*
 %attr(755,root,root) %{_libdir}/libMiniCL.so.*.*
 
@@ -84,9 +94,12 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/libBulletDynamics.so
 %attr(755,root,root) %{_libdir}/libBulletMultiThreaded.so
 %attr(755,root,root) %{_libdir}/libBulletSoftBody.so
-%attr(755,root,root) %{_libdir}/libBulletSoftBodySolvers_CPU.so
 %attr(755,root,root) %{_libdir}/libBulletSoftBodySolvers_OpenCL_Mini.so
+%{?with_opencl_amd:%attr(755,root,root) %{_libdir}/libBulletSoftBodySolvers_OpenCL_AMD.so}
+%{?with_opencl_intel:%attr(755,root,root) %{_libdir}/libBulletSoftBodySolvers_OpenCL_Intel.so}
+%{?with_opencl_nvidia:%attr(755,root,root) %{_libdir}/libBulletSoftBodySolvers_OpenCL_NVidia.so}
 %attr(755,root,root) %{_libdir}/libLinearMath.so
 %attr(755,root,root) %{_libdir}/libMiniCL.so
-%{_includedir}/%{name}
-%{_pkgconfigdir}/%{name}.pc
+%{_includedir}/bullet
+%{_libdir}/cmake/bullet
+%{_pkgconfigdir}/bullet.pc
diff --git a/bullet-link.patch b/bullet-link.patch
index b7f91dc..00185bc 100644
--- a/bullet-link.patch
+++ b/bullet-link.patch
@@ -1,22 +1,33 @@
---- bullet-2.78/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/NVidia/CMakeLists.txt~	2011-02-27 02:07:08.000000000 +0100
-+++ bullet-2.78/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/NVidia/CMakeLists.txt	2011-05-05 10:19:40.076666674 +0200
-@@ -55,7 +55,7 @@
- SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_NVidia PROPERTIES VERSION ${BULLET_VERSION})
- SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_NVidia PROPERTIES SOVERSION ${BULLET_VERSION})
- IF (BUILD_SHARED_LIBS)
--	TARGET_LINK_LIBRARIES(BulletSoftBodySolvers_OpenCL_NVidia BulletSoftBody BulletDynamics)
-+	TARGET_LINK_LIBRARIES(BulletSoftBodySolvers_OpenCL_NVidia BulletSoftBody BulletDynamics OpenCL)
- ENDIF (BUILD_SHARED_LIBS)
- 
- 
---- bullet-2.78/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/MiniCL/CMakeLists.txt~	2010-09-07 16:40:18.000000000 +0200
-+++ bullet-2.78/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/MiniCL/CMakeLists.txt	2011-05-05 10:30:44.966666675 +0200
-@@ -52,7 +52,7 @@
- SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_Mini PROPERTIES VERSION ${BULLET_VERSION})
- SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_Mini PROPERTIES SOVERSION ${BULLET_VERSION})
- IF (BUILD_SHARED_LIBS)
--	TARGET_LINK_LIBRARIES(BulletSoftBodySolvers_OpenCL_Mini MiniCL BulletMultiThreaded BulletSoftBody)
-+	TARGET_LINK_LIBRARIES(BulletSoftBodySolvers_OpenCL_Mini MiniCL BulletMultiThreaded BulletSoftBody OpenCL)
- ENDIF (BUILD_SHARED_LIBS)
- 
- 
+--- bullet-2.82-r2704/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/AMD/CMakeLists.txt.orig	2013-10-22 20:34:17.000000000 +0200
++++ bullet-2.82-r2704/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/AMD/CMakeLists.txt	2013-12-01 18:29:37.030268534 +0100
+@@ -39,7 +39,7 @@
+ SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_AMD PROPERTIES VERSION ${BULLET_VERSION})
+ SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_AMD PROPERTIES SOVERSION ${BULLET_VERSION})
+ IF (BUILD_SHARED_LIBS)
+-	TARGET_LINK_LIBRARIES(BulletSoftBodySolvers_OpenCL_AMD BulletSoftBody)
++	TARGET_LINK_LIBRARIES(BulletSoftBodySolvers_OpenCL_AMD BulletSoftBody OpenCL)
+ ENDIF (BUILD_SHARED_LIBS)
+ 
+ 
+--- bullet-2.82-r2704/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/Intel/CMakeLists.txt.orig	2013-10-22 20:34:17.000000000 +0200
++++ bullet-2.82-r2704/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/Intel/CMakeLists.txt	2013-12-01 18:30:22.136933307 +0100
+@@ -59,7 +59,7 @@
+ SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_Intel PROPERTIES VERSION ${BULLET_VERSION})
+ SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_Intel PROPERTIES SOVERSION ${BULLET_VERSION})
+ IF (BUILD_SHARED_LIBS)
+-	TARGET_LINK_LIBRARIES(BulletSoftBodySolvers_OpenCL_Intel BulletSoftBody)
++	TARGET_LINK_LIBRARIES(BulletSoftBodySolvers_OpenCL_Intel BulletSoftBody ${INTEL_OPENCL_LIBRARIES})
+ ENDIF (BUILD_SHARED_LIBS)
+ 
+ 
+--- bullet-2.82-r2704/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/NVidia/CMakeLists.txt.orig	2013-12-01 18:19:49.676959847 +0100
++++ bullet-2.82-r2704/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/NVidia/CMakeLists.txt	2013-12-01 18:21:30.216955629 +0100
+@@ -58,7 +58,7 @@
+ SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_NVidia PROPERTIES VERSION ${BULLET_VERSION})
+ SET_TARGET_PROPERTIES(BulletSoftBodySolvers_OpenCL_NVidia PROPERTIES SOVERSION ${BULLET_VERSION})
+ IF (BUILD_SHARED_LIBS)
+-	TARGET_LINK_LIBRARIES(BulletSoftBodySolvers_OpenCL_NVidia BulletSoftBody BulletDynamics)
++	TARGET_LINK_LIBRARIES(BulletSoftBodySolvers_OpenCL_NVidia BulletSoftBody BulletDynamics ${NVIDIA_OPENCL_LIBRARIES})
+ ENDIF (BUILD_SHARED_LIBS)
+ 
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/bullet.git/commitdiff/099662900ddaa67847e18f7e34418e5f218beed5



More information about the pld-cvs-commit mailing list