[libccd] Initial import

rmattes rmattes at fedoraproject.org
Mon Oct 22 22:41:23 UTC 2012


commit a7a8e49992f1d430892383247459e35e5e67663a
Author: Rich Mattes <richmattes at gmail.com>
Date:   Mon Oct 22 18:41:08 2012 -0400

    Initial import

 .gitignore                    |    1 +
 libccd-1.3-ctest.patch        |   79 +++++++++++++++++++++++++++++++
 libccd-1.3-fixpkgconfig.patch |    9 ++++
 libccd.spec                   |  105 +++++++++++++++++++++++++++++++++++++++++
 sources                       |    1 +
 5 files changed, 195 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..16f600f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/libccd-1.4.tar.gz
diff --git a/libccd-1.3-ctest.patch b/libccd-1.3-ctest.patch
new file mode 100644
index 0000000..5935560
--- /dev/null
+++ b/libccd-1.3-ctest.patch
@@ -0,0 +1,79 @@
+diff -rpN libccd-1.3/CMakeLists.txt libccd-1.3-testsuite/CMakeLists.txt
+*** libccd-1.3/CMakeLists.txt	2012-05-16 01:54:39.000000000 -0400
+--- libccd-1.3-testsuite/CMakeLists.txt	2012-05-26 14:03:34.671702814 -0400
+*************** set(CCD_VERSION "1.2")
+*** 6,10 ****
+--- 6,11 ----
+  set(PKG_DESC "Library for collision detection between convex shapes")
+  set(LIB_SUFFIX "" CACHE STRING  "Library installation directory suffix")
++ set(BUILD_TESTS false CACHE BOOL "Build the test suite")
+  
+  include_directories("src/")
+  
+*************** install(TARGETS ccd ccd_static ARCHIVE D
+*** 51,53 ****
+--- 52,58 ----
+  install(DIRECTORY src/ccd DESTINATION include FILES_MATCHING PATTERN "*.h")
+  install(FILES "${pkg_conf_file}" DESTINATION lib${LIB_SUFFIX}/pkgconfig/ COMPONENT pkgconfig)
+  
++ if (BUILD_TESTS)
++     enable_testing()
++     add_subdirectory(src/testsuites)
++ endif (BUILD_TESTS)
+diff -rpN libccd-1.3/src/testsuites/CMakeLists.txt libccd-1.3-testsuite/src/testsuites/CMakeLists.txt
+*** libccd-1.3/src/testsuites/CMakeLists.txt	1969-12-31 19:00:00.000000000 -0500
+--- libccd-1.3-testsuite/src/testsuites/CMakeLists.txt	2012-05-26 14:04:13.659169012 -0400
+***************
+*** 0 ****
+--- 1,51 ----
++ set(CCDTEST_ARGS "" CACHE STRING "Argments to pass to ccdtest executable")
++ 
++ set(TEST_SOURCES
++     common.c 
++     support.c 
++     vec3.c 
++     polytope.c 
++     boxbox.c 
++     spheresphere.c 
++     cylcyl.c 
++     boxcyl.c 
++     mpr_boxbox.c 
++     mpr_cylcyl.c 
++     mpr_boxcyl.c)
++ 
++ add_library(cu cu/cu.c)
++ 
++ add_executable(ccdtest ${TEST_SOURCES} main.c)
++ target_link_libraries(ccdtest ccd cu rt)
++ add_definitions(-DCU_ENABLE_TIMER)
++ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
++ add_test(NAME ccdtest 
++     COMMAND ccdtest ${CCDTEST_ARGS}
++     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
++ 
++ add_test(NAME ccdtest-valgrind
++     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
++     COMMAND valgrind -q --leak-check=full --show-reachable=yes --trace-children=yes
++     --error-limit=no 
++     ${CMAKE_CURRENT_BINARY_DIR}/ccdtest ${CCDTEST_ARGS})
++ 
++ add_test(NAME ccdtest-valgrind-gen-suppressions
++     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
++     COMMAND valgrind -q --leak-check=full --show-reachable=yes --trace-children=yes
++         --gen-suppressions=all --log-file=out --error-limit=no 
++         ${CMAKE_CURRENT_BINARY_DIR}/ccdtest ${CCDTEST_ARGS})
++ 
++ 
++ add_executable(bench bench.c support.c cu/cu.c)
++ target_link_libraries(bench ccd cu rt)
++ add_test(NAME bench
++     COMMAND bench)
++ 
++ add_executable(bench2 bench2.c support.c cu/cu.c)
++ target_link_libraries(bench2 ccd cu rt)
++ add_test(NAME bench2
++     COMMAND bench2)
++ 
++ add_test(NAME check-regressions
++     COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/cu/check-regressions regressions
++     WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
diff --git a/libccd-1.3-fixpkgconfig.patch b/libccd-1.3-fixpkgconfig.patch
new file mode 100644
index 0000000..9eeed76
--- /dev/null
+++ b/libccd-1.3-fixpkgconfig.patch
@@ -0,0 +1,9 @@
+diff -up ./ccd.pc.in.fixpkgconfig ./ccd.pc.in
+--- ./ccd.pc.in.fixpkgconfig	2012-05-29 17:35:17.042383687 -0400
++++ ./ccd.pc.in	2012-05-29 17:35:35.396786946 -0400
+@@ -9,4 +9,4 @@ Description: @PKG_DESC@
+ Version: @CCD_VERSION@
+ Requires: @PKG_EXTERNAL_DEPS@
+ Libs: -L${libdir} -lccd
+-Cflags: -I${includedir}
++Cflags: -I${includedir}/ccd
diff --git a/libccd.spec b/libccd.spec
new file mode 100644
index 0000000..da9d392
--- /dev/null
+++ b/libccd.spec
@@ -0,0 +1,105 @@
+Name:           libccd
+Version:        1.4
+Release:        1%{?dist}
+Summary:        Library for collision detection between convex shapes
+
+License:        BSD
+URL:            http://libccd.danfis.cz
+Source0:        http://libccd.danfis.cz/files/%{name}-%{version}.tar.gz
+# This patch integrates all of the test programs that are present in
+# the testsuites folder into CMake, via CTest.  Not yet submitted
+# upstream
+Patch0:         %{name}-1.3-ctest.patch
+# This patch changes the ccd.pc file to point to the correct include
+# directory.  Not yet submitted upstream
+Patch1:         %{name}-1.3-fixpkgconfig.patch
+
+%if 0%{?rhel}
+BuildRequires:  cmake28
+%else
+BuildRequires:  cmake
+%endif
+# These are required for executing the test suite
+BuildRequires:  python
+BuildRequires:  valgrind
+
+%description
+libccd implements variation on Gilbert-Johnson-Keerthi (GJK) algorithm + 
+Expand Polytope Algorithm (EPA). It also implements Minkowski Portal 
+Refinement (MPR, a.k.a. XenoCollide) algorithm as published in Game 
+Programming Gems 7.
+
+
+%package        devel
+Summary:        Development files for %{name}
+Requires:       %{name}%{?_isa} = %{version}-%{release}
+
+%description    devel
+The %{name}-devel package contains libraries and header files for
+developing applications that use %{name}.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p0
+
+%build
+mkdir build
+pushd build
+%if 0%{?rhel}
+%cmake28 \
+%else
+%cmake \
+%endif
+  -DBUILD_TESTS=ON \
+  -DCMAKE_BUILD_TYPE=None \
+  ..
+popd
+make -C build %{?_smp_mflags}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make -C build install DESTDIR=$RPM_BUILD_ROOT
+find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
+rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
+
+%check
+make -C build test
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+
+%files
+%doc BSD-LICENSE README
+%{_libdir}/*.so.*
+
+%files devel
+%doc doc/jgt98convex.pdf
+%{_includedir}/*
+%{_libdir}/*.so
+%{_libdir}/pkgconfig/*.pc
+
+%changelog
+* Mon Oct 22 2012 Rich Mattes <richmattes at gmail.com> - 1.4-1
+- Update to release 1.4
+
+* Tue May 29 2012 Rich Mattes <richmattes at gmail.com> - 1.3-3
+- Fixed pkgconfig file to point to correct include dir
+
+* Sat May 26 2012 Rich Mattes <richmattes at gmail.com> - 1.3-2
+- Convert test suite to CTest
+
+* Fri May 25 2012 Rich Mattes <richmattes at gmail.com> - 1.3-1
+- Update to release 1.3
+- Remove upstreamed soname patch
+
+* Sun May 06 2012 Rich Mattes <richmattes at gmail.com> - 1.2-3
+- Removed -static subpackage.
+
+* Mon Apr 30 2012 Rich Mattes <richmattes at gmail.com> - 1.2-2
+- Update soname patch to match upstream implementation 
+
+* Fri Apr 27 2012 Rich Mattes <richmattes at gmail.com> - 1.2-1
+- Initial package
diff --git a/sources b/sources
index e69de29..8b1dfe4 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+684a9f2f44567a12a30af383de992a89  libccd-1.4.tar.gz


More information about the scm-commits mailing list