Skip to content

Commit

Permalink
dev-util/cmake: use system cmake to build when available
Browse files Browse the repository at this point in the history
Closes: gentoo#2236

Signed-off-by: Lars Wendler <[email protected]>
  • Loading branch information
Lorenzo Porta authored and Lars Wendler committed Sep 8, 2016
1 parent ac8c7b0 commit f3ea28e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions dev-util/cmake/cmake-3.6.2.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit f3ea28e

Please sign in to comment.