diff options
author | Mike Gilbert <floppym@gentoo.org> | 2024-04-16 11:12:26 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2024-04-16 11:12:26 -0400 |
commit | 00f988e1a48d08c5758de35771776104471ee97f (patch) | |
tree | 3085ac73c7c01027c33cc091396d43ff84d4360f /dev-build | |
parent | dev-erlang/xmpp: drop 1.5.8, 1.6.0 (diff) | |
download | gentoo-00f988e1a48d08c5758de35771776104471ee97f.tar.gz gentoo-00f988e1a48d08c5758de35771776104471ee97f.tar.bz2 gentoo-00f988e1a48d08c5758de35771776104471ee97f.zip |
dev-build/ninja: enable docs build when cross-compiling
... if ninja is in PATH.
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'dev-build')
-rw-r--r-- | dev-build/ninja/ninja-1.12.0.ebuild | 21 | ||||
-rw-r--r-- | dev-build/ninja/ninja-9999.ebuild | 21 |
2 files changed, 26 insertions, 16 deletions
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 |