92 lines
2.2 KiB
RPMSpec
92 lines
2.2 KiB
RPMSpec
%ifarch %{valgrind_arches}
|
|
%global with_valgrind 1
|
|
%endif
|
|
%global soversion 2
|
|
|
|
Name: libccd
|
|
Version: 2.1
|
|
Release: 1
|
|
Summary: Library for collision detection between convex shapes
|
|
|
|
License: BSD
|
|
URL: http://libccd.danfis.cz
|
|
Source0: https://github.com/danfis/%{name}/archive/refs/tags/v%{version}.tar.gz
|
|
# This patch integrates additional programs that are present in
|
|
# the testsuites folder into CMake, via CTest.
|
|
# It also increments the version number to match the release.
|
|
# Not yet submitted upstream
|
|
Patch0: %{name}-2.1-ctest.patch
|
|
# This patch changes the ccd.pc file to point to the correct include
|
|
# directory. Not yet submitted upstream
|
|
Patch1: %{name}-2.1-pkgconfig.patch
|
|
# Convert check_regressions to python3
|
|
# Not submitted upstream
|
|
Patch2: %{name}-2.1-py3.patch
|
|
|
|
BuildRequires: make
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: cmake
|
|
# These are required for executing the test suite
|
|
BuildRequires: python3
|
|
%if 0%{?with_valgrind}
|
|
BuildRequires: valgrind
|
|
%endif
|
|
|
|
%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 -p0 -b .ctest
|
|
%patch1 -p0 -b .pkgconfig
|
|
%patch2 -p0 -b .py3
|
|
|
|
%build
|
|
mkdir build && cd build
|
|
%cmake \
|
|
-DBUILD_TESTS=ON \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
..
|
|
%make_build
|
|
|
|
%install
|
|
%make_install -C build
|
|
find %{buildroot} -name '*.la' -exec rm -f {} ';'
|
|
rm -f %{buildroot}%{_libdir}/*.a
|
|
rm -rf %{buildroot}%{_docdir}/ccd
|
|
|
|
|
|
%check
|
|
%if 0%{?with_valgrind}
|
|
make -C build test ||exit 0
|
|
%endif
|
|
|
|
|
|
%files
|
|
%doc BSD-LICENSE README.md
|
|
%{_libdir}/*.so.%{version}
|
|
%{_libdir}/*.so.%{soversion}
|
|
|
|
%files devel
|
|
%{_includedir}/*
|
|
%{_libdir}/*.so
|
|
%{_libdir}/pkgconfig/*.pc
|
|
%{_libdir}/ccd
|
|
|
|
%changelog
|
|
* Sun May 7 2023 will_niutao <niutao2@huawei.com> - 2.1-1
|
|
- Init for openEuler
|
|
|