summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2020-08-17 11:38:58 +0200
committerAlfredo Tupone <tupone@gentoo.org>2020-08-17 11:38:58 +0200
commit8e08a861062b4f9e123271767574e29133d07359 (patch)
treee80fecb42c5ef57b2894cde8e235308cd8c35d2e /dev-python/quex
parentsys-process/procps: Stabilize 3.3.16-r2 arm, #737498 (diff)
downloadgentoo-8e08a861062b4f9e123271767574e29133d07359.tar.gz
gentoo-8e08a861062b4f9e123271767574e29133d07359.tar.bz2
gentoo-8e08a861062b4f9e123271767574e29133d07359.zip
dev-python/quex: fix build for python3.7
Bug: https://bugs.gentoo.org/737374 Package-Manager: Portage-2.3.103, Repoman-2.3.23 Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'dev-python/quex')
-rw-r--r--dev-python/quex/files/quex-0.71.0-py37.patch11
-rw-r--r--dev-python/quex/quex-0.71.0-r1.ebuild54
2 files changed, 65 insertions, 0 deletions
diff --git a/dev-python/quex/files/quex-0.71.0-py37.patch b/dev-python/quex/files/quex-0.71.0-py37.patch
new file mode 100644
index 000000000000..9c2ed48d5495
--- /dev/null
+++ b/dev-python/quex/files/quex-0.71.0-py37.patch
@@ -0,0 +1,11 @@
+--- a/quex/input/code/base.py 2020-08-17 11:27:16.948578316 +0200
++++ b/quex/input/code/base.py 2020-08-17 11:27:27.604426654 +0200
+@@ -123,7 +123,7 @@
+ def set_source_reference(self, SourceReference):
+ self.__source_reference = SourceReference
+
+- @typed(Re=re._pattern_type)
++ @typed(Re=re.Pattern)
+ def contains_string(self, Re): return self.__check_code(lambda x: Re.search(x) is not None)
+ def is_empty(self): return not self.__check_code(lambda x: len(x) != 0)
+ def is_whitespace(self): return not self.__check_code(lambda x: len(x.strip()) != 0)
diff --git a/dev-python/quex/quex-0.71.0-r1.ebuild b/dev-python/quex/quex-0.71.0-r1.ebuild
new file mode 100644
index 000000000000..7b55297c7f76
--- /dev/null
+++ b/dev-python/quex/quex-0.71.0-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_7 )
+
+inherit python-single-r1
+
+DESCRIPTION="Mode Oriented Directly Coded Lexical Analyser Generator"
+HOMEPAGE="http://quex.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.zip"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}"
+BDEPEND="${RDEPEND}
+ app-arch/unzip"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gentoo.patch
+ "${FILESDIR}"/${P}-py37.patch
+)
+
+src_prepare() {
+ default
+ sed -i \
+ -e "s:@PYTHON_SITEDIR@:$(python_get_sitedir):g" \
+ quex/DEFINITIONS.py || die
+ mkdir -p engine/codec_db/unicode || die
+ mv quex/engine/codec_db/database engine/codec_db/ || die
+ mv quex/engine/codec_db/unicode/database engine/codec_db/unicode/ || die
+ mv quex/code_base . || die
+}
+
+src_install() {
+ default
+ insinto /usr/share/quex/
+ doins -r engine
+ doins -r code_base
+
+ python_domodule quex
+ python_newscript quex-exe.py quex
+ doman manpage/quex.1
+ dodoc -r demo
+ insinto /etc/profile.d/
+ doins "${FILESDIR}"/quex.sh
+}