1 |
commit: 33a07cc462f49c63de1b1c2097779258e1597713 |
2 |
Author: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq <DOT> in> |
3 |
AuthorDate: Thu Mar 31 07:02:51 2022 +0000 |
4 |
Commit: Anna Vyalkova <cyber+gentoo <AT> sysrq <DOT> in> |
5 |
CommitDate: Thu Mar 31 07:02:51 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=33a07cc4 |
7 |
|
8 |
dev-libs/fastText: initial import |
9 |
|
10 |
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo <AT> sysrq.in> |
11 |
|
12 |
dev-libs/fastText/Manifest | 1 + |
13 |
dev-libs/fastText/fastText-0.9.2.ebuild | 64 +++++++++++++++++++++++++++++++++ |
14 |
dev-libs/fastText/metadata.xml | 12 +++++++ |
15 |
3 files changed, 77 insertions(+) |
16 |
|
17 |
diff --git a/dev-libs/fastText/Manifest b/dev-libs/fastText/Manifest |
18 |
new file mode 100644 |
19 |
index 000000000..c45a8082f |
20 |
--- /dev/null |
21 |
+++ b/dev-libs/fastText/Manifest |
22 |
@@ -0,0 +1 @@ |
23 |
+DIST fastText-0.9.2.tar.gz 4036722 BLAKE2B ea3af92ce18d04241128cfb28773f0785a006e79c861d718c2c6ad788d776ad60b0543a42eb8be5a865cbc12283355521431fe2fba48544399e4a2b1520ff3f1 SHA512 8f0f6e78b3c6b3c7e7d107778952f340cc208b8e0b920dd118a57884cca8ef7007ea88b6f3352cb7e08289a64743f507309e1e1259c785f810af7f5fa09f2656 |
24 |
|
25 |
diff --git a/dev-libs/fastText/fastText-0.9.2.ebuild b/dev-libs/fastText/fastText-0.9.2.ebuild |
26 |
new file mode 100644 |
27 |
index 000000000..31129522f |
28 |
--- /dev/null |
29 |
+++ b/dev-libs/fastText/fastText-0.9.2.ebuild |
30 |
@@ -0,0 +1,64 @@ |
31 |
+# Copyright 2022 Gentoo Authors |
32 |
+# Distributed under the terms of the GNU General Public License v2 |
33 |
+ |
34 |
+EAPI=8 |
35 |
+ |
36 |
+PYTHON_COMPAT=( python3_{8..10} ) |
37 |
+DISTUTILS_OPTIONAL=1 |
38 |
+inherit cmake distutils-r1 |
39 |
+ |
40 |
+DESCRIPTION="Library for fast text representation and classification" |
41 |
+HOMEPAGE="https://fasttext.cc https://github.com/facebookresearch/fastText" |
42 |
+SRC_URI="https://github.com/facebookresearch/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" |
43 |
+ |
44 |
+LICENSE="MIT" |
45 |
+SLOT="0" |
46 |
+KEYWORDS="~amd64" |
47 |
+IUSE="python" |
48 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
49 |
+ |
50 |
+RDEPEND=" |
51 |
+ python? ( |
52 |
+ ${PYTHON_DEPS} |
53 |
+ dev-python/pybind11[${PYTHON_USEDEP}] |
54 |
+ dev-python/numpy[${PYTHON_USEDEP}] |
55 |
+ ) |
56 |
+" |
57 |
+ |
58 |
+DOCS=( {CODE_OF_CONDUCT,CONTRIBUTING,README}.md python/{README.rst,doc} docs ) |
59 |
+ |
60 |
+src_prepare() { |
61 |
+ cmake_src_prepare |
62 |
+ use python && distutils-r1_src_prepare |
63 |
+ |
64 |
+ sed \ |
65 |
+ -e "/CMAKE_CXX_FLAGS/d" \ |
66 |
+ -e "s/\(DESTINATION\) lib/\1 $(get_libdir)/g" \ |
67 |
+ -i CMakeLists.txt || die |
68 |
+ sed "/extra_compile_args=/,+1d" -i setup.py || die |
69 |
+} |
70 |
+ |
71 |
+src_configure() { |
72 |
+ cmake_src_configure |
73 |
+ use python && distutils-r1_src_configure |
74 |
+} |
75 |
+ |
76 |
+src_compile() { |
77 |
+ cmake_src_compile |
78 |
+ use python && distutils-r1_src_compile |
79 |
+} |
80 |
+ |
81 |
+src_test() { |
82 |
+ use python && distutils-r1_src_test |
83 |
+} |
84 |
+ |
85 |
+python_test() { |
86 |
+ ${EPYTHON} runtests.py -u || die |
87 |
+} |
88 |
+ |
89 |
+src_install() { |
90 |
+ cmake_src_install |
91 |
+ use python && distutils-r1_src_install |
92 |
+ |
93 |
+ find "${ED}" -name '*.a' -delete || die |
94 |
+} |
95 |
|
96 |
diff --git a/dev-libs/fastText/metadata.xml b/dev-libs/fastText/metadata.xml |
97 |
new file mode 100644 |
98 |
index 000000000..d6777249e |
99 |
--- /dev/null |
100 |
+++ b/dev-libs/fastText/metadata.xml |
101 |
@@ -0,0 +1,12 @@ |
102 |
+<?xml version="1.0" encoding="UTF-8"?> |
103 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
104 |
+<pkgmetadata> |
105 |
+ <maintainer type="person"> |
106 |
+ <email>cyber+gentoo@×××××.in</email> |
107 |
+ <name>Anna</name> |
108 |
+ </maintainer> |
109 |
+ <upstream> |
110 |
+ <remote-id type="github">facebookresearch/fastText</remote-id> |
111 |
+ <remote-id type="pypi">fasttext</remote-id> |
112 |
+ </upstream> |
113 |
+</pkgmetadata> |