Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes: https://bugs.gentoo.org/769251 Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Ross Charles Campbell <rossbridger.cc@gmail.com>
- Loading branch information
1 parent
1241df0
commit 95ac4c7
Showing
2 changed files
with
87 additions
and
0 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 bullet-3.07.tar.gz 148413637 BLAKE2B 776cd7651d11d865095ea000d353860bea09c6ff4ec8dd8e43282a78373e2830f6ce1ce2b87ed25a67be7bded297b3a6320b2872a71dfd3849e7b197c6d2c936 SHA512 31fc7cb4ed8b939abc9eeb0a8f6fff3a454ea4ebcffd797fd35a2320fe3ab222fcd315569809ea148d0efff47267f5eec9f4bf7aaf07730a06aa9babd2abc9a6 | ||
DIST bullet-3.08.tar.gz 129282084 BLAKE2B daa5b6719575af28c6f6359ef51c7a9b8ca9cde2e5b4ea1b00c2991fc4d6b13175d034c7a694eaf36e8ff3ab343457027f57bb511639b3701341ad4551f1a6ca SHA512 4177c2b2f3b007691102973e7a3d4337b8de559d20058db75a2d25eab35b9be62fa14e3362435ef6f7ea2f6b8cf02a78770cc49c17e979adf3a2b41f19ee702a |
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,86 @@ | ||
# Copyright 1999-2021 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
|
||
inherit cmake toolchain-funcs | ||
|
||
DESCRIPTION="Continuous Collision Detection and Physics Library" | ||
HOMEPAGE="https://www.bulletphysics.com/" | ||
SRC_URI="https://github.com/bulletphysics/bullet3/archive/${PV}.tar.gz -> ${P}.tar.gz" | ||
|
||
LICENSE="ZLIB" | ||
SLOT="0/${PV}" | ||
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux" | ||
IUSE="doc double-precision examples openmp tbb test threads" | ||
|
||
REQUIRED_USE=" | ||
openmp? ( threads ) | ||
tbb? ( threads ) | ||
" | ||
|
||
RDEPEND=" | ||
virtual/opengl | ||
media-libs/freeglut | ||
tbb? ( dev-cpp/tbb ) | ||
" | ||
DEPEND="${RDEPEND}" | ||
BDEPEND="doc? ( app-doc/doxygen[dot] )" | ||
|
||
PATCHES=( "${FILESDIR}"/${PN}-2.85-soversion.patch ) | ||
|
||
DOCS=( AUTHORS.txt LICENSE.txt README.md ) | ||
|
||
# Building / linking of third Party library BussIK does not work out of the box | ||
RESTRICT="test" | ||
|
||
S="${WORKDIR}/${PN}3-${PV}" | ||
|
||
pkg_pretend() { | ||
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp | ||
} | ||
|
||
pkg_setup() { | ||
[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp | ||
} | ||
|
||
src_prepare() { | ||
cmake_src_prepare | ||
|
||
# allow to generate docs | ||
sed -i -e 's/GENERATE_HTMLHELP.*//g' Doxyfile || die | ||
} | ||
|
||
src_configure() { | ||
local mycmakeargs=( | ||
-DBUILD_CPU_DEMOS=OFF | ||
-DBUILD_OPENGL3_DEMOS=OFF | ||
-DBUILD_BULLET2_DEMOS=OFF | ||
-DUSE_GRAPHICAL_BENCHMARK=OFF | ||
-DINSTALL_LIBS=ON | ||
-DBUILD_BULLET3=ON | ||
-DBUILD_EXTRAS=OFF | ||
-DUSE_DOUBLE_PRECISION=$(usex double-precision) | ||
-DBUILD_UNIT_TESTS=$(usex test) | ||
-DBULLET2_MULTITHREADING=$(usex threads) | ||
-DBULLET2_USE_OPEN_MP_MULTITHREADING=$(usex openmp) | ||
-DBULLET2_USE_TBB_MULTITHREADING=$(usex tbb) | ||
) | ||
cmake_src_configure | ||
} | ||
|
||
src_compile() { | ||
cmake_src_compile | ||
|
||
if use doc; then | ||
doxygen || die | ||
HTML_DOCS+=( html/. ) | ||
DOCS+=( docs/*.pdf ) | ||
fi | ||
|
||
if use examples; then | ||
# throws QA warnings | ||
rm examples/ThirdPartyLibs/openvr/*/linux*/libopenvr_api.so || die | ||
DOCS+=( examples ) | ||
fi | ||
} |