summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-ada/langkit/Manifest1
-rw-r--r--dev-ada/langkit/files/langkit-2018-gentoo.patch21
-rw-r--r--dev-ada/langkit/langkit-2018.ebuild48
3 files changed, 70 insertions, 0 deletions
diff --git a/dev-ada/langkit/Manifest b/dev-ada/langkit/Manifest
index e7ad949e03cf..bdd44e3183f9 100644
--- a/dev-ada/langkit/Manifest
+++ b/dev-ada/langkit/Manifest
@@ -1 +1,2 @@
+DIST langkit-gpl-2018.tar.gz 565649 BLAKE2B e18beea565351eb4b10baa9168db742598817d231c5eab578b17c2b0409ac77b9972f8f426499e086779eaeda0ac1ba11e5cb3b47ecab8e63674b7ef654b26b7 SHA512 62a8820c3fd3d44f6cd22e181f6eddcf52945c93ea5eb793a63b7f13e71705807170b0cc4c3873b127e3fafe751a5dd27da54087986f506f8500b916ef1f078f
DIST langkit-gps-src-2017.tar.gz 364589 BLAKE2B 14d80e904ded20a73d65a5828157ea82672559b5bb47e465381989ad3a6e90f41bd0c6db0a5e4f7b7c532fd4f697f9bc8cb3163c6e61106d0d44da994b1c7b28 SHA512 1c86e60710e4def3d430372eed11bf1a27bf82e84c7b787c5a0be15229b6e5f786dbdf830a311423dd7539841de3076d370afc8b4c1b0cddd1bc379372dcdc95
diff --git a/dev-ada/langkit/files/langkit-2018-gentoo.patch b/dev-ada/langkit/files/langkit-2018-gentoo.patch
new file mode 100644
index 000000000000..aacca6092c1e
--- /dev/null
+++ b/dev-ada/langkit/files/langkit-2018-gentoo.patch
@@ -0,0 +1,21 @@
+--- a/langkit/templates/project_file.mako 2017-07-11 14:19:12.841221846 +0200
++++ b/langkit/templates/project_file.mako 2017-07-11 14:12:39.104981170 +0200
+@@ -111,6 +111,7 @@
+ -- ... and this prevents OOM on other platforms
+ end case;
+ end case;
++ for Driver ("C") use External ("GCC", "gcc");
+ end Compiler;
+
+ package Binder is
+--- a/langkit/compile_context.py 2018-07-04 19:17:08.329346507 +0200
++++ b/langkit/compile_context.py 2018-07-04 19:17:57.276615724 +0200
+@@ -1684,7 +1684,7 @@
+ generate_lexer
+ ):
+ quex_py_file = path.join(os.environ["QUEX_PATH"], "quex-exe.py")
+- subprocess.check_call([sys.executable, quex_py_file, "-i",
++ subprocess.check_call(["quex", "-i",
+ quex_file,
+ "-o", "quex_lexer",
+ "--buffer-element-size", "4",
diff --git a/dev-ada/langkit/langkit-2018.ebuild b/dev-ada/langkit/langkit-2018.ebuild
new file mode 100644
index 000000000000..9bb818cf2e8b
--- /dev/null
+++ b/dev-ada/langkit/langkit-2018.ebuild
@@ -0,0 +1,48 @@
+# 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
+
+MYP=${PN}-gpl-${PV}
+
+DESCRIPTION="A Python framework to generate language parsers"
+HOMEPAGE="https://www.adacore.com/community"
+SRC_URI="http://mirrors.cdn.adacore.com/art/5b0cfbefc7a4475263382c2a
+ -> ${MYP}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="${PYTHON_DEPS}
+ || (
+ dev-ada/gnatcoll[gnat_2017,iconv,shared]
+ dev-ada/gnatcoll-bindings[gnat_2018,iconv,shared]
+ )
+ dev-python/mako
+ dev-python/pyyaml
+ dev-python/enum34
+ dev-python/funcy
+ dev-python/docutils
+ dev-python/quex"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/${MYP}-src
+
+PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
+
+src_test() {
+ testsuite/testsuite.py | grep FAILED && die "Test failed"
+}
+
+src_install() {
+ default
+ python_domodule langkit
+ python_doscript scripts/create-project.py
+}