Skip to content

Commit

Permalink
dev-ada/aunit: add doc
Browse files Browse the repository at this point in the history
Signed-off-by: Alfredo Tupone <[email protected]>
  • Loading branch information
atupone committed Mar 1, 2024
1 parent 53c79a9 commit 60dfdc8
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,35 @@ SRC_URI="https://github.com/AdaCore/${PN}/archive/refs/tags/v${PV}.tar.gz
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc"

RDEPEND="${ADA_DEPS}"
DEPEND="${RDEPEND}
dev-ada/gprbuild[${ADA_USEDEP}]"

REQUIRED_USE="${ADA_REQUIRED_USE}"

PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )

src_prepare() {
default
sed -i \
-e "s|@PF@|${PF}|g" \
lib/gnat/aunit.gpr \
|| die
}

src_compile() {
emake GPROPTS_EXTRA="-j$(makeopts_jobs) -v -cargs ${ADAFLAGS}"
if use doc; then
emake -C doc html-all
emake -C doc txt-all
fi
}

src_install() {
emake INSTALL="${D}"/usr install
einstalldocs
mv "${D}"/usr/share/examples/${PN} "${D}"/usr/share/doc/${PF}/examples || die
rmdir "${D}"/usr/share/examples || die
rm -r "${D}"/usr/share/gpr/manifests || die
}

Expand Down
35 changes: 35 additions & 0 deletions dev-ada/aunit/files/aunit-24.0.0-gentoo.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
--- a/lib/gnat/aunit.gpr 2022-12-19 22:08:42.000000000 +0100
+++ b/lib/gnat/aunit.gpr 2024-03-01 22:32:34.298510972 +0100
@@ -50,16 +50,16 @@

package Install is
for Artifacts ("share/doc/aunit/pdf")
- use ("../../doc/pdf/**");
- for Artifacts ("share/doc/aunit/txt")
- use ("../../doc/txt/**");
+ use ("../../doc/build/aunit_cb/pdf/**");
+ for Artifacts ("share/doc/@PF@")
+ use ("../../doc/build/aunit_cb/txt/**");
for Artifacts ("share/doc/aunit/info")
- use ("../../doc/info/**");
- for Artifacts ("share/doc/aunit/html")
- use ("../../doc/html/**");
+ use ("../../doc/build/aunit_cb/info/**");
+ for Artifacts ("share/doc/@PF@/html")
+ use ("../../doc/build/aunit_cb/html/**");

for Artifacts ("share/gps/plug-ins") use ("../../support/aunit.xml");
- for Artifacts ("share/examples/aunit") use ("../../examples/*");
+ for Artifacts ("share/doc/@PF@/examples") use ("../../examples/*");
end Install;

end AUnit;
--- a/doc/share/conf.py 2024-03-01 22:35:22.194546565 +0100
+++ b/doc/share/conf.py 2024-03-01 22:35:34.657400722 +0100
@@ -95,6 +95,3 @@
u'AdaCore', doc_name, doc_name, '')]


-def setup(app):
- app.add_lexer('ada', ada_pygments.AdaLexer())
- app.add_lexer('gpr', ada_pygments.GNATProjectLexer())

0 comments on commit 60dfdc8

Please sign in to comment.