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 D16BA158043 for ; Sat, 20 Apr 2024 00:19:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EED63E2A04; Sat, 20 Apr 2024 00:19:49 +0000 (UTC) Received: from smtp.gentoo.org (dev.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 D3B78E2A04 for ; Sat, 20 Apr 2024 00:19:49 +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 9638E3433B3 for ; Sat, 20 Apr 2024 00:19:48 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C627A121B for ; Sat, 20 Apr 2024 00:19:46 +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: <1713572223.d3cec83caf1478a2ac994ac2ca2d149553e61132.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-1.12.0.ebuild 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: d3cec83caf1478a2ac994ac2ca2d149553e61132 X-VCS-Branch: master Date: Sat, 20 Apr 2024 00:19:46 +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: d40e6d9f-8bd7-41c2-b34f-094775d802c9 X-Archives-Hash: 56b8ec415d1932659f661729f0321496 commit: d3cec83caf1478a2ac994ac2ca2d149553e61132 Author: Mike Gilbert gentoo org> AuthorDate: Sat Apr 20 00:17:03 2024 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Sat Apr 20 00:17:03 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d3cec83c dev-build/ninja: switch back to configure.py Using cmake causes a circular dependency via dev-libs/jsoncpp. Signed-off-by: Mike Gilbert gentoo.org> dev-build/ninja/ninja-1.12.0.ebuild | 63 +++++++++++++++++-------------------- dev-build/ninja/ninja-9999.ebuild | 63 +++++++++++++++++-------------------- 2 files changed, 56 insertions(+), 70 deletions(-) diff --git a/dev-build/ninja/ninja-1.12.0.ebuild b/dev-build/ninja/ninja-1.12.0.ebuild index c7a7c9ee0b26..3af9c43f1b06 100644 --- a/dev-build/ninja/ninja-1.12.0.ebuild +++ b/dev-build/ninja/ninja-1.12.0.ebuild @@ -3,10 +3,9 @@ EAPI=8 -CMAKE_MAKEFILE_GENERATOR=emake PYTHON_COMPAT=( python3_{10..12} ) -inherit bash-completion-r1 edo cmake python-any-r1 toolchain-funcs +inherit bash-completion-r1 edo python-any-r1 toolchain-funcs if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://github.com/ninja-build/ninja.git" @@ -21,19 +20,17 @@ HOMEPAGE="https://ninja-build.org/" LICENSE="Apache-2.0" SLOT="0" -IUSE="doc test" -RESTRICT="!test? ( test )" +IUSE="doc" BDEPEND=" + ${PYTHON_DEPS} dev-util/re2c doc? ( - ${PYTHON_DEPS} app-text/asciidoc app-text/doxygen dev-libs/libxslt media-gfx/graphviz ) - test? ( dev-cpp/gtest ) " PDEPEND=" app-alternatives/ninja @@ -43,49 +40,45 @@ pkg_setup() { : } -src_configure() { - local mycmakeargs=( - -DBUILD_TESTING=$(usex test ON OFF) +src_prepare() { + local PATCHES=( + "${FILESDIR}"/ninja-cflags.patch ) - cmake_src_configure + default +} - 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 +bootstrap() { + 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 + edo ${EPYTHON} configure.py --with-python=python --bootstrap --verbose } src_compile() { - cmake_src_compile + python_setup + + tc-export AR CXX + unset CFLAGS + export CXXFLAGS="${CXXFLAGS} -D_FILE_OFFSET_BITS=64" + + bootstrap if use doc; then - if tc-is-cross-compiler; then - local BUILD_DIR=${WORKDIR}/native - cmake_build ninja - fi - edo "${BUILD_DIR}/ninja" -v -j1 doxygen manual + edo ./ninja -v doxygen manual fi -} -src_test() { - if ! tc-is-cross-compiler; then - # Bug 485772 - ulimit -n 2048 - cmake_src_test + if tc-is-cross-compiler; then + edo ${EPYTHON} configure.py --with-python=python + edo ./ninja -v ninja fi } src_install() { - cmake_src_install - - mv "${ED}"/usr/bin/ninja{,-reference} || die + newbin ninja{,-reference} if use doc; then docinto html diff --git a/dev-build/ninja/ninja-9999.ebuild b/dev-build/ninja/ninja-9999.ebuild index c7a7c9ee0b26..3af9c43f1b06 100644 --- a/dev-build/ninja/ninja-9999.ebuild +++ b/dev-build/ninja/ninja-9999.ebuild @@ -3,10 +3,9 @@ EAPI=8 -CMAKE_MAKEFILE_GENERATOR=emake PYTHON_COMPAT=( python3_{10..12} ) -inherit bash-completion-r1 edo cmake python-any-r1 toolchain-funcs +inherit bash-completion-r1 edo python-any-r1 toolchain-funcs if [[ ${PV} == 9999 ]]; then EGIT_REPO_URI="https://github.com/ninja-build/ninja.git" @@ -21,19 +20,17 @@ HOMEPAGE="https://ninja-build.org/" LICENSE="Apache-2.0" SLOT="0" -IUSE="doc test" -RESTRICT="!test? ( test )" +IUSE="doc" BDEPEND=" + ${PYTHON_DEPS} dev-util/re2c doc? ( - ${PYTHON_DEPS} app-text/asciidoc app-text/doxygen dev-libs/libxslt media-gfx/graphviz ) - test? ( dev-cpp/gtest ) " PDEPEND=" app-alternatives/ninja @@ -43,49 +40,45 @@ pkg_setup() { : } -src_configure() { - local mycmakeargs=( - -DBUILD_TESTING=$(usex test ON OFF) +src_prepare() { + local PATCHES=( + "${FILESDIR}"/ninja-cflags.patch ) - cmake_src_configure + default +} - 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 +bootstrap() { + 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 + edo ${EPYTHON} configure.py --with-python=python --bootstrap --verbose } src_compile() { - cmake_src_compile + python_setup + + tc-export AR CXX + unset CFLAGS + export CXXFLAGS="${CXXFLAGS} -D_FILE_OFFSET_BITS=64" + + bootstrap if use doc; then - if tc-is-cross-compiler; then - local BUILD_DIR=${WORKDIR}/native - cmake_build ninja - fi - edo "${BUILD_DIR}/ninja" -v -j1 doxygen manual + edo ./ninja -v doxygen manual fi -} -src_test() { - if ! tc-is-cross-compiler; then - # Bug 485772 - ulimit -n 2048 - cmake_src_test + if tc-is-cross-compiler; then + edo ${EPYTHON} configure.py --with-python=python + edo ./ninja -v ninja fi } src_install() { - cmake_src_install - - mv "${ED}"/usr/bin/ninja{,-reference} || die + newbin ninja{,-reference} if use doc; then docinto html