Install this version:
emerge -a =dev-libs/fastText-0.9.2
| Version | EAPI | Keywords | Slot |
|---|---|---|---|
| 0.9.2 | 8 | amd64 | 0 |
# Copyright 2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{12..14} )
DISTUTILS_EXT=1
DISTUTILS_OPTIONAL=1
DISTUTILS_USE_PEP517=setuptools
inherit cmake distutils-r1 edo
DESCRIPTION="Library for fast text representation and classification"
HOMEPAGE="https://fasttext.cc https://github.com/facebookresearch/fastText"
SRC_URI="https://github.com/facebookresearch/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz
lid176? ( https://dl.fbaipublicfiles.com/fasttext/supervised-models/lid.176.bin )
lid176ftz? ( https://dl.fbaipublicfiles.com/fasttext/supervised-models/lid.176.ftz )"
LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64"
IUSE="python +lid176 lid176ftz"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RDEPEND="
python? (
${PYTHON_DEPS}
dev-python/pybind11[${PYTHON_USEDEP}]
dev-python/numpy[${PYTHON_USEDEP}]
)
"
BDEPEND="
python? ( ${DISTUTILS_DEPS} )
"
DOCS=( {CODE_OF_CONDUCT,CONTRIBUTING,README}.md python/{README.rst,doc} docs )
PATCHES=(
"${FILESDIR}/${P}-gcc13.patch"
"${FILESDIR}/${P}-numpy2.patch"
"${FILESDIR}/${P}-pep517.patch"
)
src_prepare() {
cmake_src_prepare
use python && distutils-r1_src_prepare
sed \
-e "/CMAKE_CXX_FLAGS/d" \
-e "s/\(DESTINATION\) lib/\1 $(get_libdir)/g" \
-i CMakeLists.txt || die
sed "/extra_compile_args=/,+1d" -i setup.py || die
}
src_configure() {
local mycmakeargs=(
-DPROJECT_VERSION=${PV}
)
cmake_src_configure
use python && distutils-r1_src_configure
}
src_compile() {
cmake_src_compile
use python && distutils-r1_src_compile
}
src_test() {
use python && distutils-r1_src_test
}
python_test() {
edo ${EPYTHON} runtests.py -u
}
src_install() {
cmake_src_install
use python && distutils-r1_src_install
insinto /usr/share/dict
use lid176 && doins "${DISTDIR}"/lid.176.bin
use lid176ftz && doins "${DISTDIR}"/lid.176.ftz
find "${ED}" -name '*.a' -delete || die
}
Manage flags for this package:
euse -i <flag> -p dev-libs/fastText |
euse -E <flag> -p dev-libs/fastText |
euse -D <flag> -p dev-libs/fastText
| Type | File | Size | Source URLs |
|---|---|---|---|
| DIST | fastText-0.9.2.gh.tar.gz | 4036722 bytes | https://github.com/facebookresearch/fastText/archive/refs/tags/v0.9.2.tar.gz |
| DIST | lid.176.bin | 131266198 bytes | https://dl.fbaipublicfiles.com/fasttext/supervised-models/lid.176.bin |
| DIST | lid.176.ftz | 938013 bytes | https://dl.fbaipublicfiles.com/fasttext/supervised-models/lid.176.ftz |