public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-ada/gnatformat/, profiles/features/musl/
@ 2025-02-16 19:52 Alfredo Tupone
  0 siblings, 0 replies; only message in thread
From: Alfredo Tupone @ 2025-02-16 19:52 UTC (permalink / raw
  To: gentoo-commits

commit:     eadac9a160a0ca520b32c27562e64f4deba3bb92
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 16 19:51:13 2025 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Sun Feb 16 19:51:39 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eadac9a1

dev-ada/gnatformat: new package, add 25.0.0

Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 dev-ada/gnatformat/Manifest                 |  1 +
 dev-ada/gnatformat/gnatformat-25.0.0.ebuild | 88 +++++++++++++++++++++++++++++
 dev-ada/gnatformat/metadata.xml             | 13 +++++
 profiles/features/musl/package.mask         |  1 +
 4 files changed, 103 insertions(+)

diff --git a/dev-ada/gnatformat/Manifest b/dev-ada/gnatformat/Manifest
new file mode 100644
index 000000000000..89dd660f064e
--- /dev/null
+++ b/dev-ada/gnatformat/Manifest
@@ -0,0 +1 @@
+DIST gnatformat-25.0.0.tar.gz 114710 BLAKE2B aec30d9c4555092294dfd0be9d1f03fb39f051d0b584453635e053071f3ee8e3aebc48caacb81b59b202a6a0491bd62e5b7adff7e929e1c052d1198c5af4451f SHA512 338fb17c6bfb14791fe9029d5a1cc83f72dab982b602f3a67f03d2a94bd3b2d2b19fb62b39b9c6da5a6f7ebc4eb6470f75722cf110bb6623fb1d5b25e18a29b7

diff --git a/dev-ada/gnatformat/gnatformat-25.0.0.ebuild b/dev-ada/gnatformat/gnatformat-25.0.0.ebuild
new file mode 100644
index 000000000000..edc0da86fd11
--- /dev/null
+++ b/dev-ada/gnatformat/gnatformat-25.0.0.ebuild
@@ -0,0 +1,88 @@
+# Copyright 2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ADA_COMPAT=( gcc_14 )
+PYTHON_COMPAT=( python3_{11..12} )
+inherit ada python-any-r1 multiprocessing
+
+DESCRIPTION="Opinionated code formatter for the Ada language"
+HOMEPAGE="https://github.com/AdaCore/gnatformat"
+SRC_URI="https://github.com/AdaCore/${PN}/archive/refs/tags/v${PV}.tar.gz
+	-> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="doc static-pic static-libs test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="${ADA_DEPS}
+	dev-ada/AdaSAT:=[${ADA_USEDEP},shared,static-libs?,static-pic?]
+	dev-ada/libadalang:=[${ADA_USEDEP},static-libs?,static-pic?]"
+DEPEND="${RDEPEND}"
+BDEPEND="
+	dev-ada/gprbuild[${ADA_USEDEP}]
+	$(python_gen_any_dep '
+		test? ( dev-ada/e3-testsuite[${PYTHON_USEDEP}] )
+		doc? (
+			dev-python/sphinx[${PYTHON_USEDEP}]
+			dev-python/sphinx-rtd-theme[${PYTHON_USEDEP}]
+		)
+	')"
+
+pkg_setup() {
+	use test && python-any-r1_pkg_setup
+	ada_pkg_setup
+}
+
+src_compile() {
+	build () {
+		gprbuild -P gnat/gnatformat.gpr -XGNATFORMAT_LIBRARY_TYPE=$1 \
+			-XLIBRARY_TYPE=$1 -XGNATFORMAT_BUILD_MODE=dev -v -k -p \
+			-j$(makeopts_jobs) -largs ${LDFLAGS} -cargs ${ADAFLAGS} \
+			|| die "gprbuild failed"
+	}
+	build relocatable
+	use static-libs && build static
+	use static-pic  && build static-pic
+	gprbuild -P gnat/gnatformat_driver.gpr \
+		-XGNATFORMAT_LIBRARY_TYPE=relocatable -XLIBRARY_TYPE=relocatable \
+		-XGNATFORMAT_BUILD_MODE=dev -v -k -p -j$(makeopts_jobs) \
+		-largs ${LDFLAGS} -cargs ${ADAFLAGS} || die "gprbuild failed"
+	if use test; then
+		GPR_PROJECT_PATH=gnat \
+			gprbuild -P testsuite/test_programs/partial_gnatformat.gpr \
+			-XGNATFORMAT_LIBRARY_TYPE=relocatable -XLIBRARY_TYPE=relocatable \
+			-XGNATFORMAT_BUILD_MODE=dev -v -k -p -j$(makeopts_jobs) \
+			-largs ${LDFLAGS} -cargs ${ADAFLAGS} || die "gprbuild failed"
+	fi
+	use doc && emake -C user_manual html
+}
+
+src_test() {
+	PATH="${S}/testsuite/test_programs/bin/:${S}/bin:${PATH}" \
+		${EPYTHON} testsuite/testsuite.py || die
+}
+
+src_install() {
+	build () {
+		gprinstall -v -XGNATFORMAT_LIBRARY_TYPE=$1 \
+			-XLIBRARY_TYPE=$1 -XGNATFORMAT_BUILD_MODE=dev \
+			--install-name=gnatformat --prefix="${D}"/usr \
+			--sources-subdir=include/gnatformat \
+			--build-name=$1 --build-var=LIBRARY_TYPE \
+			-P gnat/gnatformat.gpr -p -f || die "gprinstall failed"
+	}
+	build relocatable
+	use static-libs && build static
+	use static-pic  && build static-pic
+	gprinstall -v -XGNATFORMAT_LIBRARY_TYPE=relocatable \
+		-XLIBRARY_TYPE=relocatable -XBUILD_MODE=dev \
+		--install-name=gnatformat --prefix="${D}"/usr \
+		-P gnat/gnatformat_driver.gpr -p -f || die "gprinstall failed"
+	use doc && HTML_DOCS=( user_manual/_build/html/* )
+	einstalldocs
+	rm -r "${D}"/usr/share/gpr/manifests
+}

diff --git a/dev-ada/gnatformat/metadata.xml b/dev-ada/gnatformat/metadata.xml
new file mode 100644
index 000000000000..c47aac20367f
--- /dev/null
+++ b/dev-ada/gnatformat/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="project">
+		<email>ada@gentoo.org</email>
+	</maintainer>
+	<use>
+		<flag name="static-pic">Build static library with pic code</flag>
+	</use>
+	<upstream>
+		<remote-id type="github">AdaCore/gnatformat</remote-id>
+	</upstream>
+</pkgmetadata>

diff --git a/profiles/features/musl/package.mask b/profiles/features/musl/package.mask
index bff0c8c5c526..5ad7199cadf8 100644
--- a/profiles/features/musl/package.mask
+++ b/profiles/features/musl/package.mask
@@ -121,6 +121,7 @@ dev-ada/gnatsymbolize
 dev-ada/AdaSAT
 dev-ada/lal-refactor
 dev-ada/prettier-ada
+dev-ada/gnatformat
 
 # Sergey Popov <pinkbyte@gentoo.org> (2024-03-05)
 # games-strategy/seven-kingdoms does not build on musl,


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-02-16 19:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-16 19:52 [gentoo-commits] repo/gentoo:master commit in: dev-ada/gnatformat/, profiles/features/musl/ Alfredo Tupone

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox