summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2019-12-20 22:55:46 +0100
committerMichał Górny <mgorny@gentoo.org>2019-12-21 10:14:26 +0100
commitc75df64900c81f3445b2789d7337b81ccd41d076 (patch)
tree00cd998679f3090f70828912092944d266044955 /dev-util
parentdev-util/cmake: Force system jsoncpp since it is using meson now (diff)
downloadgentoo-c75df64900c81f3445b2789d7337b81ccd41d076.tar.gz
gentoo-c75df64900c81f3445b2789d7337b81ccd41d076.tar.bz2
gentoo-c75df64900c81f3445b2789d7337b81ccd41d076.zip
dev-util/cmake: Reuse makeopts_jobs in bootstrap command
Closes: https://github.com/gentoo/gentoo/pull/14068 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-util')
-rw-r--r--dev-util/cmake/cmake-3.16.2-r1.ebuild15
1 files changed, 3 insertions, 12 deletions
diff --git a/dev-util/cmake/cmake-3.16.2-r1.ebuild b/dev-util/cmake/cmake-3.16.2-r1.ebuild
index 6881bf5721c8..061e5b7f8edc 100644
--- a/dev-util/cmake/cmake-3.16.2-r1.ebuild
+++ b/dev-util/cmake/cmake-3.16.2-r1.ebuild
@@ -5,7 +5,8 @@ EAPI=7
CMAKE_MAKEFILE_GENERATOR="emake"
CMAKE_REMOVE_MODULES="no"
-inherit bash-completion-r1 elisp-common flag-o-matic toolchain-funcs virtualx xdg cmake-utils
+inherit bash-completion-r1 elisp-common flag-o-matic multiprocessing \
+ toolchain-funcs virtualx xdg cmake-utils
MY_P="${P/_/-}"
@@ -69,16 +70,6 @@ PATCHES=(
)
cmake_src_bootstrap() {
- # Cleanup args to extract only JOBS.
- # Because bootstrap does not know anything else.
- grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< "${MAKEOPTS}" > /dev/null
- if [[ $? -eq 0 ]] ; then
- par_arg=$(grep -Eo '(\-j|\-\-jobs)(=?|[[:space:]]*)[[:digit:]]+' <<< "${MAKEOPTS}" | tail -n1 | grep -o '[[:digit:]]+')
- par_arg="--parallel=${par_arg}"
- else
- par_arg="--parallel=1"
- fi
-
# disable running of cmake in boostrap command
sed -i \
-e '/"${cmake_bootstrap_dir}\/cmake"/s/^/#DONOTRUN /' \
@@ -95,7 +86,7 @@ cmake_src_bootstrap() {
# bootstrap script isn't exactly /bin/sh compatible
${CONFIG_SHELL:-sh} ./bootstrap \
--prefix="${T}/cmakestrap/" \
- ${par_arg} \
+ --parallel=$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)") \
|| die "Bootstrap failed"
}