Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > cee206405a9e9a3bd5c19df2b72d7d84 > files > 5

bullet-2.71-1mdv2009.0.src.rpm

%define major 2
%define libname %mklibname %{name} %{major}
%define develname %mklibname %{name} -d
%define staticname %mklibname %{name} -d -s

Summary:	Professional 3D collision detection library
Name:		bullet
Version:	2.71
Release:	%mkrel 1
License:	Zlib
Group:		System/Libraries
Url:		http://www.bulletphysics.com
Source0:	http://bullet.googlecode.com/files/%{name}-%{version}-SDK.tgz
Patch1:		%{name}-2.68-shared-libraries.patch
Patch2:		%{name}-2.70-x86_64-fixes.patch
Patch3:		%{name}-2.68-use-system-libxml2.patch
BuildRequires:	doxygen
BuildRequires:	mesa-common-devel
BuildRequires:	ftjam
BuildRequires:	libtool
BuildRequires:	libxml2-devel
BuildRequires:	graphviz
BuildRequires:	perl-Template-Toolkit
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description
Bullet is a professional open source multi-threaded 
3D Collision Detection and Rigid Body Dynamics Library
for games and animation.

%package demo
Summary:	A demo programs using bullet library
Group:		Graphics
Requires:	%{libname} = %{version}-%{release}

%description demo
A demo programs using bullet library.

%package -n %{libname}
Summary:	Professional 3D collision detection library
Group:		System/Libraries

%description -n %{libname}
Bullet 3D Game Multiphysics Library provides state of the art 
collision detection, soft body and rigid body dynamics.

* Used by many game companies in AAA titles on Playstation 3, 
  XBox 360, Nintendo Wii and PC
* Modular extendible C++ design with hot-swap of most components
* Optimized back-ends with multi-threaded support for Playstation 3 
  Cell SPU and other platforms
* Discrete and continuous collision detection (CCD)
* Swept collision queries
* Ray casting with custom collision filtering
* Generic convex support (using GJK), capsule, cylinder, cone, sphere, 
  box and non-convex triangle meshes. 
* Rigid body dynamics including constraint solvers, generic 
  constraints, ragdolls, hinge, ball-socket
* Support for constraint limits and motors
* Soft body support including cloth, rope and deformable
* Bullet is integrated into Blender 3D and provides a Maya Plugin
* Supports import and export into COLLADA 1.4 Physics format
* Support for dynamic deformation of non-convex triangle meshes, by 
  refitting the acceleration structures 

The Library is free for commercial use and open source 
under the ZLib License.

%package -n %{develname}
Summary:	Development headers for bullet
Group:		Development/C
Provides:	%{name}-devel = %{version}-%{release}
Provides:	lib%{name}-devel = %{version}-%{release}
Requires:	%{libname} = %{version}-%{release}
Requires:	libxml2-devel

%description -n %{develname}
Development headers for bullet 3D collision library.

%package -n %{staticname}
Summary:	Static libraries for %{name}
Group:		Development/C
Requires:	%{develname} = %{version}-%{release}
Provides:	lib%{name}-static-devel = %{version}-%{release}
Provides:	%{name}-static-devel = %{version}-%{release}

%description -n %{staticname}
Static libraries for %{name}.

%prep
%setup -q
%patch1 -p1
%patch3 -p1

%ifnarch ix86
%patch2 -p1
%endif

chmod +x configure

pushd mk/autoconf
chmod +x *
popd

# get rid of no newline ... warnings
echo "" >> src/BulletCollision/BroadphaseCollision/btOverlappingPairCallback.h
echo "" >> src/BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp
echo "" >> src/BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.cpp
echo "" >> src/BulletCollision/CollisionShapes/btTriangleMesh.cpp
echo "" >> src/LinearMath/btHashMap.h
echo "" >> Extras/BulletColladaConverter/ColladaConverter.cpp
echo "" >> Demos/AllBulletDemos/../DynamicControlDemo/MotorDemo.cpp
echo "" >> src/LinearMath/btHashMap.h
echo "" >> Demos/Benchmarks/main.cpp
echo "" >> src/LinearMath/btHashMap.h
echo "" >> Demos/BasicDemo/main.cpp
echo "" >> src/LinearMath/btHashMap.h

#(tpg) use system libxml2
rm -rf Extras/LibXML

%build
#(tpg) export USE_ADDR64 only for x86_64, otherwise build fails, use system libxml2
%ifnarch ix86
export CFLAGS="%{optflags} -fno-strict-aliasing -DUSE_ADDR64 -I%{_includedir} -I%{_includedir}/libxml2"
%else
export CFLAGS="%{optflags} -fno-strict-aliasing -I%{_includedir} -I%{_includedir}/libxml2"
%endif
export CXXFLAGS=$CFLAGS
export LDFLAGS="%{optflags} -lxml2"

./autogen.sh

%configure2_5x \
	--with-mesa

# parallel build of demos is broken ...
# ... so build first library
sed -i -e 's|SubInclude TOP Demos ;|#SubInclude TOP Demos ;|g' Jamfile
jam -d2 %{_smp_mflags}

# ... and then demos
sed -i -e 's|#SubInclude TOP Demos ;|SubInclude TOP Demos ;|g' Jamfile
jam -d2

#(tpg) build shared libraries
pushd lib
sed -i -e 's/sover/%{version}/g' Makefile
%make
popd

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

jam -d2 install DESTDIR=%{buildroot} 

install -dm 755 %{buildroot}%{_bindir}

demos=`ls -1 *Demo`
for i in $demos AllBulletDemos ContinuousConvexCollision BulletDino Raytracer UserCollisionAlgorithm; do
    install -m 755 $i %{buildroot}%{_bindir}/bullet-$i
done

#(tpg) install shared libraries
cp -f lib/*.so* %{buildroot}%{_libdir}

#(tpg) add symlinks
pushd %{buildroot}%{_libdir}
for i in libbulletcollision libbulletdynamics libbulletmath; do
ln -s $i.so.%{major}* $i.so
done
popd

%if %mdkversion < 200900
%post -n %{libname} -p /sbin/ldconfig
%endif

%if %mdkversion < 200900
%postun -n %{libname} -p /sbin/ldconfig
%endif

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files demo
%defattr(-,root,root)
%{_bindir}/%{name}-*

%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/*.so.%{major}*

%files -n %{staticname}
%defattr(-,root,root)
%{_libdir}/libbulletcollision.a
%{_libdir}/libbulletdynamics.a
%{_libdir}/libbulletmath.a
%{_libdir}/libbulletsoftbody.a
	 
%files -n %{develname}
%defattr(-,root,root)
%doc AUTHORS README LICENSE ChangeLog.txt NEWS VERSION *.pdf
%dir %{_includedir}/%{name}
%{_libdir}/*.so
%{_includedir}/%{name}/*
%{_libdir}/pkgconfig/%{name}.pc


%changelog
* Mon Sep 08 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 2.71-1mdv2009.0
+ Revision: 282548
- update to new version 2.71
- better description

* Sun Aug 24 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 2.70-2mdv2009.0
+ Revision: 275516
- Patch2: rediff against latest bullet version
- update to new version 2.70

  + Thierry Vignaud <tvignaud@mandriva.com>
    - rebuild early 2009.0 package (before pixel changes)

  + Pixel <pixel@mandriva.com>
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

* Sun Jun 01 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 2.69-1mdv2009.0
+ Revision: 213860
- update to new version 2.69

* Fri Apr 25 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 2.68-2mdv2009.0
+ Revision: 197348
- Patch1: create one more share library
- fix url

* Thu Apr 24 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 2.68-1mdv2009.0
+ Revision: 197220
- Patch3: rediff
- add missing buildrequires on graphviz and perl-Template-Toolkit
- get rid of missing newlines in source files
- fix file list
- new version

* Thu Mar 13 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 2.67-4mdv2008.1
+ Revision: 187554
- add more explicit provides for static library package

* Wed Mar 12 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 2.67-3mdv2008.1
+ Revision: 187135
- fix symlinks creation (#38749)

* Sun Mar 09 2008 Tomasz Pawel Gajc <tpg@mandriva.org> 2.67-2mdv2008.1
+ Revision: 183143
- add scriplets
- new version
- drop patch 0
- Patch1: build shared libraries !
- Patch2: fixes against 64 bit architecture
- Patch3: use system libxml2
- strict-aliasting breaks building, so disable it
- get ride of few no-newline warnings
- create package demo, which include all demo programs using bullet library
- fix typo in a header (p0)
- regenerate scripts
- fix building of demos, since parallel build is broken
- new version

  + Thierry Vignaud <tvignaud@mandriva.com>
    - fix no-buildroot-tag
    - kill re-definition of %%buildroot on Pixel's request

* Sat Oct 20 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.63-1mdv2008.1
+ Revision: 100537
- new version
- use ftjam
- new upstream version
- add provides

* Tue Jun 26 2007 Tomasz Pawel Gajc <tpg@mandriva.org> 2.53-1mdv2008.0
+ Revision: 44271
- make it compiliant with mandriva's library policy
- drop %%post and %%postun
- fix file list
- spec file clean
- Import bullet