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 871D9138330 for ; Sat, 26 May 2018 09:39:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 64CB8E0830; Sat, 26 May 2018 09:38:58 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3A922E0830 for ; Sat, 26 May 2018 09:38:58 +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 D2FD2335CB1 for ; Sat, 26 May 2018 09:38:55 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C367F296 for ; Sat, 26 May 2018 09:38:53 +0000 (UTC) From: "Michael Palimaka" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michael Palimaka" Message-ID: <1527327524.a8d5b1da360ab6e7a09bceda8a34d37e2182b963.kensington@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: kensington X-VCS-Committer-Name: Michael Palimaka X-VCS-Revision: a8d5b1da360ab6e7a09bceda8a34d37e2182b963 X-VCS-Branch: master Date: Sat, 26 May 2018 09:38:53 +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: 0346c42c-70e4-4266-b5d3-a9f91ec4fc87 X-Archives-Hash: d459a9029a4eb881518b713a055b46d0 commit: a8d5b1da360ab6e7a09bceda8a34d37e2182b963 Author: Michael Palimaka gentoo org> AuthorDate: Sat May 26 09:37:56 2018 +0000 Commit: Michael Palimaka gentoo org> CommitDate: Sat May 26 09:38:44 2018 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=a8d5b1da cmake-utils.eclass: port has_version usage handle EAPI=7 eclass/cmake-utils.eclass | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass index 558ff3a1ef..1df60398e8 100644 --- a/eclass/cmake-utils.eclass +++ b/eclass/cmake-utils.eclass @@ -226,9 +226,18 @@ _cmake_generator_to_use() { ninja) # if ninja is enabled but not installed, the build could fail # this could happen if ninja is manually enabled (eg. make.conf) but not installed - if ! ROOT=/ has_version dev-util/ninja; then - die "CMAKE_MAKEFILE_GENERATOR is set to ninja, but ninja is not installed. Please install dev-util/ninja or unset CMAKE_MAKEFILE_GENERATOR." - fi + case ${EAPI} in + 5|6) + if ! ROOT=/ has_version dev-util/ninja; then + die "CMAKE_MAKEFILE_GENERATOR is set to ninja, but ninja is not installed. Please install dev-util/ninja or unset CMAKE_MAKEFILE_GENERATOR." + fi + ;; + *) + if ! has_version -b dev-util/ninja; then + die "CMAKE_MAKEFILE_GENERATOR is set to ninja, but ninja is not installed. Please install dev-util/ninja or unset CMAKE_MAKEFILE_GENERATOR." + fi + ;; + esac generator_name="Ninja" ;; emake) @@ -511,11 +520,23 @@ cmake-utils_src_configure() { # Since cmake-3.4.0_rc1 "" no longer contains includes and thus # we need to add "" local includes= + + local has_cmake_340= + case ${EAPI} in + 5|6) + has_cmake_34=$(ROOT=/ has_version \>=dev-util/cmake-3.4.0_rc1) + ;; + *) + has_cmake_34=$(has_version -b \>=dev-util/cmake-3.4.0_rc1) + ;; + esac + + if [[ ${PN} == cmake ]] ; then if $(ver_test $(ver_cut 1-3 ${PV}) -ge 3.4.0) ; then includes="" fi - elif ROOT=/ has_version \>=dev-util/cmake-3.4.0_rc1 ; then + elif [[ ${has_cmake_340} ]]; then includes="" fi cat > "${build_rules}" <<- _EOF_ || die