summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-ada/xmlada')
-rw-r--r--dev-ada/xmlada/files/xmlada-24.0.0-gentoo.patch24
-rw-r--r--dev-ada/xmlada/xmlada-24.0.0-r1.ebuild (renamed from dev-ada/xmlada/xmlada-24.0.0.ebuild)34
2 files changed, 46 insertions, 12 deletions
diff --git a/dev-ada/xmlada/files/xmlada-24.0.0-gentoo.patch b/dev-ada/xmlada/files/xmlada-24.0.0-gentoo.patch
new file mode 100644
index 000000000000..5eb69f885285
--- /dev/null
+++ b/dev-ada/xmlada/files/xmlada-24.0.0-gentoo.patch
@@ -0,0 +1,24 @@
+--- a/input_sources/xmlada_input.gpr 2024-03-01 19:32:59.111253474 +0100
++++ b/input_sources/xmlada_input.gpr 2024-03-01 19:34:57.282827180 +0100
+@@ -39,13 +39,15 @@
+ package Ide renames XmlAda_Shared.Ide;
+
+ package Install is
+- for Artifacts ("share/doc/xmlada")
+- use ("../docs/_build/html/*", "../docs/_build/latex/XMLAda.pdf");
++ for Artifacts ("share/doc/@PF@/html")
++ use ("../docs/_build/html/*");
++ for Artifacts ("share/doc/@PF@")
++ use ("../docs/_build/latex/XMLAda.pdf");
+ for Artifacts ("share/gpr") use ("../distrib/xmlada.gpr");
+- for Artifacts ("share/examples/xmlada/dom") use ("../docs/dom/*");
+- for Artifacts ("share/examples/xmlada/sax") use ("../docs/sax/*");
+- for Artifacts ("share/examples/xmlada/schema") use ("../docs/schema/*");
+- for Artifacts ("share/examples/xmlada/cross") use ("../docs/cross/*");
++ for Artifacts ("share/doc/@PF@/examples/dom") use ("../docs/dom/*");
++ for Artifacts ("share/doc/@PF@/examples/sax") use ("../docs/sax/*");
++ for Artifacts ("share/doc/@PF@/examples/schema") use ("../docs/schema/*");
++ for Artifacts ("share/doc/@PF@/examples/cross") use ("../docs/cross/*");
+ end Install;
+
+ end XmlAda_Input;
diff --git a/dev-ada/xmlada/xmlada-24.0.0.ebuild b/dev-ada/xmlada/xmlada-24.0.0-r1.ebuild
index 8b34419b5baa..e3eaa6e988bb 100644
--- a/dev-ada/xmlada/xmlada-24.0.0.ebuild
+++ b/dev-ada/xmlada/xmlada-24.0.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -14,15 +14,30 @@ SRC_URI="https://github.com/AdaCore/${PN}/archive/refs/tags/v${PV}.tar.gz
LICENSE="GPL-3"
SLOT="0/${PV}"
KEYWORDS="~amd64 ~x86"
-IUSE="+shared static-libs static-pic"
+IUSE="doc +shared static-libs static-pic"
REQUIRED_USE="|| ( shared static-libs static-pic )
${ADA_REQUIRED_USE}"
RDEPEND="${ADA_DEPS}"
DEPEND="${RDEPEND}
dev-ada/gprbuild[${ADA_USEDEP}]"
+BDEPEND="doc? (
+ dev-tex/latexmk
+ dev-python/sphinx
+)"
-PATCHES=( "${FILESDIR}"/${PN}-23.0.0-gentoo.patch )
+PATCHES=(
+ "${FILESDIR}"/${PN}-23.0.0-gentoo.patch
+ "${FILESDIR}"/${P}-gentoo.patch
+)
+
+src_prepare() {
+ default
+ sed -i \
+ -e "s|@PF@|${PF}|g" \
+ input_sources/xmlada_input.gpr \
+ || die
+}
src_compile() {
build () {
@@ -40,6 +55,10 @@ src_compile() {
if use static-pic; then
build static-pic
fi
+ if use doc; then
+ emake -C docs latexpdf
+ emake -C docs html
+ fi
}
src_test() {
@@ -74,13 +93,4 @@ src_install() {
einstalldocs
dodoc xmlada-roadmap.txt
rm -rf "${D}"/usr/share/gpr/manifests
- rm -f "${D}"/usr/share/examples/xmlada/*/b__*
- rm -f "${D}"/usr/share/examples/xmlada/*/*.adb.std*
- rm -f "${D}"/usr/share/examples/xmlada/*/*.ali
- rm -f "${D}"/usr/share/examples/xmlada/*/*.bexch
- rm -f "${D}"/usr/share/examples/xmlada/*/*.o
- rm -f "${D}"/usr/share/examples/xmlada/*/*example
- rm -f "${D}"/usr/share/examples/xmlada/dom/domexample2
- rm -f "${D}"/usr/share/examples/xmlada/sax/saxexample_main
- mv "${D}"/usr/share/examples/xmlada "${D}"/usr/share/doc/"${PF}"/examples || die
}