Install this version:
emerge -a =media-gfx/f3d-4.0.1
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =media-gfx/f3d-4.0.1
Or alternatively:
emerge --autounmask-write -a =media-gfx/f3d-4.0.1
| Version | EAPI | Keywords | Slot |
|---|---|---|---|
| 4.0.1 | 8 | ~amd64 | 0 |
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..15} )
inherit cmake python-single-r1 virtualx xdg
DESCRIPTION="Fast and minimalist 3D viewer"
HOMEPAGE="https://f3d.app/ https://github.com/f3d-app/f3d"
# Test data and baselines are in Git LFS, so the tag archive has only pointers.
SRC_URI="https://github.com/f3d-app/f3d/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz
test? (
https://github.com/Tatsh/tatsh-overlay/releases/download/__distfiles__/${P}-testing.tar.xz
)"
S="${WORKDIR}/${PN}-${PV}"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64"
IUSE="alembic assimp exr +hdf occt pdal python test vdb webp"
RESTRICT="!test? ( test )"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
# shellcheck disable=SC2016
RDEPEND="
dev-cpp/nlohmann_json
dev-libs/cxxopts
media-libs/freetype
>=sci-libs/vtk-9.5.2-r1[rendering]
virtual/opengl
alembic? ( media-gfx/alembic )
assimp? ( >=media-libs/assimp-5.4.0 )
exr? ( media-libs/openexr:= )
hdf? ( sci-libs/vtk[netcdf] )
occt? ( >=sci-libs/opencascade-7.6.3:= )
pdal? ( sci-libs/vtk[pdal] )
python? (
${PYTHON_DEPS}
$(python_gen_cond_dep 'dev-python/pybind11[${PYTHON_USEDEP}]')
)
vdb? ( sci-libs/vtk[openvdb] )
webp? ( media-libs/libwebp:= )
"
DEPEND="${RDEPEND}"
# media-libs/libwebp ships only pkg-config files, but f3d's WebP module looks
# for a CMake config providing WebP::webp. Patch it to use pkg-config instead.
PATCHES=( "${FILESDIR}/${PN}-webp-pkgconfig.patch" )
src_prepare() {
if use test; then
rm -r testing/{baselines,data} || die
mv "${WORKDIR}/${P}-testing/testing/"{baselines,data} testing/ || die
fi
cmake_src_prepare
}
pkg_setup() {
use python && python-single-r1_pkg_setup
}
src_configure() {
local mycmakeargs=(
"-DBUILD_TESTING=$(usex test ON OFF)"
-DF3D_BINDINGS_C=OFF
-DF3D_BINDINGS_JAVA=OFF
"-DF3D_BINDINGS_PYTHON=$(usex python)"
-DF3D_BUILD_APPLICATION=ON
"-DF3D_MODULE_EXR=$(usex exr)"
-DF3D_MODULE_UI=ON
"-DF3D_MODULE_WEBP=$(usex webp)"
"-DF3D_PLUGIN_BUILD_ALEMBIC=$(usex alembic)"
"-DF3D_PLUGIN_BUILD_ASSIMP=$(usex assimp)"
"-DF3D_PLUGIN_BUILD_HDF=$(usex hdf)"
"-DF3D_PLUGIN_BUILD_OCCT=$(usex occt)"
"-DF3D_PLUGIN_BUILD_PDAL=$(usex pdal)"
"-DF3D_PLUGIN_BUILD_VDB=$(usex vdb)"
-DF3D_USE_EXTERNAL_CXXOPTS=ON
-DF3D_USE_EXTERNAL_NLOHMANN_JSON=ON
)
use python && mycmakeargs+=( -DPython_EXECUTABLE="${PYTHON}" )
if use test; then
# Rendering tests run on Xvfb; headless EGL would need the GPU.
mycmakeargs+=( -DF3D_TESTING_ENABLE_EGL_TESTS=OFF )
fi
cmake_src_configure
}
src_test() {
local myctestargs=(
# Pastes from an X clipboard that has no owner under Xvfb.
-E 'f3d::TestInteractionCopyPaste$'
)
virtx cmake_src_test
}
Manage flags for this package:
euse -i <flag> -p media-gfx/f3d |
euse -E <flag> -p media-gfx/f3d |
euse -D <flag> -p media-gfx/f3d
dev-cpp/nlohmann_json dev-libs/cxxopts media-libs/freetype >=sci-libs/vtk-9.5.2-r1[rendering] virtual/opengl alembic? ( media-gfx/alembic ) assimp? ( >=media-libs/assimp-5.4.0 ) exr? ( media-libs/openexr:= ) hdf? ( sci-libs/vtk[netcdf] ) occt? ( >=sci-libs/opencascade-7.6.3:= ) pdal? ( sci-libs/vtk[pdal] ) python? ( ${PYTHON_DEPS} $(python_gen_cond_dep 'dev-python/pybind11[${PYTHON_USEDEP}]') ) vdb? ( sci-libs/vtk[openvdb] ) webp? ( media-libs/libwebp:= )
dev-cpp/nlohmann_json dev-libs/cxxopts media-libs/freetype >=sci-libs/vtk-9.5.2-r1[rendering] virtual/opengl alembic? ( media-gfx/alembic ) assimp? ( >=media-libs/assimp-5.4.0 ) exr? ( media-libs/openexr:= ) hdf? ( sci-libs/vtk[netcdf] ) occt? ( >=sci-libs/opencascade-7.6.3:= ) pdal? ( sci-libs/vtk[pdal] ) python? ( ${PYTHON_DEPS} $(python_gen_cond_dep 'dev-python/pybind11[${PYTHON_USEDEP}]') ) vdb? ( sci-libs/vtk[openvdb] ) webp? ( media-libs/libwebp:= )
| Type | File | Size | Source URLs |
|---|---|---|---|
| DIST | f3d-4.0.1-testing.tar.xz | 45695004 bytes | https://github.com/Tatsh/tatsh-overlay/releases/download/__distfiles__/f3d-4.0.1-testing.tar.xz |
| DIST | f3d-4.0.1.gh.tar.gz | 5484826 bytes | https://github.com/f3d-app/f3d/archive/refs/tags/v4.0.1.tar.gz |