1 |
commit: 8e08a861062b4f9e123271767574e29133d07359 |
2 |
Author: Alfredo Tupone <tupone <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Aug 17 09:38:58 2020 +0000 |
4 |
Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 17 09:38:58 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e08a861 |
7 |
|
8 |
dev-python/quex: fix build for python3.7 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/737374 |
11 |
Package-Manager: Portage-2.3.103, Repoman-2.3.23 |
12 |
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org> |
13 |
|
14 |
dev-python/quex/files/quex-0.71.0-py37.patch | 11 ++++++ |
15 |
dev-python/quex/quex-0.71.0-r1.ebuild | 54 ++++++++++++++++++++++++++++ |
16 |
2 files changed, 65 insertions(+) |
17 |
|
18 |
diff --git a/dev-python/quex/files/quex-0.71.0-py37.patch b/dev-python/quex/files/quex-0.71.0-py37.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..9c2ed48d549 |
21 |
--- /dev/null |
22 |
+++ b/dev-python/quex/files/quex-0.71.0-py37.patch |
23 |
@@ -0,0 +1,11 @@ |
24 |
+--- a/quex/input/code/base.py 2020-08-17 11:27:16.948578316 +0200 |
25 |
++++ b/quex/input/code/base.py 2020-08-17 11:27:27.604426654 +0200 |
26 |
+@@ -123,7 +123,7 @@ |
27 |
+ def set_source_reference(self, SourceReference): |
28 |
+ self.__source_reference = SourceReference |
29 |
+ |
30 |
+- @typed(Re=re._pattern_type) |
31 |
++ @typed(Re=re.Pattern) |
32 |
+ def contains_string(self, Re): return self.__check_code(lambda x: Re.search(x) is not None) |
33 |
+ def is_empty(self): return not self.__check_code(lambda x: len(x) != 0) |
34 |
+ def is_whitespace(self): return not self.__check_code(lambda x: len(x.strip()) != 0) |
35 |
|
36 |
diff --git a/dev-python/quex/quex-0.71.0-r1.ebuild b/dev-python/quex/quex-0.71.0-r1.ebuild |
37 |
new file mode 100644 |
38 |
index 00000000000..7b55297c7f7 |
39 |
--- /dev/null |
40 |
+++ b/dev-python/quex/quex-0.71.0-r1.ebuild |
41 |
@@ -0,0 +1,54 @@ |
42 |
+# Copyright 1999-2020 Gentoo Authors |
43 |
+# Distributed under the terms of the GNU General Public License v2 |
44 |
+ |
45 |
+EAPI=7 |
46 |
+ |
47 |
+PYTHON_COMPAT=( python3_7 ) |
48 |
+ |
49 |
+inherit python-single-r1 |
50 |
+ |
51 |
+DESCRIPTION="Mode Oriented Directly Coded Lexical Analyser Generator" |
52 |
+HOMEPAGE="http://quex.sourceforge.net/" |
53 |
+SRC_URI="mirror://sourceforge/${PN}/${P}.zip" |
54 |
+ |
55 |
+LICENSE="LGPL-2.1" |
56 |
+SLOT="0" |
57 |
+KEYWORDS="~amd64 ~x86" |
58 |
+IUSE="" |
59 |
+ |
60 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
61 |
+ |
62 |
+RDEPEND="${PYTHON_DEPS}" |
63 |
+BDEPEND="${RDEPEND} |
64 |
+ app-arch/unzip" |
65 |
+DEPEND="${RDEPEND}" |
66 |
+ |
67 |
+PATCHES=( |
68 |
+ "${FILESDIR}"/${P}-gentoo.patch |
69 |
+ "${FILESDIR}"/${P}-py37.patch |
70 |
+) |
71 |
+ |
72 |
+src_prepare() { |
73 |
+ default |
74 |
+ sed -i \ |
75 |
+ -e "s:@PYTHON_SITEDIR@:$(python_get_sitedir):g" \ |
76 |
+ quex/DEFINITIONS.py || die |
77 |
+ mkdir -p engine/codec_db/unicode || die |
78 |
+ mv quex/engine/codec_db/database engine/codec_db/ || die |
79 |
+ mv quex/engine/codec_db/unicode/database engine/codec_db/unicode/ || die |
80 |
+ mv quex/code_base . || die |
81 |
+} |
82 |
+ |
83 |
+src_install() { |
84 |
+ default |
85 |
+ insinto /usr/share/quex/ |
86 |
+ doins -r engine |
87 |
+ doins -r code_base |
88 |
+ |
89 |
+ python_domodule quex |
90 |
+ python_newscript quex-exe.py quex |
91 |
+ doman manpage/quex.1 |
92 |
+ dodoc -r demo |
93 |
+ insinto /etc/profile.d/ |
94 |
+ doins "${FILESDIR}"/quex.sh |
95 |
+} |