summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2024-03-20 19:38:50 +0100
committerAlfredo Tupone <tupone@gentoo.org>2024-03-20 19:39:57 +0100
commit6eb18626812f64eeff35eb570ca9e1ad945b39d6 (patch)
tree0c60201ddd6a0da59a2897749e572760b864ff7c /dev-ada
parentdev-ada/libadalang-tools: fix deps (diff)
downloadgentoo-6eb18626812f64eeff35eb570ca9e1ad945b39d6.tar.gz
gentoo-6eb18626812f64eeff35eb570ca9e1ad945b39d6.tar.bz2
gentoo-6eb18626812f64eeff35eb570ca9e1ad945b39d6.zip
dev-ada/lal-refactor: new package, add 0_p20231027
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'dev-ada')
-rw-r--r--dev-ada/lal-refactor/Manifest1
-rw-r--r--dev-ada/lal-refactor/lal-refactor-0_p20231027.ebuild96
-rw-r--r--dev-ada/lal-refactor/metadata.xml14
3 files changed, 111 insertions, 0 deletions
diff --git a/dev-ada/lal-refactor/Manifest b/dev-ada/lal-refactor/Manifest
new file mode 100644
index 000000000000..952dd1f43081
--- /dev/null
+++ b/dev-ada/lal-refactor/Manifest
@@ -0,0 +1 @@
+DIST lal-refactor-0_p20231027.tar.gz 211389 BLAKE2B 3963a99b785f3559ef176cfda8c289ce9ea2ee79da913392bc4f33f9e5821f3fba28cf1410b299ba717f3433eca101e3574fac18d1f3ad2dd0308153332dd200 SHA512 28388fbecab471a8d5dda1890dbe00f90e1c8dba96f253e97772f699d4953ca46c56db93d69b781b8642562b0c5376e28cbff51f8dd62d90dfafc1d65567d1bd
diff --git a/dev-ada/lal-refactor/lal-refactor-0_p20231027.ebuild b/dev-ada/lal-refactor/lal-refactor-0_p20231027.ebuild
new file mode 100644
index 000000000000..fd2cdfac836a
--- /dev/null
+++ b/dev-ada/lal-refactor/lal-refactor-0_p20231027.ebuild
@@ -0,0 +1,96 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ADA_COMPAT=( gnat_2021 gcc_12 gcc_13 )
+inherit ada multiprocessing
+
+commitId=a5997083efc0ae97ec089b18931c765d43301072
+
+DESCRIPTION="Refactoring tools for the Ada programming language"
+HOMEPAGE="https://github.com/AdaCore/lal-refactor"
+SRC_URI="https://github.com/AdaCore/${PN}/archive/${commitId}.tar.gz
+ -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+shared static-libs static-pic"
+REQUIRED_USE="|| ( shared static-libs static-pic )
+ ${ADA_REQUIRED_USE}"
+
+RDEPEND="${ADADEPS}
+ dev-ada/libadalang-tools[${ADA_USEDEP},shared?,static-libs?,static-pic?]"
+BDEPEND="dev-ada/gprbuild[${ADA_USEDEP}]"
+
+S="${WORKDIR}"/${PN}-${commitId}
+
+src_compile() {
+ build () {
+ gprbuild -v -k -XLIBRARY_TYPE=$1 -j$(makeopts_jobs) -p \
+ -XLAL_REFACTOR_LIBRARY_TYPE=$1 \
+ -XLAL_REFACTOR_BUILD_MODE=prod \
+ -P gnat/lal_refactor.gpr \
+ -largs ${LDFLAGS} \
+ -cargs ${ADAFLAGS} || 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
+
+ if use static-libs; then
+ libtype='static'
+ elif use static-pic; then
+ libtype='static-pic'
+ elif use shared; then
+ libtype='relocatable'
+ fi
+ gprbuild -v -k -XLIBRARY_TYPE=${libtype} -j$(makeopts_jobs) -p \
+ -XLAL_REFACTOR_LIBRARY_TYPE=${libtype} \
+ -XLAL_REFACTOR_BUILD_MODE=prod \
+ -Pgnat/lal_refactor_driver.gpr \
+ -largs ${LDFLAGS} \
+ -cargs ${ADAFLAGS} || die
+}
+
+src_install() {
+ build () {
+ gprinstall \
+ -XLAL_REFACTOR_LIBRARY_TYPE=$1 \
+ -XLIBRARY_TYPE=$1 \
+ -XLAL_REFACTOR_BUILD_MODE=prod \
+ --prefix="${D}"/usr \
+ --sources-subdir=include/lal-refactor \
+ --build-name=$1 \
+ --build-var=LIBRARY_TYPE \
+ -P gnat/lal_refactor.gpr -p -f || 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
+ gprinstall \
+ -XLAL_REFACTOR_LIBRARY_TYPE=${libtype} \
+ -XLIBRARY_TYPE=${libtype} \
+ -XBUILD_MODE=prod \
+ --prefix="${D}"/usr \
+ -P gnat/lal_refactor_driver.gpr \
+ -p \
+ -f || die
+
+ einstalldocs
+ rm -rf "${D}"/usr/share/gpr/manifests
+}
diff --git a/dev-ada/lal-refactor/metadata.xml b/dev-ada/lal-refactor/metadata.xml
new file mode 100644
index 000000000000..026707ed72f0
--- /dev/null
+++ b/dev-ada/lal-refactor/metadata.xml
@@ -0,0 +1,14 @@
+<?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="shared">Build shared library</flag>
+ <flag name="static-pic">Build static library with pic code</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">AdaCore/lal-refactor</remote-id>
+ </upstream>
+</pkgmetadata>