加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
libccd.spec 2.19 KB
一键复制 编辑 原始数据 按行查看 历史
s_c_c 提交于 2023-06-06 15:58 . 增加libccd源代码
%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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化