summaryrefslogtreecommitdiff
path: root/dev-python/quex
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-python/quex
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-python/quex')
-rw-r--r--dev-python/quex/Manifest4
-rw-r--r--dev-python/quex/files/quex-0.65.4-gentoo.patch43
-rw-r--r--dev-python/quex/metadata.xml24
-rw-r--r--dev-python/quex/quex-0.65.4.ebuild44
4 files changed, 115 insertions, 0 deletions
diff --git a/dev-python/quex/Manifest b/dev-python/quex/Manifest
new file mode 100644
index 000000000000..7da3a10e377b
--- /dev/null
+++ b/dev-python/quex/Manifest
@@ -0,0 +1,4 @@
+AUX quex-0.65.4-gentoo.patch 1592 BLAKE2B 2b1b03d108dfa9e10b60acf16f474a0b98c32e7caa6f7a7da08b3d13253cc54ea9cdcac304d20a3ea524a8a9a0088e5ab514c71f2bc3a37b74fb910ec3bf9cc9 SHA512 7202b8e9621357dd01d93e260c95df3c006d28648e12158c3e8031d6c23988ea623d10697042c1f0c6887a6af5bbea979faa7afa0ff477a9432aa4c6f56fd288
+DIST quex-0.65.4.tar.gz 2202154 BLAKE2B 6b273998c9641aeee458291245a4fb956b5fe9b66d8c42f0c1d9b360a4d171c830a1d487bcbab9ccea49d10b7532ed488ce66dc165f31cce9521f97c5a4575f4 SHA512 0b11d7e5c5165674626fbbe7f54853656c579c63b78bd2fef2f5a9b316171dc647812d9a37df4e7c49c05de11a307b6425089f4ab281affb6c03a9cf09e2a035
+EBUILD quex-0.65.4.ebuild 915 BLAKE2B 0499ad6312f5d1d04c9f20a55ec2066aa4bb1da17f127cad6bc99e3a5bc22061213fd34fe77669091259470316b2f3a48bd474138841721ff8f00e9606cb9f83 SHA512 44b9d57618501a952b411da30dd89acd3fb620a7f3840942bde6b8e7b99cb7a8ffbbbe348b3bf1a83d88751aefc32767b31b38b1fbcac4a8a2b76af4d4055fa3
+MISC metadata.xml 807 BLAKE2B 778188ed4c2e4c0b626c8e732be918b44583c5b490356f2c28dcd978c1c3b76b45440c45b0175b203f36937d43f4e12aeabcc1f40183f740c1357006d5841dc2 SHA512 37a5d2bd9351e1bd4f20e6b40808a1598b7b46d1d5559210c83ef106d25dd895d2d0fc31bd6671c98129176c36564388d071edbd058a57666aca07f6ff0fb930
diff --git a/dev-python/quex/files/quex-0.65.4-gentoo.patch b/dev-python/quex/files/quex-0.65.4-gentoo.patch
new file mode 100644
index 000000000000..cbe161a18e11
--- /dev/null
+++ b/dev-python/quex/files/quex-0.65.4-gentoo.patch
@@ -0,0 +1,43 @@
+--- quex-0.65.4/quex-exe.py.old 2017-12-13 21:42:48.633280478 +0100
++++ quex-0.65.4/quex-exe.py 2017-12-13 21:43:02.066040530 +0100
+@@ -40,11 +40,6 @@
+ print("error: Please, use Python versions 2.x.")
+ sys.exit(-1)
+
+-if os.environ.has_key("QUEX_PATH") == False:
+- print("Environment variable QUEX_PATH has not been defined.")
+-else:
+- sys.path.insert(0, os.environ["QUEX_PATH"])
+-
+ try:
+ exception_checker.do_on_import(sys.argv)
+ import quex.DEFINITIONS
+--- quex-0.65.4/quex/DEFINITIONS.py.old 2017-12-13 21:48:52.887765325 +0100
++++ quex-0.65.4/quex/DEFINITIONS.py 2017-12-13 21:52:29.805877359 +0100
+@@ -23,7 +23,7 @@
+ QUEX_VERSION = '0.65.4'
+
+ try:
+- QUEX_INSTALLATION_DIR = os.environ["QUEX_PATH"]
++ QUEX_INSTALLATION_DIR = "@PYTHON_SITEDIR@"
+ # Note, that windows can also deal with backslashes.
+ QUEX_INSTALLATION_DIR = QUEX_INSTALLATION_DIR.replace("\\", "/")
+ except:
+@@ -49,15 +49,14 @@
+ sys.exit(-1) # sys.exit(-1) is acceptable
+
+ QUEX_PATH = QUEX_INSTALLATION_DIR
+-QUEX_CODEC_DB_PATH = QUEX_PATH + "/quex/engine/codec_db/database"
++QUEX_CODEC_DB_PATH = "/usr/share/quex/database"
+
+-sys.path.insert(0, QUEX_INSTALLATION_DIR)
+
+ def check():
+ global QUEX_INSTALLATION_DIR
+
+ # -- Try to acces the file 'quex-exe.py' in order to verify
+- if os.access(QUEX_INSTALLATION_DIR + "/quex-exe.py", os.F_OK) == False:
++ if False:
+ print "error: Environment variable 'QUEX_PATH' does not point to"
+ print "error: a valid installation directory of quex."
+ print "error: current setting of 'QUEX_PATH':"
diff --git a/dev-python/quex/metadata.xml b/dev-python/quex/metadata.xml
new file mode 100644
index 000000000000..7500e5f0c488
--- /dev/null
+++ b/dev-python/quex/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ </maintainer>
+ <maintainer type="person">
+ <email>tupone@gentoo.org</email>
+ <name>Tupone Alfredo</name>
+ </maintainer>
+ <longdescription lang="en">
+ It is:
+ a tool to generate lexical analyzers. A lexical analyzer is a program
+ that transforms a stream of characters into a stream of
+ 'atomic chunks of meaning', so called tokens.
+
+ It does:
+ generate directly coded lexical analyzers, rather than table based
+ engines.
+ respond to queries on Unicode properties and regular expressions on the
+ command line.
+ generate state transition graphs of the generated engines.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-python/quex/quex-0.65.4.ebuild b/dev-python/quex/quex-0.65.4.ebuild
new file mode 100644
index 000000000000..b1ebd9894030
--- /dev/null
+++ b/dev-python/quex/quex-0.65.4.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-single-r1
+
+DESCRIPTION="Mode Oriented Directly Coded Lexical Analyser Generator"
+HOMEPAGE="http://quex.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="${PYTHON_DEPS}"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
+
+src_prepare() {
+ default
+ sed -i \
+ -e "s:@PYTHON_SITEDIR@:$(python_get_sitedir):g" \
+ quex/DEFINITIONS.py || die
+ mv quex/engine/codec_db/database . || die
+}
+
+src_install() {
+ default
+ insinto /usr/share/quex
+ doins -r database
+ dosym $(python_get_sitedir)/quex/code_base /usr/include/quex/code_base
+
+ python_domodule quex
+ python_newexe quex-exe.py quex
+ doman manpage/quex.1
+ dodoc -r demo
+}