mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-17 19:13:13 -04:00
dev-libs/fastText: initial import
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
This commit is contained in:
64
dev-libs/fastText/fastText-0.9.2.ebuild
Normal file
64
dev-libs/fastText/fastText-0.9.2.ebuild
Normal file
@@ -0,0 +1,64 @@
|
||||
# Copyright 2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{8..10} )
|
||||
DISTUTILS_OPTIONAL=1
|
||||
inherit cmake distutils-r1
|
||||
|
||||
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}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="python"
|
||||
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
|
||||
|
||||
RDEPEND="
|
||||
python? (
|
||||
${PYTHON_DEPS}
|
||||
dev-python/pybind11[${PYTHON_USEDEP}]
|
||||
dev-python/numpy[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
DOCS=( {CODE_OF_CONDUCT,CONTRIBUTING,README}.md python/{README.rst,doc} docs )
|
||||
|
||||
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() {
|
||||
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() {
|
||||
${EPYTHON} runtests.py -u || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cmake_src_install
|
||||
use python && distutils-r1_src_install
|
||||
|
||||
find "${ED}" -name '*.a' -delete || die
|
||||
}
|
||||
Reference in New Issue
Block a user