summaryrefslogtreecommitdiff
path: root/dev-ada/libadalang
diff options
context:
space:
mode:
Diffstat (limited to 'dev-ada/libadalang')
-rw-r--r--dev-ada/libadalang/Manifest2
-rw-r--r--dev-ada/libadalang/libadalang-24.0.0.ebuild110
2 files changed, 112 insertions, 0 deletions
diff --git a/dev-ada/libadalang/Manifest b/dev-ada/libadalang/Manifest
index 69200c4d7dab..1560b0d9dd70 100644
--- a/dev-ada/libadalang/Manifest
+++ b/dev-ada/libadalang/Manifest
@@ -1,4 +1,6 @@
AUX libadalang-23.0.0-test.patch 554 BLAKE2B 3f9dd2b8bba0defd745e18e00162116c56cef11395ebea09730337a844824e0b3c231ed650dd2510fca431c12c5d1991bbcf9b772899f85d5f9af90a3acb51b1 SHA512 0f53b76eb2dbdf8c4fdea5d1e582e2402fae31367d48f95e9fb15726af5b32d8a26bb4295c4c60a68fd4e3bf600dd82cbfa4b8b28cadcd626c6c9f652dccb175
DIST libadalang-23.0.0.tar.gz 2604724 BLAKE2B 0e415c92fdd150e19288cee87a011c448962531b629b7f77be3b22a7e6662017a6cfd5132a5895c68ffee4b28b7ac35e4b5abc07f015a84638ecb1843976e3e5 SHA512 ed80d751d3a2e07b0d612bda24c0f1d753d15237cde3d9e3bbb6c79c8c98d6af050151c499d161e619282ed8cb742968bbfb5423008aa593a6673fcf0375c7d3
+DIST libadalang-24.0.0.tar.gz 2783238 BLAKE2B 6d3b3df1dbb645ea8cba8f8088c7cdd40e9114ce2a5100bf93fefe8089d944f185fe343f5fefc35e17f64f5bf4f3dde358a398614db7d1a1b62dd136efdbb334 SHA512 fb2ed8aee075ef5dd66527a099acb5eef9103a8bf244ed437ff9fa38360d7de1712e6375ed98b691a745fa27ef841eb5daa6651641c552c5146986c5ed977131
EBUILD libadalang-23.0.0-r3.ebuild 2590 BLAKE2B b8f45ba99782502511f86cf72352f53206af0d3fc473b80a72d770fe591b7d70b371824c3c186bf17a156f3d89412affdb151416bb0828d95ec68019d89dd335 SHA512 2313f457f2de95994d1133ddeb44cd00e3fbd1bc68e1babe0f01e8adb222f415ed30fb631ba123be407389182270167a814a666a8e2c4e2a1b361ac97802f2f4
+EBUILD libadalang-24.0.0.ebuild 2696 BLAKE2B 05f68706b36f55a226644a4e2ac07c8ea201d8b5cf4b4f6b465675ae957f9ece69ba61da7abd3983fb227820885e005d99688e50e307f8f7ca453996e20b187a SHA512 febedd998efd7ba3f9f6af4c4ffd4904a6bb5cf4df58fd92baf8d0a8cbbd342cf29f9325bc0407761772851d2b513c4d83044cbda3118daa07a2ba42cf085a06
MISC metadata.xml 676 BLAKE2B 085445f4e10891044b544d0885a3887a5f8b2d0188ead82eee9e3a351042b171cd3cbfe5ac5910a008e723f74c1f9e96cec5239b91567af28f10c136d5372d6f SHA512 7165db10f2d58592cdf3197778ed42a99d6fa05730ab89ed9faa05146e6d54e3888f7f2841f129c5d2ef5897910348058de4303b105e1ba50ff08e2cbc7831ce
diff --git a/dev-ada/libadalang/libadalang-24.0.0.ebuild b/dev-ada/libadalang/libadalang-24.0.0.ebuild
new file mode 100644
index 000000000000..9635eb6d6899
--- /dev/null
+++ b/dev-ada/libadalang/libadalang-24.0.0.ebuild
@@ -0,0 +1,110 @@
+# 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=( gnat_2021 gcc_12 gcc_13 )
+
+inherit ada python-single-r1 multiprocessing
+
+DESCRIPTION="high performance semantic engine for the Ada programming language"
+HOMEPAGE="https://libre.adacore.com/"
+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="test +static-libs static-pic"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}
+ ${ADA_REQUIRED_USE}"
+# Need java
+RESTRICT="test"
+
+RDEPEND="dev-python/pyyaml
+ dev-ada/gnatcoll-bindings[${ADA_USEDEP},gmp,iconv]
+ dev-ada/gnatcoll-bindings[shared,static-libs?,static-pic?]
+ ${ADA_DEPS}
+ ${PYTHON_DEPS}
+ >=dev-ada/gpr-24.0.0[${ADA_USEDEP},shared,static-libs?,static-pic?]
+ >=dev-ada/langkit-24.0.0[${ADA_USEDEP},shared,static-libs?,static-pic?]
+ $(python_gen_cond_dep '
+ dev-ada/langkit[${PYTHON_USEDEP}]
+ ')"
+DEPEND="${RDEPEND}
+ dev-ada/gprbuild[${ADA_USEDEP}]
+"
+BDEPEND="test? (
+ dev-ml/dune
+ dev-ml/zarith
+ dev-ml/camomile
+ dev-ml/ocaml-ctypes
+ dev-ada/e3-testsuite
+ <dev-lang/ocaml-4.14
+ )"
+
+PATCHES=( "${FILESDIR}"/${PN}-23.0.0-test.patch )
+
+pkg_setup() {
+ python-single-r1_pkg_setup
+ ada_pkg_setup
+ libType=''
+ if use static-libs; then
+ libType+=',static'
+ fi
+ if use static-pic; then
+ libType+=',static-pic'
+ fi
+ libType+=',relocatable'
+ libType=${libType:1}
+}
+
+src_prepare() {
+ default
+ rm -r testsuite/tests/misc/copyright || die
+ rm -r testsuite/tests/name_resolution/field_hiding_2 || die
+ rm -r testsuite/tests/ocaml_api/auto_provider || die
+ rm -r testsuite/tests/ocaml_api/project_unit_provider || die
+}
+
+src_configure() {
+ ${EPYTHON} manage.py generate -v debug || die
+}
+
+src_compile() {
+ ${EPYTHON} manage.py build -v \
+ --build-mode "prod" \
+ -j$(makeopts_jobs) \
+ --disable-java \
+ --gargs "-cargs:C ${CFLAGS} -cargs:Ada ${ADAFLAGS} -largs ${LDFLAGS}" \
+ --library-types=${libType} || die
+ GPR_PROJECT_PATH="${S}"/build \
+ gprbuild -P contrib/highlight/highlight.gpr \
+ -j$(makeopts_jobs) -v \
+ -XBUILD_MODE=prod \
+ -XLIBRARY_TYPE=relocatable \
+ -XXMLADA_BUILD=relocatable \
+ -cargs:C ${CFLAGS} -cargs:Ada ${ADAFLAGS} \
+ -largs ${LDFLAGS} \
+ || die
+}
+
+src_test() {
+ BUILD_MODE=prod \
+ ${EPYTHON} manage.py test \
+ --build-mode "prod" \
+ --restricted-env -j 1 \
+ |& tee libadalang.testOut
+ grep -qw FAIL libadalang.testOut && die
+}
+
+src_install() {
+ ${EPYTHON} manage.py \
+ install "${D}"/usr \
+ --build-mode "prod" \
+ --library-types=${libType} || die
+ rm -r "${D}"/usr/python || die
+ python_domodule build/python/libadalang
+ rm -r "${D}"/usr/ocaml || die
+}