From 00f988e1a48d08c5758de35771776104471ee97f Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Tue, 16 Apr 2024 11:12:26 -0400 Subject: dev-build/ninja: enable docs build when cross-compiling ... if ninja is in PATH. Signed-off-by: Mike Gilbert --- dev-build/ninja/ninja-1.12.0.ebuild | 21 +++++++++++++-------- dev-build/ninja/ninja-9999.ebuild | 21 +++++++++++++-------- 2 files changed, 26 insertions(+), 16 deletions(-) (limited to 'dev-build') diff --git a/dev-build/ninja/ninja-1.12.0.ebuild b/dev-build/ninja/ninja-1.12.0.ebuild index 932bf822922b..fd0e6fc7d748 100644 --- a/dev-build/ninja/ninja-1.12.0.ebuild +++ b/dev-build/ninja/ninja-1.12.0.ebuild @@ -44,17 +44,13 @@ pkg_setup() { : } -docs_enabled() { - use doc && ! tc-is-cross-compiler -} - src_configure() { local mycmakeargs=( -DBUILD_TESTING=$(usex test ON OFF) ) cmake_src_configure - if docs_enabled; then + if use doc; then python_setup edo ${EPYTHON} configure.py fi @@ -63,8 +59,17 @@ src_configure() { src_compile() { cmake_src_compile - if docs_enabled; then - edo ./ninja -v -j1 doxygen manual + if use doc; then + local ninja=./ninja + if tc-is-cross-compiler; then + ninja=$(type -P ninja) + fi + if [[ -n ${ninja} ]]; then + edo "${ninja}" -v -j1 doxygen manual + DOCS_BUILT=yes + else + DOCS_BUILT=no + fi fi } @@ -81,7 +86,7 @@ src_install() { mv "${ED}"/usr/bin/ninja{,-reference} || die - if docs_enabled; then + if [[ ${DOCS_BUILT} == yes ]]; then docinto html dodoc -r doc/doxygen/html/. dodoc doc/manual.html diff --git a/dev-build/ninja/ninja-9999.ebuild b/dev-build/ninja/ninja-9999.ebuild index 932bf822922b..fd0e6fc7d748 100644 --- a/dev-build/ninja/ninja-9999.ebuild +++ b/dev-build/ninja/ninja-9999.ebuild @@ -44,17 +44,13 @@ pkg_setup() { : } -docs_enabled() { - use doc && ! tc-is-cross-compiler -} - src_configure() { local mycmakeargs=( -DBUILD_TESTING=$(usex test ON OFF) ) cmake_src_configure - if docs_enabled; then + if use doc; then python_setup edo ${EPYTHON} configure.py fi @@ -63,8 +59,17 @@ src_configure() { src_compile() { cmake_src_compile - if docs_enabled; then - edo ./ninja -v -j1 doxygen manual + if use doc; then + local ninja=./ninja + if tc-is-cross-compiler; then + ninja=$(type -P ninja) + fi + if [[ -n ${ninja} ]]; then + edo "${ninja}" -v -j1 doxygen manual + DOCS_BUILT=yes + else + DOCS_BUILT=no + fi fi } @@ -81,7 +86,7 @@ src_install() { mv "${ED}"/usr/bin/ninja{,-reference} || die - if docs_enabled; then + if [[ ${DOCS_BUILT} == yes ]]; then docinto html dodoc -r doc/doxygen/html/. dodoc doc/manual.html -- cgit v1.2.3-65-gdbad