From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-900470-garchives=archives.gentoo.org@lists.gentoo.org>
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 CACDF138331
	for <garchives@archives.gentoo.org>; Thu,  8 Sep 2016 13:13:07 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id AED1721C038;
	Thu,  8 Sep 2016 13:13:03 +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 22645E0B07
	for <gentoo-commits@lists.gentoo.org>; Thu,  8 Sep 2016 13:13:03 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id A71563408F0
	for <gentoo-commits@lists.gentoo.org>; Thu,  8 Sep 2016 13:13:01 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id B3CCF247D
	for <gentoo-commits@lists.gentoo.org>; Thu,  8 Sep 2016 13:12:59 +0000 (UTC)
From: "Lars Wendler" <polynomial-c@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Lars Wendler" <polynomial-c@gentoo.org>
Message-ID: <1473340370.f3ea28e90b802e13b2f02e439751bd3b8efc79f2.polynomial-c@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/cmake/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-util/cmake/cmake-3.6.2.ebuild
X-VCS-Directories: dev-util/cmake/
X-VCS-Committer: polynomial-c
X-VCS-Committer-Name: Lars Wendler
X-VCS-Revision: f3ea28e90b802e13b2f02e439751bd3b8efc79f2
X-VCS-Branch: master
Date: Thu,  8 Sep 2016 13:12:59 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 18a56c65-d434-4bab-901a-ef12b1e036ef
X-Archives-Hash: 334d183cbff14e1972a07a1bab10d101

commit:     f3ea28e90b802e13b2f02e439751bd3b8efc79f2
Author:     Lorenzo Porta <vindex17 <AT> outlook <DOT> it>
AuthorDate: Sun Sep  4 13:38:41 2016 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Sep  8 13:12:50 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f3ea28e9

dev-util/cmake: use system cmake to build when available

Closes: https://github.com/gentoo/gentoo/pull/2236

Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 dev-util/cmake/cmake-3.6.2.ebuild | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/dev-util/cmake/cmake-3.6.2.ebuild b/dev-util/cmake/cmake-3.6.2.ebuild
index aded1dc..afc6671 100644
--- a/dev-util/cmake/cmake-3.6.2.ebuild
+++ b/dev-util/cmake/cmake-3.6.2.ebuild
@@ -45,8 +45,6 @@ S="${WORKDIR}/${MY_P}"
 
 SITEFILE="50${PN}-gentoo.el"
 
-CMAKE_BINARY="${S}/Bootstrap.cmk/cmake"
-
 PATCHES=(
 	# prefix
 	"${FILESDIR}"/${PN}-3.4.0_rc1-darwin-bundle.patch
@@ -79,6 +77,11 @@ cmake_src_bootstrap() {
 		par_arg="--parallel=1"
 	fi
 
+	# disable running of cmake in boostrap command
+	sed -i \
+		-e '/"${cmake_bootstrap_dir}\/cmake"/s/^/#DONOTRUN /' \
+		bootstrap || die "sed failed"
+
 	# execinfo.h on Solaris isn't quite what it is on Darwin
 	if [[ ${CHOST} == *-solaris* ]] ; then
 		sed -i -e 's/execinfo\.h/blablabla.h/' Source/kwsys/CMakeLists.txt || die
@@ -122,18 +125,15 @@ cmake_src_test() {
 src_prepare() {
 	cmake-utils_src_prepare
 
-	# disable running of cmake in boostrap command
-	sed -i \
-		-e '/"${cmake_bootstrap_dir}\/cmake"/s/^/#DONOTRUN /' \
-		bootstrap || die "sed failed"
-
 	# Add gcc libs to the default link paths
 	sed -i \
 		-e "s|@GENTOO_PORTAGE_GCCLIBDIR@|${EPREFIX}/usr/${CHOST}/lib/|g" \
 		-e "s|@GENTOO_PORTAGE_EPREFIX@|${EPREFIX}/|g" \
 		Modules/Platform/{UnixPaths,Darwin}.cmake || die "sed failed"
-
-	cmake_src_bootstrap
+	if ! has_version ${CATEGORY}/${PN}; then
+		CMAKE_BINARY="${S}/Bootstrap.cmk/cmake"
+		cmake_src_bootstrap
+	fi
 }
 
 src_configure() {