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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0F172139695 for ; Sun, 21 May 2017 13:04:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D6D40E0D90; Sun, 21 May 2017 13:04:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id B5B00E0D6F for ; Sun, 21 May 2017 13:04:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 79CB734071C for ; Sun, 21 May 2017 13:04:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1F5977449 for ; Sun, 21 May 2017 13:04:45 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1495371172.b0ed2cfd961a4125106f5485ce9cb3c21031f8d5.asturm@gentoo> Subject: [gentoo-commits] proj/kde:master commit in: eclass/ X-VCS-Repository: proj/kde X-VCS-Files: eclass/cmake-utils.eclass X-VCS-Directories: eclass/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: b0ed2cfd961a4125106f5485ce9cb3c21031f8d5 X-VCS-Branch: master Date: Sun, 21 May 2017 13:04:45 +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-Archives-Salt: 6de624cd-9cb7-4d24-95c6-ed22da93f53f X-Archives-Hash: 23efeaa618fd50cf998984293493c45e commit: b0ed2cfd961a4125106f5485ce9cb3c21031f8d5 Author: Michał Górny gentoo org> AuthorDate: Thu Apr 27 16:39:30 2017 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Sun May 21 12:52:52 2017 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=b0ed2cfd cmake-utils.eclass: Use eninja from ninja-utils eclass/cmake-utils.eclass | 52 +++-------------------------------------------- 1 file changed, 3 insertions(+), 49 deletions(-) diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass index 07f719a62a..2b3c8d933d 100644 --- a/eclass/cmake-utils.eclass +++ b/eclass/cmake-utils.eclass @@ -116,7 +116,8 @@ case ${EAPI} in *) die "EAPI=${EAPI:-0} is not supported" ;; esac -inherit toolchain-funcs multilib flag-o-matic eutils multiprocessing versionator +inherit toolchain-funcs multilib ninja-utils flag-o-matic eutils \ + multiprocessing versionator EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install @@ -680,44 +681,6 @@ enable_cmake-utils_src_compile() { cmake-utils_src_make "$@" } -_ninjaopts_from_makeopts() { - if [[ ${NINJAOPTS+set} == set ]]; then - return 0 - fi - local ninjaopts=() - set -- ${MAKEOPTS} - while (( $# )); do - case $1 in - -j|-l) - if [[ $# -eq 1 || $2 == -* ]]; then - if [[ $1 == -j ]]; then - # absurdly high job limit - ninjaopts+=( $1 9999 ) - else # -l - # remove load limit (like make does for -l) - ninjaopts+=( $1 0 ) - fi - shift 1 - else - ninjaopts+=( $1 $2 ) - shift 2 - fi - ;; - -j*|-l*) - ninjaopts+=( $1 ) - shift 1 - ;; - -k) - # -k 0 = any number of tasks can fail - ninjaopts+=( $1 0 ) - shift 1 - ;; - *) shift ;; - esac - done - export NINJAOPTS="${ninjaopts[*]}" -} - # @FUNCTION: _cmake_ninja_src_make # @INTERNAL # @DESCRIPTION: @@ -727,16 +690,7 @@ _cmake_ninja_src_make() { [[ -e build.ninja ]] || die "build.ninja not found. Error during configure stage." - _ninjaopts_from_makeopts - - if [[ "${CMAKE_VERBOSE}" != "OFF" ]]; then - set -- ninja ${NINJAOPTS} -v "$@" - else - set -- ninja ${NINJAOPTS} "$@" - fi - - echo "$@" - "$@" || die + eninja "$@" } # @FUNCTION: _cmake_emake_src_make