1 |
commit: 22f801fbd761ae7be0a824b1d336c0e3657408fd |
2 |
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org> |
3 |
AuthorDate: Sat Sep 28 02:15:03 2019 +0000 |
4 |
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 29 02:56:13 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=22f801fb |
7 |
|
8 |
dev-libs/marisa: Add live ebuild. |
9 |
|
10 |
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org> |
11 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
12 |
|
13 |
dev-libs/marisa/marisa-9999.ebuild | 104 +++++++++++++++++++++++++++++++++++++ |
14 |
1 file changed, 104 insertions(+) |
15 |
|
16 |
diff --git a/dev-libs/marisa/marisa-9999.ebuild b/dev-libs/marisa/marisa-9999.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000000..6942f85b198 |
19 |
--- /dev/null |
20 |
+++ b/dev-libs/marisa/marisa-9999.ebuild |
21 |
@@ -0,0 +1,104 @@ |
22 |
+# Copyright 2014-2019 Gentoo Authors |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI="7" |
26 |
+PYTHON_COMPAT=(python{3_6,3_7}) |
27 |
+DISTUTILS_OPTIONAL="1" |
28 |
+ |
29 |
+inherit autotools distutils-r1 |
30 |
+ |
31 |
+if [[ "${PV}" == "9999" ]]; then |
32 |
+ inherit git-r3 |
33 |
+ |
34 |
+ EGIT_REPO_URI="https://github.com/s-yata/marisa-trie" |
35 |
+fi |
36 |
+ |
37 |
+DESCRIPTION="Matching Algorithm with Recursively Implemented StorAge" |
38 |
+HOMEPAGE="https://github.com/s-yata/marisa-trie https://code.google.com/archive/p/marisa-trie/" |
39 |
+if [[ "${PV}" == "9999" ]]; then |
40 |
+ SRC_URI="" |
41 |
+else |
42 |
+ SRC_URI="https://github.com/s-yata/marisa-trie/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
43 |
+fi |
44 |
+ |
45 |
+LICENSE="|| ( BSD-2 LGPL-2.1+ )" |
46 |
+SLOT="0" |
47 |
+KEYWORDS="" |
48 |
+IUSE="python static-libs" |
49 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
50 |
+ |
51 |
+BDEPEND="python? ( |
52 |
+ ${PYTHON_DEPS} |
53 |
+ dev-lang/swig |
54 |
+ )" |
55 |
+DEPEND="python? ( ${PYTHON_DEPS} )" |
56 |
+RDEPEND="${DEPEND}" |
57 |
+ |
58 |
+if [[ "${PV}" != "9999" ]]; then |
59 |
+ S="${WORKDIR}/marisa-trie-${PV}" |
60 |
+fi |
61 |
+ |
62 |
+src_prepare() { |
63 |
+ default |
64 |
+ eautoreconf |
65 |
+ |
66 |
+ sed -e "s:^\([[:space:]]*\)libraries=:\1include_dirs=[\"../../include\"],\n\1library_dirs=[\"../../lib/marisa/.libs\"],\n&:" -i bindings/python/setup.py || die |
67 |
+ |
68 |
+ if use python; then |
69 |
+ pushd bindings/python > /dev/null || die |
70 |
+ distutils-r1_src_prepare |
71 |
+ popd > /dev/null || die |
72 |
+ fi |
73 |
+} |
74 |
+ |
75 |
+src_configure() { |
76 |
+ local -x CPPFLAGS="${CPPFLAGS} ${CXXFLAGS}" |
77 |
+ |
78 |
+ local options=( |
79 |
+ # Preprocessor macros dependent on CPPFLAGS are checked. |
80 |
+ --enable-sse2 |
81 |
+ --enable-sse3 |
82 |
+ --enable-ssse3 |
83 |
+ --enable-sse4.1 |
84 |
+ --enable-sse4.2 |
85 |
+ --enable-sse4 |
86 |
+ --enable-sse4a |
87 |
+ --enable-popcnt |
88 |
+ $(use_enable static-libs static) |
89 |
+ ) |
90 |
+ |
91 |
+ econf "${options[@]}" |
92 |
+ |
93 |
+ if use python; then |
94 |
+ pushd bindings/python > /dev/null || die |
95 |
+ distutils-r1_src_configure |
96 |
+ popd > /dev/null || die |
97 |
+ fi |
98 |
+} |
99 |
+ |
100 |
+src_compile() { |
101 |
+ default |
102 |
+ |
103 |
+ if use python; then |
104 |
+ emake -C bindings swig-python |
105 |
+ pushd bindings/python > /dev/null || die |
106 |
+ distutils-r1_src_compile |
107 |
+ popd > /dev/null || die |
108 |
+ fi |
109 |
+} |
110 |
+ |
111 |
+src_install() { |
112 |
+ default |
113 |
+ find "${D}" -name "*.la" -type f -delete || die |
114 |
+ |
115 |
+ ( |
116 |
+ docinto html |
117 |
+ dodoc docs/* |
118 |
+ ) |
119 |
+ |
120 |
+ if use python; then |
121 |
+ pushd bindings/python > /dev/null || die |
122 |
+ distutils-r1_src_install |
123 |
+ popd > /dev/null || die |
124 |
+ fi |
125 |
+} |