diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-07-03 08:05:42 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-07-03 08:05:42 +0100 |
commit | 8435c842b9e8fbb2bcc80397ab3aa655000459e2 (patch) | |
tree | b74558e80643a8f074c501e8b4bf7f50f7155455 /dev-build/ninja/ninja-9999.ebuild | |
parent | 5c5e9714c851027611cb726a76ebb8be6d48cbdc (diff) |
gentoo auto-resync : 03:07:2024 - 08:05:42
Diffstat (limited to 'dev-build/ninja/ninja-9999.ebuild')
-rw-r--r-- | dev-build/ninja/ninja-9999.ebuild | 38 |
1 files changed, 32 insertions, 6 deletions
diff --git a/dev-build/ninja/ninja-9999.ebuild b/dev-build/ninja/ninja-9999.ebuild index b387ddf90c06..1f7a8e02d01c 100644 --- a/dev-build/ninja/ninja-9999.ebuild +++ b/dev-build/ninja/ninja-9999.ebuild @@ -15,12 +15,16 @@ else KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi +GTEST_VER=1.14.0 +SRC_URI+=" test? ( https://github.com/google/googletest/archive/refs/tags/v${GTEST_VER}.tar.gz -> gtest-${GTEST_VER}.tar.gz )" + DESCRIPTION="A small build system similar to make" HOMEPAGE="https://ninja-build.org/" LICENSE="Apache-2.0" SLOT="0" -IUSE="doc" +IUSE="doc test" +RESTRICT="!test? ( test )" BDEPEND=" ${PYTHON_DEPS} @@ -36,14 +40,19 @@ PDEPEND=" app-alternatives/ninja " +PATCHES=( + "${FILESDIR}"/ninja-cflags.patch +) + pkg_setup() { : } -src_prepare() { - local PATCHES=( - "${FILESDIR}"/ninja-cflags.patch - ) +src_unpack() { + if [[ ${PV} == 9999 ]] ; then + git-r3_src_unpack + fi + default } @@ -55,7 +64,15 @@ bootstrap() { local -x CXXFLAGS="${BUILD_CXXFLAGS} -D_FILE_OFFSET_BITS=64" local -x LDFLAGS=${BUILD_LDFLAGS} fi - edo ${EPYTHON} configure.py --with-python=python --bootstrap --verbose + + local bootstrap_args=( + --with-python=python + --bootstrap + --verbose + $(usev test --gtest-source-dir="${WORKDIR}"/googletest-${GTEST_VER}) + ) + + edo ${EPYTHON} configure.py "${bootstrap_args[@]}" } src_compile() { @@ -77,6 +94,15 @@ src_compile() { fi } +src_test() { + if ! tc-is-cross-compiler; then + # Bug 485772 + ulimit -n 2048 + edo ./ninja -v ninja_test + edo ./ninja_test + fi +} + src_install() { newbin ninja{,-reference} |