From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8ADDB158043 for ; Mon, 15 Apr 2024 20:14:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8BCB6E29F4; Mon, 15 Apr 2024 20:14:21 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6E380E29F4 for ; Mon, 15 Apr 2024 20:14:21 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 91F663433FB for ; Mon, 15 Apr 2024 20:14:20 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C6D2E1504 for ; Mon, 15 Apr 2024 20:14:18 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1713211950.cad3542b8b988747e5b5c9a28dfa3650e426ce2c.floppym@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-build/ninja/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-build/ninja/ninja-9999.ebuild X-VCS-Directories: dev-build/ninja/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: cad3542b8b988747e5b5c9a28dfa3650e426ce2c X-VCS-Branch: master Date: Mon, 15 Apr 2024 20:14:18 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 6730dc4e-90e8-45ea-b781-4b95ee22a439 X-Archives-Hash: e406c2f4a5fa53aa49ef564743f32278 commit: cad3542b8b988747e5b5c9a28dfa3650e426ce2c Author: Mike Gilbert gentoo org> AuthorDate: Mon Apr 15 20:05:32 2024 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Mon Apr 15 20:12:30 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cad3542b dev-build/ninja: switch to cmake build system configure.py no longer supports building tests. Using cmake also simplifies cross-compiles. Bug: https://bugs.gentoo.org/929221 Signed-off-by: Mike Gilbert gentoo.org> dev-build/ninja/ninja-9999.ebuild | 66 +++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 38 deletions(-) diff --git a/dev-build/ninja/ninja-9999.ebuild b/dev-build/ninja/ninja-9999.ebuild index 9442eeaecf97..932bf822922b 100644 --- a/dev-build/ninja/ninja-9999.ebuild +++ b/dev-build/ninja/ninja-9999.ebuild @@ -3,9 +3,11 @@ EAPI=8 +CMAKE_IN_SOURCE_BUILD=1 # Simplifies doc build +CMAKE_MAKEFILE_GENERATOR=emake PYTHON_COMPAT=( python3_{10..12} ) -inherit edo bash-completion-r1 python-any-r1 toolchain-funcs +inherit bash-completion-r1 edo cmake python-any-r1 toolchain-funcs if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://github.com/ninja-build/ninja.git" @@ -24,9 +26,9 @@ IUSE="doc test" RESTRICT="!test? ( test )" BDEPEND=" - ${PYTHON_DEPS} dev-util/re2c doc? ( + ${PYTHON_DEPS} app-text/asciidoc app-text/doxygen dev-libs/libxslt @@ -38,42 +40,31 @@ PDEPEND=" app-alternatives/ninja " -PATCHES=( - "${FILESDIR}"/ninja-cflags.patch -) - -run_for_build() { - if tc-is-cross-compiler; then - local -x AR=$(tc-getBUILD_AR) - local -x CXX=$(tc-getBUILD_CXX) - local -x CFLAGS= - local -x CXXFLAGS="${BUILD_CXXFLAGS} -D_FILE_OFFSET_BITS=64" - local -x LDFLAGS=${BUILD_LDFLAGS} - fi - echo "$@" >&2 - "$@" +pkg_setup() { + : } -src_compile() { - tc-export AR CXX - - # configure.py appends CFLAGS to CXXFLAGS - unset CFLAGS - - local -x CXXFLAGS="${CXXFLAGS} -D_FILE_OFFSET_BITS=64" +docs_enabled() { + use doc && ! tc-is-cross-compiler +} - run_for_build ${EPYTHON} configure.py --bootstrap --verbose || die +src_configure() { + local mycmakeargs=( + -DBUILD_TESTING=$(usex test ON OFF) + ) + cmake_src_configure - if tc-is-cross-compiler; then - mv ninja ninja-build || die - ${EPYTHON} configure.py || die - ./ninja-build -v ninja || die - else - ln ninja ninja-build || die + if docs_enabled; then + python_setup + edo ${EPYTHON} configure.py fi +} + +src_compile() { + cmake_src_compile - if use doc; then - ./ninja-build -v doxygen manual || die + if docs_enabled; then + edo ./ninja -v -j1 doxygen manual fi } @@ -81,22 +72,21 @@ src_test() { if ! tc-is-cross-compiler; then # Bug 485772 ulimit -n 2048 - edo ./ninja -v ninja_test - edo ./ninja_test + cmake_src_test fi } src_install() { - dodoc README.md CONTRIBUTING.md + cmake_src_install - if use doc; then + mv "${ED}"/usr/bin/ninja{,-reference} || die + + if docs_enabled; then docinto html dodoc -r doc/doxygen/html/. dodoc doc/manual.html fi - newbin ninja ninja-reference - newbashcomp misc/bash-completion ${PN} insinto /usr/share/vim/vimfiles/syntax/