summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2024-03-15 21:51:59 +0100
committerAlfredo Tupone <tupone@gentoo.org>2024-03-15 21:52:33 +0100
commitbb090ee89faf8a9e25f7376906bfea9b84eaa5a6 (patch)
treebad548a8db4b9197895c5410f75d72df3c41e5d1 /dev-ada
parentdev-ada/AdaSAT: keyword 24.0.0 for ~x86 (diff)
downloadgentoo-bb090ee89faf8a9e25f7376906bfea9b84eaa5a6.tar.gz
gentoo-bb090ee89faf8a9e25f7376906bfea9b84eaa5a6.tar.bz2
gentoo-bb090ee89faf8a9e25f7376906bfea9b84eaa5a6.zip
dev-ada/langkit: add 24.0.0
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'dev-ada')
-rw-r--r--dev-ada/langkit/Manifest1
-rw-r--r--dev-ada/langkit/langkit-24.0.0.ebuild107
2 files changed, 108 insertions, 0 deletions
diff --git a/dev-ada/langkit/Manifest b/dev-ada/langkit/Manifest
index 9a010d224369..e1505522fde0 100644
--- a/dev-ada/langkit/Manifest
+++ b/dev-ada/langkit/Manifest
@@ -1 +1,2 @@
DIST langkit-23.0.0.tar.gz 1178557 BLAKE2B c3b81cafea3afcfd90a87192dca5abd0f19c5ff4e195515dd7c4df70824bf328c24855a6761264b89bf44a56afc8dd77b78fbf322c6f92299082507aa65d61e5 SHA512 6cc6adacb157a47ebc8da46591e45a4ff212fba2cd5ac80c12adb2e84f4508735d98dc68ffce86aa5e5e8d873e6f51efb4f88f4d76a190b9eb0024bf69deefc1
+DIST langkit-24.0.0.tar.gz 1282265 BLAKE2B 63aa3eb05be6ea590c3f4d0478cdfa0ee217606607c73b4c172c5b89d8a2a5d815efbf2bcd23b84548ececd11ffa1f89ebcbc5d411845b7a3834d6f7e16aa0b1 SHA512 b26a83cd7e57d8821d09e5e1aeaa2fa5837ab2f3901a006cfd49b059a3cfc98d7ea236dc39a2e24365196bd45c2124396795fd46fdaf4d7cb41aabb45ff85326
diff --git a/dev-ada/langkit/langkit-24.0.0.ebuild b/dev-ada/langkit/langkit-24.0.0.ebuild
new file mode 100644
index 000000000000..a819cb00aaa7
--- /dev/null
+++ b/dev-ada/langkit/langkit-24.0.0.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{10..12} )
+ADA_COMPAT=( gcc_12 gcc_13 )
+
+DISTUTILS_USE_PEP517=setuptools
+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 )"
+RESTRICT="test"
+
+RDEPEND="${PYTHON_DEPS}
+ ${ADA_DEPS}
+ dev-ada/gnatcoll-core:=
+ dev-ada/gnatcoll-bindings[${ADA_USEDEP},gmp,iconv,shared?,static-libs?,static-pic?]
+ dev-ada/AdaSAT[${ADA_USEDEP},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}"
+
+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
+ gprinstall -v -P sigsegv_handler/langkit_sigsegv_handler.gpr -p -XBUILD_MODE=dev \
+ --prefix="${D}"/usr || die
+}