summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2024-03-18 23:03:40 +0100
committerAlfredo Tupone <tupone@gentoo.org>2024-03-18 23:04:25 +0100
commit0805f10b87ec8ff0b5af511d47bdf2ecd4afd14d (patch)
tree6015244d285094fd8774436a7f31f32760d3d66c /dev-ada
parentapp-editors/retext-9999: fix desktop file issues (diff)
downloadgentoo-0805f10b87ec8ff0b5af511d47bdf2ecd4afd14d.tar.gz
gentoo-0805f10b87ec8ff0b5af511d47bdf2ecd4afd14d.tar.bz2
gentoo-0805f10b87ec8ff0b5af511d47bdf2ecd4afd14d.zip
dev-ada/VSS: add shared, static and static-pic use flags
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'dev-ada')
-rw-r--r--dev-ada/VSS/VSS-24.0.0-r1.ebuild84
-rw-r--r--dev-ada/VSS/VSS-24.0.0.ebuild43
-rw-r--r--dev-ada/VSS/metadata.xml4
3 files changed, 88 insertions, 43 deletions
diff --git a/dev-ada/VSS/VSS-24.0.0-r1.ebuild b/dev-ada/VSS/VSS-24.0.0-r1.ebuild
new file mode 100644
index 000000000000..5837246d67bc
--- /dev/null
+++ b/dev-ada/VSS/VSS-24.0.0-r1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 2021-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ADA_COMPAT=( gcc_12 gcc_13 )
+inherit ada multiprocessing
+
+DESCRIPTION="A high level string and text processing library"
+HOMEPAGE="https://github.com/AdaCore/VSS"
+SRC_URI="https://github.com/AdaCore/${PN}/archive/refs/tags/v${PV}.tar.gz
+ -> ${P}.tar.gz"
+
+LICENSE="GPL-3 gcc-runtime-library-exception-3.1"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE="+shared static-libs static-pic test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="${ADA_REQUIRED_USE}"
+
+RDEPEND="${ADA_DEPS}
+ dev-ada/xmlada:=[shared?,static-libs?,static-pic?,${ADA_USEDEP}]"
+DEPEND="${RDEPEND}"
+BDEPEND="dev-ada/gprbuild[${ADA_USEDEP}]
+ test? (
+ app-i18n/unicode-data
+ )"
+
+src_prepare() {
+ ln -sf /usr/share/unicode-data data/ucd || die
+ default
+}
+
+src_compile() {
+ build () {
+ gprbuild -XVSS_LIBRARY_TYPE=$1 -p -j$(makeopts_jobs) -v \
+ gnat/vss_gnat.gpr \
+ -cargs:Ada ${ADAFLAGS} || die
+ gprbuild -XVSS_LIBRARY_TYPE=$1 -p -j$(makeopts_jobs) -v \
+ gnat/vss_text.gpr \
+ -cargs:Ada ${ADAFLAGS} || die
+ gprbuild -XVSS_LIBRARY_TYPE=$1 -p -j$(makeopts_jobs) -v \
+ gnat/vss_json.gpr \
+ -cargs:Ada ${ADAFLAGS} || die
+ gprbuild -XVSS_LIBRARY_TYPE=$1 -p -j$(makeopts_jobs) -v \
+ gnat/vss_regexp.gpr \
+ -cargs:Ada ${ADAFLAGS} || die
+ gprbuild -XVSS_LIBRARY_TYPE=$1 -p -j$(makeopts_jobs) -v \
+ gnat/vss_xml.gpr \
+ -cargs:Ada ${ADAFLAGS} || die
+ gprbuild -XVSS_LIBRARY_TYPE=$1 -p -j$(makeopts_jobs) -v \
+ gnat/vss_xml_templates.gpr \
+ -cargs:Ada ${ADAFLAGS} || die
+ gprbuild -XVSS_LIBRARY_TYPE=$1 -XXMLADA_BUILD=$1 -p \
+ -j$(makeopts_jobs) -v gnat/vss_xml_xmlada.gpr \
+ -cargs:Ada ${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
+}
+
+src_test() {
+ emake -j1 GPRBUILD_FLAGS="-p -j$(makeopts_jobs) -v" build_tests
+ # To run all the test need to follow data/README.md
+ emake check_html
+}
+
+src_install() {
+ build () {
+ emake -j1 DESTDIR="${D}" install-libs-$1
+ }
+ use shared && build relocatable
+ use static-libs && build static
+ use static-pic && build static-pic
+ rm -r "${D}"/usr/share/gpr/manifests || die
+ einstalldocs
+}
diff --git a/dev-ada/VSS/VSS-24.0.0.ebuild b/dev-ada/VSS/VSS-24.0.0.ebuild
deleted file mode 100644
index c313680fa3e5..000000000000
--- a/dev-ada/VSS/VSS-24.0.0.ebuild
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 2021-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-ADA_COMPAT=( gcc_12 gcc_13 )
-inherit ada multiprocessing
-
-DESCRIPTION="A high level string and text processing library"
-HOMEPAGE="https://github.com/AdaCore/VSS"
-SRC_URI="https://github.com/AdaCore/${PN}/archive/refs/tags/v${PV}.tar.gz
- -> ${P}.tar.gz"
-
-LICENSE="GPL-3 gcc-runtime-library-exception-3.1"
-SLOT="0/${PV}"
-KEYWORDS="~amd64 ~x86"
-IUSE="test"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="${ADA_REQUIRED_USE}"
-
-RDEPEND="${ADA_DEPS}
- dev-ada/xmlada[${ADA_USEDEP}]"
-DEPEND="${RDEPEND}"
-BDEPEND="dev-ada/gprbuild[${ADA_USEDEP}]
- test? (
- app-i18n/unicode-data
- )"
-
-src_prepare() {
- mkdir data
- ln -sf /usr/share/unicode-data data/ucd || die
- default
-}
-
-src_compile() {
- emake GPRBUILD_FLAGS="-p -j$(makeopts_jobs) -v"
-}
-
-src_test() {
- emake -j1 GPRBUILD_FLAGS="-p -j$(makeopts_jobs) -v" build_tests
- # To run all the test need to follow data/README.md
- emake check_html
-}
diff --git a/dev-ada/VSS/metadata.xml b/dev-ada/VSS/metadata.xml
index 640859a7d0d5..6c54f03b5a01 100644
--- a/dev-ada/VSS/metadata.xml
+++ b/dev-ada/VSS/metadata.xml
@@ -4,6 +4,10 @@
<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/VSS</remote-id>
</upstream>