summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTupone Alfredo <tupone@gentoo.org>2017-12-23 21:32:49 +0100
committerTupone Alfredo <tupone@gentoo.org>2017-12-23 21:32:49 +0100
commitdf124d65f1c4eb996e4bff76d9b22f60d49a275f (patch)
tree3b9c8f3d90896fbd8deff2a92a735aa0091e7d24 /dev-ada/langkit
parentdev-lang/ruby: stable 2.2.9 for ia64, bug #641090 (diff)
downloadgentoo-df124d65f1c4eb996e4bff76d9b22f60d49a275f.tar.gz
gentoo-df124d65f1c4eb996e4bff76d9b22f60d49a275f.tar.bz2
gentoo-df124d65f1c4eb996e4bff76d9b22f60d49a275f.zip
dev-ada/langkit: Add dev-ada/langkit
Package-Manager: Portage-2.3.13, Repoman-2.3.3
Diffstat (limited to 'dev-ada/langkit')
-rw-r--r--dev-ada/langkit/Manifest1
-rw-r--r--dev-ada/langkit/files/langkit-2017-gentoo.patch36
-rw-r--r--dev-ada/langkit/langkit-2017.ebuild45
-rw-r--r--dev-ada/langkit/metadata.xml18
4 files changed, 100 insertions, 0 deletions
diff --git a/dev-ada/langkit/Manifest b/dev-ada/langkit/Manifest
new file mode 100644
index 00000000000..e7ad949e03c
--- /dev/null
+++ b/dev-ada/langkit/Manifest
@@ -0,0 +1 @@
+DIST langkit-gps-src-2017.tar.gz 364589 BLAKE2B 14d80e904ded20a73d65a5828157ea82672559b5bb47e465381989ad3a6e90f41bd0c6db0a5e4f7b7c532fd4f697f9bc8cb3163c6e61106d0d44da994b1c7b28 SHA512 1c86e60710e4def3d430372eed11bf1a27bf82e84c7b787c5a0be15229b6e5f786dbdf830a311423dd7539841de3076d370afc8b4c1b0cddd1bc379372dcdc95
diff --git a/dev-ada/langkit/files/langkit-2017-gentoo.patch b/dev-ada/langkit/files/langkit-2017-gentoo.patch
new file mode 100644
index 00000000000..0260d44c888
--- /dev/null
+++ b/dev-ada/langkit/files/langkit-2017-gentoo.patch
@@ -0,0 +1,36 @@
+--- langkit-gps-src/langkit/templates/project_file.mako.old 2017-07-11 14:19:12.841221846 +0200
++++ langkit-gps-src/langkit/templates/project_file.mako 2017-07-11 14:12:39.104981170 +0200
+@@ -82,9 +82,11 @@
+ for Default_Switches ("Ada") use
+ Common_Ada_Cargs & ("-g", "-O0", "-gnatwe", "-gnata");
+
+- for Default_Switches ("C") use Common_C_Cargs & ("-g3", "-O0");
++ for Default_Switches ("C") use Common_C_Cargs &
++ ("-g3", "-O0", "-fPIC");
+
+- for Switches ("quex_lexer.c") use Common_C_Cargs & ("-g0", "-O0");
++ for Switches ("quex_lexer.c") use Common_C_Cargs &
++ ("-g0", "-O0", "-fPIC");
+ -- This file is *huge* and the debugging information for it harms
+ -- Valgrind runs. We almost never have to debug this file so
+ -- this is acceptable.
+@@ -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
+--- langkit-gps-src/langkit/compile_context.py.old 2017-12-13 22:12:38.689143125 +0100
++++ langkit-gps-src/langkit/compile_context.py 2017-12-13 22:13:02.446737994 +0100
+@@ -1171,8 +1171,7 @@
+ # the Quex specification changed from last build.
+ if generate_lexer and self.cache.is_stale('quex_specification',
+ quex_spec):
+- 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-2017.ebuild b/dev-ada/langkit/langkit-2017.ebuild
new file mode 100644
index 00000000000..1d2558ae90d
--- /dev/null
+++ b/dev-ada/langkit/langkit-2017.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-single-r1
+
+MYPN=${PN}-gps-src
+
+DESCRIPTION="A Python framework to generate language parsers"
+HOMEPAGE="https://www.adacore.com/community"
+SRC_URI="http://mirrors.cdn.adacore.com/art/591c45e2c7a447af2deed044
+ -> ${MYPN}-${PV}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="${PYTHON_DEPS}
+ dev-ada/gnatcoll[gnat_2017,iconv]
+ dev-python/mako
+ dev-python/pyyaml
+ dev-python/enum34
+ dev-python/funcy
+ dev-python/docutils
+ dev-python/quex"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}"/${MYPN}
+
+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
+}
diff --git a/dev-ada/langkit/metadata.xml b/dev-ada/langkit/metadata.xml
new file mode 100644
index 00000000000..bfb9cb6484b
--- /dev/null
+++ b/dev-ada/langkit/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>tupone@gentoo.org</email>
+ <name>Tupone Alfredo</name>
+ </maintainer>
+ <longdescription lang="en">
+ Langkit (nickname for language kit) is a tool whose purpose is to make
+ it easy to create syntactic and semantic analysis engines. Write a
+ language specification in our Python DSL and Langkit will generate for
+ you an Ada library with bindings for the C and Python programming
+ languages.
+ The generated library is meant to provide a basis to write tooling,
+ including tools working on potentially changing and incorrect code,
+ such as IDEs.
+ </longdescription>
+</pkgmetadata>