rpms/coldet/devel coldet-1.1-fixes.patch, NONE, 1.1 coldet.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
Hans de Goede (jwrdegoede)
fedora-extras-commits at redhat.com
Fri Jul 7 18:08:17 UTC 2006
Author: jwrdegoede
Update of /cvs/extras/rpms/coldet/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29391/devel
Modified Files:
.cvsignore sources
Added Files:
coldet-1.1-fixes.patch coldet.spec
Log Message:
auto-import coldet-1.1-3 on branch devel from coldet-1.1-3.src.rpm
coldet-1.1-fixes.patch:
--- NEW FILE coldet-1.1-fixes.patch ---
diff -ur coldet.orig/src/box.cpp coldet/src/box.cpp
--- coldet.orig/src/box.cpp 2001-02-23 21:21:20.000000000 +0100
+++ coldet/src/box.cpp 2006-06-26 09:11:12.000000000 +0200
@@ -228,7 +228,7 @@
extern "C" {
int tri_tri_intersect(float V0[3],float V1[3],float V2[3],
float U0[3],float U1[3],float U2[3]);
-};
+}
Triangle::Triangle(const Vector3D& _1, const Vector3D& _2, const Vector3D& _3)
: v1(_1), v2(_2), v3(_3), center((1.0f/3.0f)*(_1+_2+_3))
diff -ur coldet.orig/src/coldetimpl.h coldet/src/coldetimpl.h
--- coldet.orig/src/coldetimpl.h 2001-02-23 21:21:20.000000000 +0100
+++ coldet/src/coldetimpl.h 2006-06-26 09:11:12.000000000 +0200
@@ -73,7 +73,7 @@
int getTriangleIndex(BoxedTriangle* bt)
{
- return int(bt-m_Triangles.begin());
+ return (int)(bt-&(m_Triangles[0]));
}
/** Stores all the actual triangles. Other objects will use
diff -ur coldet.orig/src/makefile.g++ coldet/src/makefile.g++
--- coldet.orig/src/makefile.g++ 2001-02-23 21:21:20.000000000 +0100
+++ coldet/src/makefile.g++ 2006-06-26 09:21:22.000000000 +0200
@@ -1,8 +1,8 @@
PROJECT=coldet
-LIB=libcoldet.a
+LIB=libcoldet.so.0
CC=g++
OPT=-O2
-CFLAGS=-c $(OPT) -DGCC
+CFLAGS=-c $(OPT) -fPIC -DPIC -DGCC
OBJS= \
coldet.o \
coldet_bld.o \
@@ -16,9 +16,7 @@
all: $(LIB)
$(LIB): $(OBJS)
- rm -f $(LIB)
- ar cr $(LIB) $(OBJS)
- ranlib $(LIB)
+ $(CC) -g -shared -o $(LIB) -Wl,-soname,$(LIB) $(OBJS)
coldet.o: coldet.cpp
$(CC) $(CFLAGS) coldet.cpp
@@ -33,7 +31,7 @@
$(CC) $(CFLAGS) box_bld.cpp
tritri.o: tritri.c
- $(CC) $(CFLAGS) tritri.c
+ gcc $(CFLAGS) tritri.c
mytritri.o: mytritri.cpp
$(CC) $(CFLAGS) mytritri.cpp
diff -ur coldet.orig/src/math3d.h coldet/src/math3d.h
--- coldet.orig/src/math3d.h 2001-02-23 21:21:20.000000000 +0100
+++ coldet/src/math3d.h 2006-06-26 09:18:39.000000000 +0200
@@ -99,6 +99,10 @@
float& operator() (int i, int j) { return m[i][j]; }
};
+Matrix3D PitchMatrix3D(const float theta);
+Matrix3D YawMatrix3D(const float theta);
+Matrix3D RollMatrix3D(const float theta);
+
/** 4x4 matrix, used for transformations. */
struct Matrix3D
{
diff -ur coldet.orig/src/mytritri.h coldet/src/mytritri.h
--- coldet.orig/src/mytritri.h 2001-02-23 21:21:20.000000000 +0100
+++ coldet/src/mytritri.h 2006-06-26 09:21:07.000000000 +0200
@@ -93,4 +93,4 @@
-#endif // H_MYTRITRI
\ No newline at end of file
+#endif // H_MYTRITRI
--- NEW FILE coldet.spec ---
Name: coldet
Version: 1.1
Release: 3%{?dist}
Summary: 3D Collision Detection Library
Group: System Environment/Libraries
License: LGPL
URL: http://photoneffect.com/coldet/
Source0: http://photoneffect.com/download/coldet_11.zip
Patch0: coldet-1.1-fixes.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
This library is an effort to provide a free collision detection library for
generic polyhedra. Its purpose is mainly for 3D games where accurate detection
is needed between two non-simple objects.
Features:
* Works on any model, even polygon soups.
* Uses bounding box hierarchies for fast detection.
* Uses additional triangle intersection tests for 100% accuracy.
* Provides (upon request) exact point of collision, plus the pair of
triangles that collided.
* Supports timeout setting, to limit detection time.
* Model-Model collision test.
* Ray-Model collision test.
* Segment-Model collision test.
* Sphere-Model collision test.
* Ray-Sphere and Sphere-Sphere primitive collision tests.
%package devel
Summary: Development libraries and headers for coldet
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
%description devel
The developmental files that must be installed in order to compile
applications which use coldet.
%prep
%setup -q -n %{name}
%patch0 -p1 -z .fixes
# for %doc
sed -i 's/\r//' readme.txt COPYING doc/quickstart.html
mv doc/quickstart.html doc/html
%build
pushd src
make %{?_smp_mflags} -f makefile.g++ OPT="$RPM_OPT_FLAGS"
popd
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_includedir}/%{name}
install -m 755 src/lib%{name}.so.0 $RPM_BUILD_ROOT%{_libdir}
ln -s lib%{name}.so.0 $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so
install -m 644 src/coldet.h src/math3d.h $RPM_BUILD_ROOT%{_includedir}/%{name}
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
%doc COPYING readme.txt
%{_libdir}/lib%{name}.so.0
%files devel
%defattr(-,root,root,-)
%doc transform.txt doc/html
%{_includedir}/%{name}
%{_libdir}/lib%{name}.so
%changelog
* Fri Jul 7 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 1.1-3
- Make -devel package Requires on the main package fully versioned.
* Mon Jun 26 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 1.1-2
- Put headers under /usr/include/coldet instead of straight under /usr/include.
* Mon Jun 26 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 1.1-1
- Initial Fedora Extras package
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/coldet/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 7 Jul 2006 18:07:34 -0000 1.1
+++ .cvsignore 7 Jul 2006 18:08:17 -0000 1.2
@@ -0,0 +1 @@
+coldet_11.zip
Index: sources
===================================================================
RCS file: /cvs/extras/rpms/coldet/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources 7 Jul 2006 18:07:34 -0000 1.1
+++ sources 7 Jul 2006 18:08:17 -0000 1.2
@@ -0,0 +1 @@
+26c2db12ec5ad2d7a0b1d0fe2597ed4a coldet_11.zip
More information about the fedora-extras-commits
mailing list