summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2023-04-15 21:28:28 +0200
committerAlfredo Tupone <tupone@gentoo.org>2023-04-15 21:31:22 +0200
commitc349f06163666467c10543b7f3d1e25fbf6ff468 (patch)
tree9b2ea9979c17f29f55f29802599fe5ae40034cca /dev-ada
parentdev-qt/qtwebengine: add 6.5.0 (diff)
downloadgentoo-c349f06163666467c10543b7f3d1e25fbf6ff468.tar.gz
gentoo-c349f06163666467c10543b7f3d1e25fbf6ff468.tar.bz2
gentoo-c349f06163666467c10543b7f3d1e25fbf6ff468.zip
dev-ada/gpr-unit-provider: static libraries under static-libs flag
Closes: https://bugs.gentoo.org/902539 Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'dev-ada')
-rw-r--r--dev-ada/gpr-unit-provider/gpr-unit-provider-23.0.0-r1.ebuild39
-rw-r--r--dev-ada/gpr-unit-provider/gpr-unit-provider-23.0.0-r2.ebuild59
-rw-r--r--dev-ada/gpr-unit-provider/metadata.xml1
3 files changed, 60 insertions, 39 deletions
diff --git a/dev-ada/gpr-unit-provider/gpr-unit-provider-23.0.0-r1.ebuild b/dev-ada/gpr-unit-provider/gpr-unit-provider-23.0.0-r1.ebuild
deleted file mode 100644
index 4219750d6ce5..000000000000
--- a/dev-ada/gpr-unit-provider/gpr-unit-provider-23.0.0-r1.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-ADA_COMPAT=( gnat_2021 gcc_12 )
-inherit ada multiprocessing
-
-DESCRIPTION="GPR Unit Provider"
-HOMEPAGE="https://github.com/AdaCore/gpr-unit-provider"
-SRC_URI="https://github.com/AdaCore/${PN}/archive/refs/tags/v${PV}.tar.gz
- -> ${P}.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-RDEPEND="${ADA_DEPS}
- dev-ada/gpr[${ADA_USEDEP},shared?]
- dev-ada/libadalang[${ADA_USEDEP},static-libs]
- shared? ( dev-ada/libadalang[static-pic] )"
-DEPEND="${RDEPEND}"
-BDEPEND=""
-
-IUSE="+shared"
-REQUIRED_USE="${ADA_REQUIRED_USE}"
-
-src_compile() {
- emake PROCESSORS=$(makeopts_jobs) \
- ENABLE_SHARED=$(usex shared) \
- GPRBUILD_OPTIONS=-v
-}
-
-src_install() {
- emake ENABLE_SHARED=$(usex shared) \
- prefix="${D}"/usr \
- install
- einstalldocs
-}
diff --git a/dev-ada/gpr-unit-provider/gpr-unit-provider-23.0.0-r2.ebuild b/dev-ada/gpr-unit-provider/gpr-unit-provider-23.0.0-r2.ebuild
new file mode 100644
index 000000000000..2e1af4e2ac0d
--- /dev/null
+++ b/dev-ada/gpr-unit-provider/gpr-unit-provider-23.0.0-r2.ebuild
@@ -0,0 +1,59 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ADA_COMPAT=( gnat_2021 gcc_12 )
+inherit ada multiprocessing
+
+DESCRIPTION="GPR Unit Provider"
+HOMEPAGE="https://github.com/AdaCore/gpr-unit-provider"
+SRC_URI="https://github.com/AdaCore/${PN}/archive/refs/tags/v${PV}.tar.gz
+ -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+shared static-libs static-pic"
+
+RDEPEND="${ADA_DEPS}
+ dev-ada/gpr:=[${ADA_USEDEP},shared?]
+ dev-ada/libadalang:=[${ADA_USEDEP},static-libs?,static-pic?]"
+DEPEND="${RDEPEND}"
+BDEPEND="dev-ada/gprbuild[${ADA_USEDEP}]"
+REQUIRED_USE="${ADA_REQUIRED_USE}
+ || ( shared static-libs static-pic )"
+
+src_compile() {
+ if use static-libs; then
+ emake PROCESSORS=$(makeopts_jobs) \
+ GPRBUILD_OPTIONS=-v \
+ build-static
+ fi
+ if use shared; then
+ emake PROCESSORS=$(makeopts_jobs) \
+ GPRBUILD_OPTIONS=-v \
+ build-relocatable
+ fi
+ if use static-pic; then
+ emake PROCESSORS=$(makeopts_jobs) \
+ GPRBUILD_OPTIONS=-v \
+ build-static-pic
+ fi
+}
+
+src_install() {
+ if use static-libs; then
+ emake prefix="${D}"/usr \
+ install-static
+ fi
+ if use shared; then
+ emake prefix="${D}"/usr \
+ install-relocatable
+ fi
+ if use static-pic; then
+ emake prefix="${D}"/usr \
+ install-static-pic
+ fi
+ einstalldocs
+}
diff --git a/dev-ada/gpr-unit-provider/metadata.xml b/dev-ada/gpr-unit-provider/metadata.xml
index 650d892ed260..cc5ba27bd909 100644
--- a/dev-ada/gpr-unit-provider/metadata.xml
+++ b/dev-ada/gpr-unit-provider/metadata.xml
@@ -6,6 +6,7 @@
</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/gpr-unit-provider</remote-id>