summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2025-01-01 22:28:27 +0100
committerAlfredo Tupone <tupone@gentoo.org>2025-01-01 22:28:42 +0100
commit955b94e67465cccbf2c0d12301093059199bc347 (patch)
tree93457affd67bc3d48580cc308ba25fdece98a816 /dev-ada
parentdev-build/bazelisk: drop old 1.24.0 (diff)
downloadgentoo-955b94e67465cccbf2c0d12301093059199bc347.tar.gz
gentoo-955b94e67465cccbf2c0d12301093059199bc347.tar.bz2
gentoo-955b94e67465cccbf2c0d12301093059199bc347.zip
dev-ada/templates-parser: add 25.0.0
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
Diffstat (limited to 'dev-ada')
-rw-r--r--dev-ada/templates-parser/Manifest1
-rw-r--r--dev-ada/templates-parser/metadata.xml5
-rw-r--r--dev-ada/templates-parser/templates-parser-25.0.0.ebuild129
3 files changed, 135 insertions, 0 deletions
diff --git a/dev-ada/templates-parser/Manifest b/dev-ada/templates-parser/Manifest
index 64b84565c289..803201883a08 100644
--- a/dev-ada/templates-parser/Manifest
+++ b/dev-ada/templates-parser/Manifest
@@ -1 +1,2 @@
DIST templates-parser-24.0.0.tar.gz 226649 BLAKE2B 6e84721cbe28164e9c5f683906ff0b360a7dca82a2b91a7fe0253546c6d617d82ff2bb385133435e48c1588821daa3171eee86aeb0de27a55f38cad372f858db SHA512 3661ccb4be3bc3a6a81bbf04244f3b943c87655cad25370e857bb09d24b86ee801388a4a71d63f9135d5f069c54bc184cef4a8a25bcc90d0add8a15c67f8c374
+DIST templates-parser-25.0.0.tar.gz 259459 BLAKE2B b0ba2ad87cbd9cb34773cce54160a30e59b566ec72ce773525ba4cbb33be659dd83f23846bcb6d6fd88726c7cfae52e2993c1ced052f078bd589b14cf73cef55 SHA512 902e41f713dd8446e08ba6f180b4c88c35d37da3476d0c925a4b6a05fb5038ff9ec1b0daa0443a55e82f902867b774efb4e28c0b7d8ec59fb15d050ee523ee87
diff --git a/dev-ada/templates-parser/metadata.xml b/dev-ada/templates-parser/metadata.xml
index 71e5ca6a8779..eb0de48e9af6 100644
--- a/dev-ada/templates-parser/metadata.xml
+++ b/dev-ada/templates-parser/metadata.xml
@@ -6,7 +6,12 @@
</maintainer>
<use>
<flag name="shared">Build shared library</flag>
+ <flag name="static-pic">Build static library with pic code</flag>
</use>
+ <longdescription lang="en">
+ The templates parser package has been designed to parse files and to
+ replace some specific tags into these files by some specified values.
+ </longdescription>
<upstream>
<remote-id type="github">AdaCore/templates-parser</remote-id>
</upstream>
diff --git a/dev-ada/templates-parser/templates-parser-25.0.0.ebuild b/dev-ada/templates-parser/templates-parser-25.0.0.ebuild
new file mode 100644
index 000000000000..21c0940b8bf4
--- /dev/null
+++ b/dev-ada/templates-parser/templates-parser-25.0.0.ebuild
@@ -0,0 +1,129 @@
+# Copyright 2022-2025 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
+
+DESCRIPTION="A template engine"
+HOMEPAGE="https://github.com/AdaCore/templates-parser"
+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="doc man +shared static-libs static-pic"
+RESTRICT="test"
+
+RDEPEND="${ADA_DEPS}
+ dev-ada/xmlada[${ADA_USEDEP},shared?,static-libs?]
+ shared? ( dev-ada/xmlada[static-pic] )"
+DEPEND="${RDEPEND}
+ dev-ada/gprbuild[${ADA_USEDEP}]"
+BDEPEND="doc? (
+ dev-tex/latexmk
+ dev-texlive/texlive-latexextra
+)
+man? (
+ dev-python/sphinx
+ dev-python/sphinx-rtd-theme
+)"
+
+REQUIRED_USE="|| ( shared static-libs )
+ ${ADA_REQUIRED_USE}
+ doc? ( man )"
+
+src_configure() {
+ emake PROCESSORS=$(makeopts_jobs) \
+ DEFAULT_LIBRARY_TYPE=$(usex shared relocatable static) \
+ ENABLE_STATIC=$(usex static-libs true false) \
+ ENABLE_SHARED=$(usex shared true false) \
+ prefix=/usr \
+ setup
+}
+
+src_compile() {
+ build() {
+ gprbuild -p -v -XPRJ_BUILD=Release -XPRJ_TARGET=Linux \
+ -XTP_XMLADA=Disabled -XPROCESSORS=$(makeopts_jobs) \
+ -XVERSION=$(ver_cut 1-2) -XLIBRARY_TYPE=$1 -XXMLADA_BUILD=$1 \
+ --subdirs=${CHOST}/release/$1 \
+ -Ptemplates_parser -largs ${LDFLAGS} -cargs ${ADAFLAGS} \
+ || die "gprbuild failed"
+ }
+ if use shared; then
+ build relocatable
+ fi
+ if use static-libs; then
+ build static
+ fi
+ if use static-pic; then
+ build static-pic
+ fi
+ local lib
+ if use shared; then
+ lib=relocatable
+ elif use static-libs; then
+ lib=static
+ else
+ lib=static-pic
+ fi
+ gprbuild -p -v -XPRJ_BUILD=Release -XPRJ_TARGET=Linux \
+ -XTP_XMLADA=Disabled -XPROCESSORS=$(makeopts_jobs) \
+ -XVERSION=$(ver_cut 1-2) -XLIBRARY_TYPE=${lib} -XXMLADA_BUILD=${lib} \
+ --subdirs=${CHOST}/release/${lib} -Ptools/tools -largs ${LDFLAGS} \
+ -cargs ${ADAFLAGS} \
+ || die "gprbuild failed"
+ if use man; then
+ emake -C docs man GPROPTS=-v
+ fi
+ if use doc; then
+ emake -C docs html epub latexpdf GPROPTS=-v
+ fi
+}
+
+src_install() {
+ build() {
+ gprinstall -XPRJ_BUILD=Release -XPRJ_TARGET=Linux \
+ -XTP_XMLADA=Disabled -XPROCESSORS=$(makeopts_jobs) \
+ -XVERSION=$(ver_cut 1-2) -XLIBRARY_TYPE=$1 -XXMLADA_BUILD=$1 \
+ -p -f --prefix="${D}"/usr --build-var=LIBRARY_TYPE \
+ --build-var=TEMPLATES_PARSER_BUILD --subdirs=${CHOST}/release/$1 \
+ --build-name=$1 -Ptemplates_parser \
+ || die "gprinstall failed"
+ }
+ if use shared; then
+ build relocatable
+ fi
+ if use static-libs; then
+ build static
+ fi
+ if use static-pic; then
+ build static-pic
+ fi
+ local lib
+ if use shared; then
+ lib=relocatable
+ elif use static-libs; then
+ lib=static
+ else
+ lib=static-pic
+ fi
+ gprinstall -XPRJ_BUILD=Release -XPRJ_TARGET=Linux -XTP_XMLADA=Disabled \
+ -XPROCESSORS=$(makeopts_jobs) -XVERSION=$(ver_cut 1-2) \
+ -XLIBRARY_TYPE=${lib} -XXMLADA_BUILD=${lib} -p -f --prefix="${D}"/usr \
+ --build-var=LIBRARY_TYPE --build-var=TEMPLATES_PARSER_BUILD \
+ --mode=usage --subdirs=${CHOST}/release/${lib} \
+ --install-name=templates_parser -Ptools/tools \
+ || die "gprinstall failed"
+ DOCS="README.md"
+ if use doc; then
+ mv "${D}"/usr/share/doc/templates_parser "${D}"/usr/share/doc/"${PF}" || die
+ DOCS+=" docs/build/epub/Templates_ParserTemplatesEngine.epub"
+ fi
+ einstalldocs
+ use man && doman docs/build/man/templates_parser.1
+ rm -r "${D}"/usr/share/gpr/manifests
+}