summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2021-12-28 19:18:38 +0100
committerAlfredo Tupone <tupone@gentoo.org>2021-12-28 19:18:38 +0100
commite3c3b547a914230119324823e690afc9beb26fec (patch)
tree46342eef54448e33231188df2f9a3271108a9cb8 /dev-ada
parentsci-mathematics/smtinterpol: new package; add version 2.5_p20211018 (diff)
downloadgentoo-e3c3b547a914230119324823e690afc9beb26fec.tar.gz
gentoo-e3c3b547a914230119324823e690afc9beb26fec.tar.bz2
gentoo-e3c3b547a914230119324823e690afc9beb26fec.zip
dev-ada/libadalang-tools: install libraries, too
Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'dev-ada')
-rw-r--r--dev-ada/libadalang-tools/libadalang-tools-22.0.0-r1.ebuild67
-rw-r--r--dev-ada/libadalang-tools/libadalang-tools-22.0.0.ebuild35
-rw-r--r--dev-ada/libadalang-tools/metadata.xml4
3 files changed, 71 insertions, 35 deletions
diff --git a/dev-ada/libadalang-tools/libadalang-tools-22.0.0-r1.ebuild b/dev-ada/libadalang-tools/libadalang-tools-22.0.0-r1.ebuild
new file mode 100644
index 000000000000..6f6abba04eaa
--- /dev/null
+++ b/dev-ada/libadalang-tools/libadalang-tools-22.0.0-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+ADA_COMPAT=( gnat_2021 )
+inherit ada multiprocessing
+
+DESCRIPTION="Libadalang-based tools: gnatpp, gnatmetric and gnatstub"
+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"
+IUSE="+shared static-libs static-pic"
+
+RESTRICT="test"
+
+REQUIRED_USE="|| ( shared static-libs static-pic )
+ ${ADA_REQUIRED_USE}"
+
+RDEPEND="${ADA_DEPS}"
+DEPEND="${RDEPEND}
+ dev-ada/libadalang:=[${ADA_USEDEP},static-libs?,static-pic?]"
+BDEPEND="dev-ada/gprbuild[${ADA_USEDEP}]"
+
+src_compile() {
+ build () {
+ gprbuild -v -k -XLIBRARY_TYPE=$1 -XBUILD_MODE=prod \
+ -P src/lal_tools.gpr -p -j$(makeopts_jobs) || die
+ gprbuild -v -k -XLIBRARY_TYPE=$1 -XXMLADA_BUILD=$1 \
+ -XBUILD_MODE=prod -XLALTOOLS_SET=all \
+ -P src/build.gpr -p -j$(makeopts_jobs) || 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
+}
+
+src_install() {
+ build () {
+ gprinstall -XLIBRARY_TYPE=$1 -XBUILD_MODE=prod \
+ --prefix="${D}"/usr --sources-subdir=include/lal_tools \
+ --build-name=$1 --build-var=LIBRARY_TYPE \
+ --build-var=LAL_TOOLS_BUILD \
+ -P src/lal_tools.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
+ dobin bin/gnat{metric,pp,stub,test}
+ einstalldocs
+}
diff --git a/dev-ada/libadalang-tools/libadalang-tools-22.0.0.ebuild b/dev-ada/libadalang-tools/libadalang-tools-22.0.0.ebuild
deleted file mode 100644
index d0fb5513cc81..000000000000
--- a/dev-ada/libadalang-tools/libadalang-tools-22.0.0.ebuild
+++ /dev/null
@@ -1,35 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-ADA_COMPAT=( gnat_2021 )
-inherit ada multiprocessing
-
-DESCRIPTION="Libadalang-based tools: gnatpp, gnatmetric and gnatstub"
-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"
-IUSE=""
-
-RESTRICT="test"
-
-RDEPEND="${ADA_DEPS}"
-DEPEND="${RDEPEND}
- dev-ada/libadalang:=[${ADA_USEDEP},static-libs]"
-BDEPEND="dev-ada/gprbuild[${ADA_USEDEP}]"
-
-src_compile() {
- gprbuild -v -k -XLIBRARY_TYPE=static -XXMLADA_BUILD=static \
- -XBUILD_MODE=dev -XLALTOOLS_SET=all -P src/build.gpr -p \
- -j$(makeopts_jobs) || die
-}
-
-src_install() {
- dobin bin/gnat{metric,pp,stub,test}
- einstalldocs
-}
diff --git a/dev-ada/libadalang-tools/metadata.xml b/dev-ada/libadalang-tools/metadata.xml
index d2615c1b0e0a..5d5e0fd45371 100644
--- a/dev-ada/libadalang-tools/metadata.xml
+++ b/dev-ada/libadalang-tools/metadata.xml
@@ -4,4 +4,8 @@
<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>
</pkgmetadata>