Install this version:
emerge -a =games-engines/box2d-3.1.1
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake
DESCRIPTION="C++ engine for simulating rigid bodies in 2D games"
HOMEPAGE="https://box2d.org/"
SRC_URI="https://github.com/erincatto/Box2D/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="ZLIB"
SLOT="0"
KEYWORDS="amd64 ~arm arm64 ~loong ppc64 ~riscv x86"
IUSE="doc test"
RESTRICT="!test? ( test )"
DEPEND="test? ( dev-cpp/doctest )"
BDEPEND="doc? ( app-text/doxygen )"
#PATCHES=(
#"${FILESDIR}/${P}-sandbox-error.patch" # bug 907072, downstream
#"${FILESDIR}/${P}-cmake-minreqver-3.10.patch" # bug 964480, on par w/ git master
#)
src_prepare() {
cmake_src_prepare
# unbundle doctest
#rm unit-test/doctest.h || die
#ln -s "${ESYSROOT}"/usr/include/doctest/doctest.h unit-test/ || die
}
src_configure() {
local mycmakeargs=(
-DBOX2D_BENCHMARKS=OFF # bundled libs, broken anyway right now
-DBOX2D_UNIT_TESTS=$(usex test)
-DBOX2D_DOCS=$(usex doc)
-DBOX2D_SAMPLES=OFF
)
cmake_src_configure
}
src_test() {
"${BUILD_DIR}"/bin/unit_test || die
}
Manage flags for this package:
euse -i <flag> -p games-engines/box2d |
euse -E <flag> -p games-engines/box2d |
euse -D <flag> -p games-engines/box2d
| Type | File | Size | Source URLs |
|---|---|---|---|
| DIST | box2d-3.1.1.tar.gz | 780115 bytes | https://github.com/erincatto/Box2D/archive/v3.1.1.tar.gz |