* [gentoo-commits] repo/gentoo:master commit in: dev-ada/langkit/files/, dev-ada/langkit/
@ 2020-03-26 19:50 Alfredo Tupone
0 siblings, 0 replies; 5+ messages in thread
From: Alfredo Tupone @ 2020-03-26 19:50 UTC (permalink / raw
To: gentoo-commits
commit: 9581a0b568efbe0f22efde7bf54d66024e159ebc
Author: Tupone Alfredo <tupone <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 26 19:50:28 2020 +0000
Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Thu Mar 26 19:50:28 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9581a0b5
dev-ada/langkit: fix usage of pyyaml
Closes: https://bugs.gentoo.org/713340
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>
dev-ada/langkit/files/langkit-2019-pyyaml.patch | 11 +++++++++++
dev-ada/langkit/langkit-2018.ebuild | 8 +++++---
dev-ada/langkit/langkit-2019.ebuild | 9 ++++++---
3 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/dev-ada/langkit/files/langkit-2019-pyyaml.patch b/dev-ada/langkit/files/langkit-2019-pyyaml.patch
new file mode 100644
index 00000000000..58a64992a7c
--- /dev/null
+++ b/dev-ada/langkit/files/langkit-2019-pyyaml.patch
@@ -0,0 +1,11 @@
+--- a/testsuite/testsuite_support/polyfill.py 2020-03-26 20:43:40.861154768 +0100
++++ b/testsuite/testsuite_support/polyfill.py 2020-03-26 20:44:07.874675123 +0100
+@@ -376,7 +376,7 @@
+ # First load data provided by this testcase
+ try:
+ with open(os.path.join(test_dir, 'test.yaml'), 'r') as f:
+- test_data = yaml.load(f)
++ test_data = yaml.safe_load(f)
+ except (IOError, yaml.error.YAMLError) as exc:
+ status = 'PROBLEM'
+ message = 'Invalid test.yaml: {}'.format(exc)
diff --git a/dev-ada/langkit/langkit-2018.ebuild b/dev-ada/langkit/langkit-2018.ebuild
index 348ef449845..743c42e819d 100644
--- a/dev-ada/langkit/langkit-2018.ebuild
+++ b/dev-ada/langkit/langkit-2018.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -24,7 +24,6 @@ DEPEND="${PYTHON_DEPS}
dev-ada/gnatcoll-bindings[iconv,shared]
dev-python/mako
dev-python/pyyaml
- <dev-python/pyyaml-5
dev-python/enum34
dev-python/funcy
dev-python/docutils
@@ -33,7 +32,10 @@ RDEPEND="${DEPEND}"
S="${WORKDIR}"/${MYP}-src
-PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
+PATCHES=(
+ "${FILESDIR}"/${P}-gentoo.patch
+ "${FILESDIR}"/${PN}-2019-pyyaml.patch
+)
src_test() {
testsuite/testsuite.py -j $(makeopts_jobs) --show-error-output | tee testsuite.log
diff --git a/dev-ada/langkit/langkit-2019.ebuild b/dev-ada/langkit/langkit-2019.ebuild
index 229fdd526dc..31a57f6edd4 100644
--- a/dev-ada/langkit/langkit-2019.ebuild
+++ b/dev-ada/langkit/langkit-2019.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -24,7 +24,7 @@ REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="${PYTHON_DEPS}
dev-ada/gnatcoll-bindings[iconv,shared]
dev-python/mako
- <dev-python/pyyaml-5
+ dev-python/pyyaml
dev-python/enum34
dev-python/funcy
dev-python/docutils"
@@ -34,7 +34,10 @@ DEPEND="${RDEPEND}
S="${WORKDIR}"/${MYP}-src
-PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
+PATCHES=(
+ "${FILESDIR}"/${P}-gentoo.patch
+ "${FILESDIR}"/${P}-pyyaml.patch
+)
src_test() {
testsuite/testsuite.py -j $(makeopts_jobs) --show-error-output | tee testsuite.log
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-ada/langkit/files/, dev-ada/langkit/
@ 2020-06-09 11:34 Alfredo Tupone
0 siblings, 0 replies; 5+ messages in thread
From: Alfredo Tupone @ 2020-06-09 11:34 UTC (permalink / raw
To: gentoo-commits
commit: 2920b98113125ea46feabcba8e2360be107b0d6c
Author: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 9 11:34:03 2020 +0000
Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Tue Jun 9 11:34:40 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2920b981
dev-ada/langkit: add -lgnarl & -lgnat for incoming gprbuild
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>
dev-ada/langkit/files/langkit-2019-gnarl.patch | 10 +++++
dev-ada/langkit/langkit-2019-r1.ebuild | 52 ++++++++++++++++++++++++++
2 files changed, 62 insertions(+)
diff --git a/dev-ada/langkit/files/langkit-2019-gnarl.patch b/dev-ada/langkit/files/langkit-2019-gnarl.patch
new file mode 100644
index 00000000000..fb69768dc9d
--- /dev/null
+++ b/dev-ada/langkit/files/langkit-2019-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-2019-r1.ebuild b/dev-ada/langkit/langkit-2019-r1.ebuild
new file mode 100644
index 00000000000..1f7676ec30e
--- /dev/null
+++ b/dev-ada/langkit/langkit-2019-r1.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit python-single-r1 multiprocessing
+
+MYP=${P}-20190510-19B8C
+
+DESCRIPTION="A Python framework to generate language parsers"
+HOMEPAGE="https://www.adacore.com/community"
+SRC_URI="http://mirrors.cdn.adacore.com/art/5cdf8f8a31e87a8f1c967d31
+ -> ${MYP}-src.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ dev-ada/gnatcoll-bindings[iconv,shared]
+ dev-python/mako
+ dev-python/pyyaml
+ dev-python/enum34
+ dev-python/funcy
+ dev-python/docutils"
+
+DEPEND="${RDEPEND}
+ test? ( dev-ada/gnatcoll-bindings[gmp] )"
+
+S="${WORKDIR}"/${MYP}-src
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gentoo.patch
+ "${FILESDIR}"/${P}-pyyaml.patch
+ "${FILESDIR}"/${P}-gnarl.patch
+)
+
+src_test() {
+ testsuite/testsuite.py -j $(makeopts_jobs) --show-error-output | tee testsuite.log
+ grep -q FAILED testsuite.log && die "Test failed"
+}
+
+src_install() {
+ default
+ python_domodule langkit
+ python_doscript scripts/create-project.py
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-ada/langkit/files/, dev-ada/langkit/
@ 2021-12-06 12:54 Alfredo Tupone
0 siblings, 0 replies; 5+ messages in thread
From: Alfredo Tupone @ 2021-12-06 12:54 UTC (permalink / raw
To: gentoo-commits
commit: 3280155e870e24fcf0027fd6961f42f422a22dfb
Author: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Mon Dec 6 12:53:25 2021 +0000
Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Mon Dec 6 12:53:25 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3280155e
dev-ada/langkit: A Python framework to generate language parsers
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>
dev-ada/langkit/Manifest | 1 +
dev-ada/langkit/files/langkit-22.0.0-gnarl.patch | 10 +++++
dev-ada/langkit/langkit-22.0.0.ebuild | 50 ++++++++++++++++++++++++
dev-ada/langkit/metadata.xml | 17 ++++++++
4 files changed, 78 insertions(+)
diff --git a/dev-ada/langkit/Manifest b/dev-ada/langkit/Manifest
new file mode 100644
index 000000000000..ea7b6a9fbab0
--- /dev/null
+++ b/dev-ada/langkit/Manifest
@@ -0,0 +1 @@
+DIST langkit-22.0.0.tar.gz 1008946 BLAKE2B 2b4ee37c9af1c95f9a6e9ad81f37b6bb112d5bd70f36b78e95d969580eacc1101b824ea24de39d04ccf8bc9f9850906fa1c660a29de05e90d12106b10792c37d SHA512 4c6207b650ae8352c65f3edda3192fc66c9b5d2c351665d78ca83b549960a0a41e7828e8974cb8daa3c415281b50253aa15a247407bcedc2c13e573aaa804909
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.ebuild b/dev-ada/langkit/langkit-22.0.0.ebuild
new file mode 100644
index 000000000000..2fe1c770f737
--- /dev/null
+++ b/dev-ada/langkit/langkit-22.0.0.ebuild
@@ -0,0 +1,50 @@
+# 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"
+KEYWORDS="~amd64"
+RESTRICT="test"
+
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ dev-ada/gnatcoll-bindings[iconv,shared]
+ 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}]"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gnarl.patch
+)
+
+src_compile() {
+ gprbuild -v -P support/langkit_support.gpr -p -j$(makeopts_jobs) \
+ -XBUILD_MODE=dev -XLIBRARY_TYPE=relocatable -cargs:Ada ${ADAFLAGS} \
+ || die
+ distutils-r1_src_compile
+}
+
+src_install() {
+ 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=relocatable --build-name=relocatable || die
+ distutils-r1_src_install
+}
diff --git a/dev-ada/langkit/metadata.xml b/dev-ada/langkit/metadata.xml
new file mode 100644
index 000000000000..1d15b41d3ff8
--- /dev/null
+++ b/dev-ada/langkit/metadata.xml
@@ -0,0 +1,17 @@
+<?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>
+ <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>
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-ada/langkit/files/, dev-ada/langkit/
@ 2021-12-08 16:36 Alfredo Tupone
0 siblings, 0 replies; 5+ messages in thread
From: Alfredo Tupone @ 2021-12-08 16:36 UTC (permalink / raw
To: gentoo-commits
commit: 9536c484d34ac3db9c18732b7127849dad4c1339
Author: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 8 16:35:50 2021 +0000
Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Wed Dec 8 16:36:21 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9536c484
dev-ada/langkit: add tests
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>
dev-ada/langkit/files/langkit-22.0.0-test.patch | 20 ++++++++++++++++++++
...gkit-22.0.0.ebuild => langkit-22.0.0-r1.ebuild} | 22 ++++++++++++++++++++--
2 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/dev-ada/langkit/files/langkit-22.0.0-test.patch b/dev-ada/langkit/files/langkit-22.0.0-test.patch
new file mode 100644
index 000000000000..b083e60f680d
--- /dev/null
+++ b/dev-ada/langkit/files/langkit-22.0.0-test.patch
@@ -0,0 +1,20 @@
+--- a/testsuite/python_support/utils.py 2021-12-08 14:12:47.457472580 +0100
++++ b/testsuite/python_support/utils.py 2021-12-08 14:14:26.142767154 +0100
+@@ -379,6 +379,7 @@
+ ))
+ run('gprbuild', '-Pgen', '-q', '-p',
+ '-XLIBRARY_TYPE=static',
++ '-XGNATCOLL_GMP_BUILD=static',
+ '-XXMLADA_BUILD=static')
+
+ for i, m in enumerate(ada_main):
+--- a/langkit/libmanage.py 2021-12-08 15:13:07.952581993 +0100
++++ b/langkit/libmanage.py 2021-12-08 15:13:58.429825946 +0100
+@@ -897,6 +897,7 @@
+ result = ['-XBUILD_MODE={}'.format(self.build_mode),
+ '-XLIBRARY_TYPE={}'.format(library_type),
+ '-XGPR_BUILD={}'.format(library_type),
++ '-XGNATCOLL_GMP_BUILD={}'.format(library_type),
+ '-XXMLADA_BUILD={}'.format(library_type)]
+
+ if self.enable_build_warnings:
diff --git a/dev-ada/langkit/langkit-22.0.0.ebuild b/dev-ada/langkit/langkit-22.0.0-r1.ebuild
similarity index 70%
rename from dev-ada/langkit/langkit-22.0.0.ebuild
rename to dev-ada/langkit/langkit-22.0.0-r1.ebuild
index 2fe1c770f737..398c3148071d 100644
--- a/dev-ada/langkit/langkit-22.0.0.ebuild
+++ b/dev-ada/langkit/langkit-22.0.0-r1.ebuild
@@ -16,12 +16,11 @@ SRC_URI="https://github.com/AdaCore/${PN}/archive/refs/tags/v${PV}.tar.gz
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
-RESTRICT="test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RDEPEND="${PYTHON_DEPS}
- dev-ada/gnatcoll-bindings[iconv,shared]
+ dev-ada/gnatcoll-bindings[iconv,shared,static-libs]
dev-python/mako[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]
dev-python/funcy[${PYTHON_USEDEP}]
@@ -31,8 +30,20 @@ DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}"/${P}-gnarl.patch
+ "${FILESDIR}"/${P}-test.patch
)
+src_prepare() {
+ default
+ 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
+}
+
src_compile() {
gprbuild -v -P support/langkit_support.gpr -p -j$(makeopts_jobs) \
-XBUILD_MODE=dev -XLIBRARY_TYPE=relocatable -cargs:Ada ${ADAFLAGS} \
@@ -40,6 +51,13 @@ src_compile() {
distutils-r1_src_compile
}
+src_test() {
+ ${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
+}
+
src_install() {
gprinstall -v -P support/langkit_support.gpr -p -XBUILD_MODE=dev \
--prefix="${D}"/usr --build-var=LIBRARY_TYPE \
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-ada/langkit/files/, dev-ada/langkit/
@ 2022-12-10 18:21 Alfredo Tupone
0 siblings, 0 replies; 5+ messages in thread
From: Alfredo Tupone @ 2022-12-10 18:21 UTC (permalink / raw
To: gentoo-commits
commit: 64d6a14dc5039a9de9d494473511120bf43b7e85
Author: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 10 18:18:59 2022 +0000
Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Sat Dec 10 18:21:05 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64d6a14d
dev-ada/langkit: add 23.0.0
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>
dev-ada/langkit/Manifest | 1 +
dev-ada/langkit/files/langkit-23.0.0-gentoo.patch | 10 +++
dev-ada/langkit/langkit-23.0.0.ebuild | 104 ++++++++++++++++++++++
3 files changed, 115 insertions(+)
diff --git a/dev-ada/langkit/Manifest b/dev-ada/langkit/Manifest
index ea7b6a9fbab0..59b6bdba50b4 100644
--- a/dev-ada/langkit/Manifest
+++ b/dev-ada/langkit/Manifest
@@ -1 +1,2 @@
DIST langkit-22.0.0.tar.gz 1008946 BLAKE2B 2b4ee37c9af1c95f9a6e9ad81f37b6bb112d5bd70f36b78e95d969580eacc1101b824ea24de39d04ccf8bc9f9850906fa1c660a29de05e90d12106b10792c37d SHA512 4c6207b650ae8352c65f3edda3192fc66c9b5d2c351665d78ca83b549960a0a41e7828e8974cb8daa3c415281b50253aa15a247407bcedc2c13e573aaa804909
+DIST langkit-23.0.0.tar.gz 1178557 BLAKE2B c3b81cafea3afcfd90a87192dca5abd0f19c5ff4e195515dd7c4df70824bf328c24855a6761264b89bf44a56afc8dd77b78fbf322c6f92299082507aa65d61e5 SHA512 6cc6adacb157a47ebc8da46591e45a4ff212fba2cd5ac80c12adb2e84f4508735d98dc68ffce86aa5e5e8d873e6f51efb4f88f4d76a190b9eb0024bf69deefc1
diff --git a/dev-ada/langkit/files/langkit-23.0.0-gentoo.patch b/dev-ada/langkit/files/langkit-23.0.0-gentoo.patch
new file mode 100644
index 000000000000..cbae758013e2
--- /dev/null
+++ b/dev-ada/langkit/files/langkit-23.0.0-gentoo.patch
@@ -0,0 +1,10 @@
+--- a/langkit/parsers.py 2022-12-08 23:09:42.178267815 +0100
++++ b/langkit/parsers.py 2022-12-08 22:33:40.755660102 +0100
+@@ -1306,6 +1306,7 @@
+ # ... and we want to memoize the result.
+ self.cached_type = None
+
++ @property
+ def can_parse_token_node(self) -> bool:
+ return all(p.can_parse_token_node for p in self.parsers)
+
diff --git a/dev-ada/langkit/langkit-23.0.0.ebuild b/dev-ada/langkit/langkit-23.0.0.ebuild
new file mode 100644
index 000000000000..d384194e8cee
--- /dev/null
+++ b/dev-ada/langkit/langkit-23.0.0.ebuild
@@ -0,0 +1,104 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+ADA_COMPAT=( gnat_2021 gcc_12_2_0 )
+
+DISTUTILS_USE_SETUPTOOLS=no
+inherit distutils-r1 ada 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="Apache-2.0"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="+shared static-libs static-pic"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+ ${ADA_REQUIRED_USE}
+ || ( shared static-libs static-pic )"
+
+RDEPEND="${PYTHON_DEPS}
+ ${ADA_DEPS}
+ dev-ada/gnatcoll-bindings[${ADA_USEDEP},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-python/mypy[${PYTHON_USEDEP}]
+ dev-python/types-gdb[${PYTHON_USEDEP}]
+ dev-python/types-docutils[${PYTHON_USEDEP}]
+ dev-ada/e3-core[${PYTHON_USEDEP}]"
+BDEPEND="${RDEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )
+
+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
+ rm -r misc/standalone || die
+
+ # other failures
+ rm -r misc/docstrings_lkt_roles || die
+}
+
+python_compile_all() {
+ build () {
+ rm -f langkit/support/obj/dev/*lexch
+ gprbuild -j$(makeopts_jobs) -p -v \
+ -XLIBRARY_TYPE=$1 -P langkit/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
+ gprbuild -j$(makeopts_jobs) -p -v \
+ -P sigsegv_handler/langkit_sigsegv_handler.gpr -XBUILD_MODE=dev \
+ -cargs:Ada ${ADAFLAGS} -cargs:C ${CFLAGS} || die "gprbuild failed"
+}
+
+python_test_all() {
+ export GPR_PROJECT_PATH="${S}"/langkit/support
+ ${EPYTHON} ./manage.py make --no-langkit-support || die
+ eval $(./manage.py setenv)
+ ${EPYTHON} ./manage.py test -v \
+ --disable-ocaml \
+ --disable-gdb \
+ --disable-tear-up-builds \
+ --restricted-env \
+ --jobs $(makeopts_jobs) \
+ |& tee langkit.testOut
+ grep -qw FAIL langkit.testOut && die
+}
+
+python_install_all() {
+ build () {
+ gprinstall -v -P langkit/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 static-libs; then
+ build static
+ fi
+ if use static-pic; then
+ build static-pic
+ fi
+ if use shared; then
+ build relocatable
+ fi
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-12-10 18:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-06 12:54 [gentoo-commits] repo/gentoo:master commit in: dev-ada/langkit/files/, dev-ada/langkit/ Alfredo Tupone
-- strict thread matches above, loose matches on Subject: below --
2022-12-10 18:21 Alfredo Tupone
2021-12-08 16:36 Alfredo Tupone
2020-06-09 11:34 Alfredo Tupone
2020-03-26 19:50 Alfredo Tupone
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox