summaryrefslogtreecommitdiff
path: root/dev-ada/langkit
diff options
context:
space:
mode:
Diffstat (limited to 'dev-ada/langkit')
-rw-r--r--dev-ada/langkit/Manifest7
-rw-r--r--dev-ada/langkit/files/langkit-2017-gentoo.patch80
-rw-r--r--dev-ada/langkit/files/langkit-2018-gentoo.patch21
-rw-r--r--dev-ada/langkit/langkit-2017.ebuild45
-rw-r--r--dev-ada/langkit/langkit-2018.ebuild48
-rw-r--r--dev-ada/langkit/metadata.xml18
6 files changed, 219 insertions, 0 deletions
diff --git a/dev-ada/langkit/Manifest b/dev-ada/langkit/Manifest
new file mode 100644
index 000000000000..8d97f9122ce1
--- /dev/null
+++ b/dev-ada/langkit/Manifest
@@ -0,0 +1,7 @@
+AUX langkit-2017-gentoo.patch 4182 BLAKE2B 5f0a275837a80ac41e231c807eb54a620d49311b3539b995951ce30be3de6cbf1d00c7909f5ac3186b4e06892416f8a4274b75f1de10af123824f4eede466c57 SHA512 53530378e4e04d940656244f42161abc0aae9a5fc54b0ddd12c153faef0fd4a8d3f67e27742f6a2e27496a705a8dafe9288d1c7c066a43fe0e8e7c0a0886c21d
+AUX langkit-2018-gentoo.patch 948 BLAKE2B d34afd89907fef17207e5de6b4de61e5dc5ba33ef84c12d16b6c5f2c3ef31ad27a1474e251aebf87eca0bbad7c4b537f6458bf271d368d7f0c241dadfa526dd1 SHA512 41a3cb91d867f7ec33570082727167bf7c8c4514fd9a254c4adc515bd838c374530b5e24820a58cabfa1e3cf5ba713e261fe8e3f196fda7e7bc1b6839b0bb814
+DIST langkit-gpl-2018.tar.gz 565649 BLAKE2B e18beea565351eb4b10baa9168db742598817d231c5eab578b17c2b0409ac77b9972f8f426499e086779eaeda0ac1ba11e5cb3b47ecab8e63674b7ef654b26b7 SHA512 62a8820c3fd3d44f6cd22e181f6eddcf52945c93ea5eb793a63b7f13e71705807170b0cc4c3873b127e3fafe751a5dd27da54087986f506f8500b916ef1f078f
+DIST langkit-gps-src-2017.tar.gz 364589 BLAKE2B 14d80e904ded20a73d65a5828157ea82672559b5bb47e465381989ad3a6e90f41bd0c6db0a5e4f7b7c532fd4f697f9bc8cb3163c6e61106d0d44da994b1c7b28 SHA512 1c86e60710e4def3d430372eed11bf1a27bf82e84c7b787c5a0be15229b6e5f786dbdf830a311423dd7539841de3076d370afc8b4c1b0cddd1bc379372dcdc95
+EBUILD langkit-2017.ebuild 924 BLAKE2B 4fde947ea5db44e0e806162a7283bacd4d105d58bd20fcbb68952df7690e5f86c4dd6d998845a977f09808455bdbb29c572649e78addfb41bfe3fb9306ec283c SHA512 3430bc646265ccacc3178ba3f459613e3b0a0f4493b4238a97598158a4dbf7aa81ac5a60e40da380f86a075ce8119fe28770a438273133cef4ca3caa1626348d
+EBUILD langkit-2018.ebuild 985 BLAKE2B 2b4bc94e8e20f93ba4b98e345bcf07b717d3f07075a447bb69d6ae586cff4a1ed7d0dfd2f61aa6636cc6212aa335f17a7ed8301b52d98e6fe133219292225a73 SHA512 e499e41572d61a668707710824865ba431d8e6ef576668c8d31895334014996fd98adde25baa7d0017087102b1eadd8c0b768aab18ace9fa5192838635d4c3e6
+MISC metadata.xml 748 BLAKE2B 29a7b386b6d8d1b2f2bc8fc16739c28129b7886c8cdae6784d54bfaadea87502a5338ed6113f536e7c5701cefb42d5912f6189dccb55ddd704445ae65f5c4176 SHA512 8a3183336e00f01eeb51a5b7d06833599b408801b71713575d83131d39b82c8c74fda8ce133b352dc356135721ef19ca488ef17723172579cd1507d4c1d7c809
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 000000000000..ecb7ce6e74dd
--- /dev/null
+++ b/dev-ada/langkit/files/langkit-2017-gentoo.patch
@@ -0,0 +1,80 @@
+--- 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",
+--- langkit-gps-src/langkit/templates/pkg_analysis_body_ada.mako.old 2017-12-26 20:47:28.461617512 +0100
++++ langkit-gps-src/langkit/templates/pkg_analysis_body_ada.mako 2017-12-26 20:47:58.912060490 +0100
+@@ -2196,7 +2196,7 @@
+ -- printing them.
+
+ function Hash (S : Lexical_Env) return Hash_Type is
+- (Hash_Type (To_Integer (S.all'Address)));
++ (Hash_Type'Mod (To_Integer (S.all'Address)));
+
+ package Address_To_Id_Maps is new Ada.Containers.Hashed_Maps
+ (Lexical_Env, Integer, Hash, "=");
+--- a/testsuite/testsuite_support/__init__.py.old 2018-05-02 21:40:04.977442020 +0200
++++ b/testsuite/testsuite_support/__init__.py 2018-05-02 21:40:45.422759387 +0200
+@@ -68,6 +68,7 @@
+ # to build it in parallel.
+ if not self.global_env['options'].disable_tear_up_builds:
+- p = Run(['gprbuild', '-p', '-f', '-P',
++ p = Run(['gprbuild', '-p', '-f', '-XLIBRARY_TYPE=relocatable',
++ '-XXMLADA_BUILD=relocatable', '-P',
+ os.path.join(self.root_dir, '..', 'langkit', 'support',
+ 'langkit_support.gpr')], output=PIPE)
+ report(p, "Langkit support")
+--- a/testsuite/testsuite_support/langkit_support_driver.py.old 2018-05-03 08:01:20.019944992 +0200
++++ b/testsuite/testsuite_support/langkit_support_driver.py 2018-05-03 08:02:50.146430288 +0200
+@@ -36,5 +36,7 @@
+ ))
+
+ self.run_and_check(['gprbuild', '-p', '-P', 'p.gpr', '-gnata',
++ '-XLIBRARY_TYPE=relocatable',
++ '-XXMLADA_BUILD=relocatable',
+ '-cargs', '-O0', '-g'])
+ self.run_and_check(['./{}'.format(source[:-4])])
++++ a/testsuite/testsuite_support/adalog_driver.py.old 2018-05-03 08:14:30.998698722 +0200
+--- b/testsuite/testsuite_support/adalog_driver.py 2018-05-03 08:16:48.275417176 +0200
+@@ -41,6 +41,8 @@
+ )
+ ))
+
+- self.run_and_check(['gprbuild', '-p', '-P', 'p.gpr', '-cargs', '-O0',
++ self.run_and_check(['gprbuild', '-p', '-XLIBRARY_TYPE=relocatable',
++ '-XXMLADA_BUILD=relocatable',
++ '-P', 'p.gpr', '-cargs', '-O0',
+ '-g'])
+ self.run_and_check(['./{}'.format(source[:-4])])
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-2017.ebuild b/dev-ada/langkit/langkit-2017.ebuild
new file mode 100644
index 000000000000..df6770a0d6bc
--- /dev/null
+++ b/dev-ada/langkit/langkit-2017.ebuild
@@ -0,0 +1,45 @@
+# 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
+
+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 x86"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+DEPEND="${PYTHON_DEPS}
+ dev-ada/gnatcoll[gnat_2017,iconv,shared]
+ 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/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
+}
diff --git a/dev-ada/langkit/metadata.xml b/dev-ada/langkit/metadata.xml
new file mode 100644
index 000000000000..bfb9cb6484b2
--- /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>