-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug: https://bugs.gentoo.org/615672 Bug: https://bugs.gentoo.org/682176 Bug: https://bugs.gentoo.org/725422 Signed-off-by: Dennis Lamm <expeditioneer@gentoo.org>
- Loading branch information
1 parent
9169d41
commit d8ff023
Showing
4 changed files
with
103 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
DIST libccd-2.0.tar.gz 68103 BLAKE2B 30a91dba9b5dec5edc40d014dd0cba23d75e99f296918b6e58199890508c39813f5170456b1301e9304c433ca3531b1f23c4cdbfc0f20fca21eeafe53991467d SHA512 627426f1acd24779e7d596fd5b18dede4cf3c13d3cceda87a8b2d0195b72d9ada45290fd41baa20d6e3adafda75074db355cb95a60f80023c32b5ad4e72235bf | ||
DIST libccd-2.1.tar.gz 73971 BLAKE2B 77feeb42426e72cfc1392351acf84f4c4670ea7f6a555a2b15dd8927e49b855423c4262e319b06774a8d887423238b8d018021ebeba5ee188e52accf5aeb48a1 SHA512 ff037d9c4df50f09600cf9b3514b259b2850ff43f74817853f5665d22812891168f70bd3cc3969b2c9e3c706f6254991a65421476349607fbd04d894b217456d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Copyright 1999-2020 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
|
||
inherit cmake | ||
|
||
if [ "${PV}" = "9999" ] ; then | ||
inherit git-r3 | ||
EGIT_REPO_URI="https://github.com/danfis/libccd/${PN}.git" | ||
else | ||
SRC_URI="https://github.com/danfis/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" | ||
KEYWORDS="~amd64 ~arm" | ||
fi | ||
|
||
DESCRIPTION="Library for collision detection between two convex shapes" | ||
HOMEPAGE="http://libccd.danfis.cz/ | ||
https://github.com/danfis/libccd" | ||
|
||
LICENSE="BSD" | ||
SLOT="0" | ||
IUSE="+double-precision doc +shared test" | ||
RESTRICT="!test? ( test )" | ||
|
||
RDEPEND="" | ||
|
||
DEPEND="${RDEPEND} | ||
doc? ( dev-python/sphinx ) | ||
" | ||
|
||
src_prepare() { | ||
# upstream issue 72 | ||
# https://github.com/danfis/libccd/issues/72 | ||
sed -i -e "s \${CMAKE_INSTALL_DATAROOTDIR}/doc/ccd \${CMAKE_INSTALL_DATAROOTDIR}/doc/${PF} g" \ | ||
CMakeLists.txt doc/CMakeLists.txt || die | ||
|
||
cmake_src_prepare | ||
} | ||
|
||
src_configure() { | ||
local mycmakeargs=( | ||
-DBUILD_DOCUMENTATION=$(usex doc ON OFF) | ||
-DBUILD_SHARED_LIBS=$(usex shared ON OFF) | ||
-DENABLE_DOUBLE_PRECISION=$(usex double-precision ON OFF) | ||
) | ||
|
||
local CMAKE_BUILD_TYPE="Release" | ||
cmake_src_configure | ||
} | ||
|
||
src_install() { | ||
cmake_src_install | ||
|
||
if use doc; then | ||
local DOCS=( "${BUILD_DIR}"/doc/man ) | ||
local HTML_DOCS=( "${BUILD_DIR}"/doc/html ) | ||
einstalldocs | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,50 @@ | ||
# Copyright 1999-2014 Gentoo Foundation | ||
# Copyright 1999-2020 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=5 | ||
EAPI=7 | ||
|
||
SCM="" | ||
if [ "${PV#9999}" != "${PV}" ] ; then | ||
SCM="git-r3" | ||
EGIT_REPO_URI="https://github.com/danfis/libccd" | ||
fi | ||
|
||
inherit ${SCM} cmake-utils toolchain-funcs | ||
inherit cmake | ||
|
||
if [ "${PV#9999}" != "${PV}" ] ; then | ||
KEYWORDS="" | ||
SRC_URI="" | ||
if [ "${PV}" = "9999" ] ; then | ||
inherit git-r3 | ||
EGIT_REPO_URI="https://github.com/danfis/libccd/${PN}.git" | ||
else | ||
SRC_URI="https://github.com/danfis/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" | ||
KEYWORDS="~amd64 ~arm" | ||
SRC_URI="http://libccd.danfis.cz/files/${P}.tar.gz" | ||
fi | ||
|
||
DESCRIPTION="Library for collision detection between two convex shapes" | ||
HOMEPAGE="http://libccd.danfis.cz/" | ||
HOMEPAGE="http://libccd.danfis.cz/ | ||
https://github.com/danfis/libccd" | ||
|
||
LICENSE="BSD" | ||
SLOT="0" | ||
IUSE="double doc" | ||
IUSE="+double-precision doc +shared test" | ||
RESTRICT="!test? ( test )" | ||
|
||
RDEPEND="" | ||
|
||
DEPEND="${RDEPEND} | ||
doc? ( dev-python/sphinx )" | ||
DOCS=( README.md ) | ||
doc? ( dev-python/sphinx ) | ||
" | ||
|
||
src_configure() { | ||
local mycmakeargs=( | ||
"-DCCD_DOUBLE=$(usex double TRUE FALSE)" | ||
-DBUILD_DOCUMENTATION=$(usex doc ON OFF) | ||
-DBUILD_SHARED_LIBS=$(usex shared ON OFF) | ||
-DENABLE_DOUBLE_PRECISION=$(usex double-precision ON OFF) | ||
) | ||
cmake-utils_src_configure | ||
} | ||
|
||
src_compile() { | ||
cmake-utils_src_compile | ||
if use doc ; then | ||
cd "${S}/doc" | ||
emake SPHINXBUILD=sphinx-build html | ||
fi | ||
} | ||
|
||
src_test() { | ||
cd src/testsuites | ||
tc-export CC | ||
LDFLAGS="-L${BUILD_DIR} ${LDFLAGS}" \ | ||
LD_LIBRARY_PATH="${BUILD_DIR}:${LD_LIBRARY_PATH}" \ | ||
emake check | ||
local CMAKE_BUILD_TYPE="Release" | ||
cmake_src_configure | ||
} | ||
|
||
src_install() { | ||
cmake-utils_src_install | ||
use doc && dohtml -r "${S}/doc/_build/html/"* | ||
cmake_src_install | ||
|
||
if use doc; then | ||
local DOCS=( "${BUILD_DIR}"/doc/man ) | ||
local HTML_DOCS=( "${BUILD_DIR}"/doc/html ) | ||
einstalldocs | ||
fi | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<maintainer type="person"> | ||
<email>aballier@gentoo.org</email> | ||
<name>Alexis Ballier</name> | ||
</maintainer> | ||
<maintainer type="person"> | ||
<email>aballier@gentoo.org</email> | ||
<name>Alexis Ballier</name> | ||
</maintainer> | ||
<longdescription> | ||
libccd is library for a collision detection between two convex shapes. | ||
libccd implements variation on Gilbert–Johnson–Keerthi algorithm plus Expand Polytope Algorithm (EPA) and also | ||
implements algorithm Minkowski Portal Refinement (MPR, a.k.a. XenoCollide) as described in Game Programming Gems 7. | ||
</longdescription> | ||
<use> | ||
<flag name="double">Use double precision floats.</flag> | ||
<flag name="shared">Build shared library</flag> | ||
<flag name="double">Use double precision floats</flag> | ||
<flag name="double-precision">More precise calculations at the expense of speed</flag> | ||
</use> | ||
<upstream> | ||
<bugs-to>https://github.com/danfis/libccd/issues</bugs-to> | ||
<remote-id type="github">danfis/libccd</remote-id> | ||
</upstream> | ||
</pkgmetadata> |