diff options
author | Mike Gilbert <floppym@gentoo.org> | 2024-04-18 15:27:38 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2024-04-18 15:30:03 -0400 |
commit | 1122aa04647a60de150811c133490d248de4bc43 (patch) | |
tree | 7f57a7ff1ab454cc94ccfc7ec5edeb7c3ffa787b /dev-build | |
parent | dev-libs/mxml: add 4.0.2 (diff) | |
download | gentoo-1122aa04647a60de150811c133490d248de4bc43.tar.gz gentoo-1122aa04647a60de150811c133490d248de4bc43.tar.bz2 gentoo-1122aa04647a60de150811c133490d248de4bc43.zip |
dev-build/ninja: improve docs support when cross-compiling
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, 22 insertions, 20 deletions
diff --git a/dev-build/ninja/ninja-1.12.0.ebuild b/dev-build/ninja/ninja-1.12.0.ebuild index fd0e6fc7d748..c7a7c9ee0b26 100644 --- a/dev-build/ninja/ninja-1.12.0.ebuild +++ b/dev-build/ninja/ninja-1.12.0.ebuild @@ -3,7 +3,6 @@ EAPI=8 -CMAKE_IN_SOURCE_BUILD=1 # Simplifies doc build CMAKE_MAKEFILE_GENERATOR=emake PYTHON_COMPAT=( python3_{10..12} ) @@ -51,6 +50,13 @@ src_configure() { cmake_src_configure if use doc; then + if tc-is-cross-compiler; then + mycmakeargs=( -DBUILD_TESTING=OFF ) + local BUILD_DIR=${WORKDIR}/native + local SYSROOT= + tc-env_build cmake_src_configure + fi + python_setup edo ${EPYTHON} configure.py fi @@ -60,16 +66,11 @@ src_compile() { cmake_src_compile 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 + local BUILD_DIR=${WORKDIR}/native + cmake_build ninja fi + edo "${BUILD_DIR}/ninja" -v -j1 doxygen manual fi } @@ -86,7 +87,7 @@ src_install() { mv "${ED}"/usr/bin/ninja{,-reference} || die - if [[ ${DOCS_BUILT} == yes ]]; then + if use doc; 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 fd0e6fc7d748..c7a7c9ee0b26 100644 --- a/dev-build/ninja/ninja-9999.ebuild +++ b/dev-build/ninja/ninja-9999.ebuild @@ -3,7 +3,6 @@ EAPI=8 -CMAKE_IN_SOURCE_BUILD=1 # Simplifies doc build CMAKE_MAKEFILE_GENERATOR=emake PYTHON_COMPAT=( python3_{10..12} ) @@ -51,6 +50,13 @@ src_configure() { cmake_src_configure if use doc; then + if tc-is-cross-compiler; then + mycmakeargs=( -DBUILD_TESTING=OFF ) + local BUILD_DIR=${WORKDIR}/native + local SYSROOT= + tc-env_build cmake_src_configure + fi + python_setup edo ${EPYTHON} configure.py fi @@ -60,16 +66,11 @@ src_compile() { cmake_src_compile 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 + local BUILD_DIR=${WORKDIR}/native + cmake_build ninja fi + edo "${BUILD_DIR}/ninja" -v -j1 doxygen manual fi } @@ -86,7 +87,7 @@ src_install() { mv "${ED}"/usr/bin/ninja{,-reference} || die - if [[ ${DOCS_BUILT} == yes ]]; then + if use doc; then docinto html dodoc -r doc/doxygen/html/. dodoc doc/manual.html |