summaryrefslogtreecommitdiff
path: root/dev-ada/langkit
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-12-22 14:08:05 +0000
committerV3n3RiX <venerix@koprulu.sector>2021-12-22 14:08:05 +0000
commit93a93e9a3b53c1a73142a305ea1f8136846942ee (patch)
treeb9791a06ab3284e27b568412c59316c66240c682 /dev-ada/langkit
parent2771f79232c273bc2a57d23bf335dd81ccf6af28 (diff)
gentoo resync : 22.12.2021
Diffstat (limited to 'dev-ada/langkit')
-rw-r--r--dev-ada/langkit/Manifest4
-rw-r--r--dev-ada/langkit/files/langkit-22.0.0-gnarl.patch10
-rw-r--r--dev-ada/langkit/langkit-22.0.0-r2.ebuild85
-rw-r--r--dev-ada/langkit/metadata.xml21
4 files changed, 120 insertions, 0 deletions
diff --git a/dev-ada/langkit/Manifest b/dev-ada/langkit/Manifest
new file mode 100644
index 000000000000..401c6ae9522e
--- /dev/null
+++ b/dev-ada/langkit/Manifest
@@ -0,0 +1,4 @@
+AUX langkit-22.0.0-gnarl.patch 349 BLAKE2B f26ff18ef2176a9e5f277e510202c3d87f2e40d29054d78b0d531d22c769ed2c18319dc0198a3f79a048a9f26027710334d80957f635ed05427581245b4d4525 SHA512 9f979f63839fb56a0536bf045b859fadb917177e587debe23c2e142fc05d78b06114e6c93125633aa244ac8e4e8965ce66336eb71099890d063353954c2120d9
+DIST langkit-22.0.0.tar.gz 1008946 BLAKE2B 2b4ee37c9af1c95f9a6e9ad81f37b6bb112d5bd70f36b78e95d969580eacc1101b824ea24de39d04ccf8bc9f9850906fa1c660a29de05e90d12106b10792c37d SHA512 4c6207b650ae8352c65f3edda3192fc66c9b5d2c351665d78ca83b549960a0a41e7828e8974cb8daa3c415281b50253aa15a247407bcedc2c13e573aaa804909
+EBUILD langkit-22.0.0-r2.ebuild 2191 BLAKE2B dce7e7b59ee4227b247d146bcbf8bc113bf8eaece04f660dd6e99a656d8daf63c7dabefecbf9d0e61b30d8936f3f02303ed8c4edbac739c5ae8982751bd5b0a5 SHA512 8d90a2b168d72a868f398b4d5924bcb536f44ebc2873242d773ae574e8f8462a2da1e88707b833228b93d4dbd01968340544f412ad7afb3c08d7f3deaf3ccf41
+MISC metadata.xml 849 BLAKE2B 3d15fb84d68db223622feaffb842e571591ec11e1ac4931d0baecc10b8c58e065283e56bac2be2297c5cd79fb04560ddfafb43fda6bb07b8b738d3c32786e4f5 SHA512 956aaa0b8446a30d6808a066716cf9572d44da813530eb3e5fe28b181b3579b3056b3429856146dae0ca8fb8e4787ee2b83d2d4ce2df9a06d3e835620289bb76
diff --git a/dev-ada/langkit/files/langkit-22.0.0-gnarl.patch b/dev-ada/langkit/files/langkit-22.0.0-gnarl.patch
new file mode 100644
index 000000000000..fb69768dc9de
--- /dev/null
+++ b/dev-ada/langkit/files/langkit-22.0.0-gnarl.patch
@@ -0,0 +1,10 @@
+--- a/langkit/templates/mains_project_file.mako 2020-06-09 09:34:36.677265457 +0200
++++ b/langkit/templates/mains_project_file.mako 2020-06-09 09:35:30.569451995 +0200
+@@ -40,4 +40,7 @@
+ for Switches ("ada") use ("-E");
+ end Binder;
+
++ package Linker is
++ for Switches ("ada") use ("-lgnat", "-lgnarl");
++ end Linker;
+ end Mains;
diff --git a/dev-ada/langkit/langkit-22.0.0-r2.ebuild b/dev-ada/langkit/langkit-22.0.0-r2.ebuild
new file mode 100644
index 000000000000..4e998a1d09a8
--- /dev/null
+++ b/dev-ada/langkit/langkit-22.0.0-r2.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8,9} )
+
+DISTUTILS_USE_SETUPTOOLS=no
+inherit distutils-r1 multiprocessing
+
+DESCRIPTION="A Python framework to generate language parsers"
+HOMEPAGE="https://www.adacore.com/community"
+SRC_URI="https://github.com/AdaCore/${PN}/archive/refs/tags/v${PV}.tar.gz
+ -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0/${PV}"
+KEYWORDS="~amd64"
+IUSE="+shared static-libs static-pic"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+ || ( shared static-libs static-pic )"
+
+RDEPEND="${PYTHON_DEPS}
+ dev-ada/gnatcoll-bindings[gmp,iconv,shared?,static-libs?,static-pic?]
+ dev-python/mako[${PYTHON_USEDEP}]
+ dev-python/pyyaml[${PYTHON_USEDEP}]
+ dev-python/funcy[${PYTHON_USEDEP}]
+ dev-python/docutils[${PYTHON_USEDEP}]
+ dev-ada/e3-core[${PYTHON_USEDEP}]"
+BDEPEND="${RDEPEND}"
+
+python_prepare_all() {
+ distutils-r1_python_prepare_all
+ cd testsuite/tests
+
+ # missing gprbuild option to build libraries static/relocatable
+ rm -r {langkit_support,adalog,misc/link_two_libs} || die
+
+ # require railroad-diagrams
+ rm -r contrib/svg_railroad_diagrams || die
+}
+
+python_compile_all() {
+ build () {
+ gprbuild -j$(makeopts_jobs) -p -v \
+ -XLIBRARY_TYPE=$1 -P support/langkit_support.gpr -XBUILD_MODE=dev \
+ -cargs:Ada ${ADAFLAGS} -cargs:C ${CFLAGS} || die "gprbuild failed"
+ }
+ if use shared; then
+ build relocatable
+ fi
+ if use static-libs; then
+ build static
+ fi
+ if use static-pic; then
+ build static-pic
+ fi
+}
+
+python_test_all() {
+ export GPR_PROJECT_PATH="${S}"/support
+ ${EPYTHON} ./manage.py make --no-langkit-support || die
+ eval $(./manage.py setenv)
+ ${EPYTHON} ./manage.py test --verbose |& tee langkit.testOut
+ grep -qw FAIL langkit.testOut && die
+}
+
+python_install_all() {
+ build () {
+ gprinstall -v -P support/langkit_support.gpr -p -XBUILD_MODE=dev \
+ --prefix="${D}"/usr --build-var=LIBRARY_TYPE \
+ --build-var=LANGKIT_SUPPORT_LIBRARY_TYPE \
+ --sources-subdir=include/langkit_support \
+ -XLIBRARY_TYPE=$1 --build-name=$1 || die
+ }
+ if use shared; then
+ build relocatable
+ fi
+ if use static-libs; then
+ build static
+ fi
+ if use static-pic; then
+ build static-pic
+ fi
+}
diff --git a/dev-ada/langkit/metadata.xml b/dev-ada/langkit/metadata.xml
new file mode 100644
index 000000000000..09df5e8fc04c
--- /dev/null
+++ b/dev-ada/langkit/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>ada@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="shared">Build shared library</flag>
+ <flag name="static-pic">Build static library with pic code</flag>
+ </use>
+ <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>