cmake.eclass: src_prepare: Revert to cmake-utils.eclass behaviour
authorAndreas Sturmlechner <asturm@gentoo.org>
Fri, 3 Jan 2020 21:23:18 +0000 (22:23 +0100)
committerAndreas Sturmlechner <asturm@gentoo.org>
Fri, 3 Jan 2020 21:29:52 +0000 (22:29 +0100)
Re-adding pushd/popd until we figure out how to make it consistent
across the eclass.

Bug: https://bugs.gentoo.org/704524
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
eclass/cmake.eclass

index 93ede2588c8cf1315619f5ff2d104b5e56a08f14..b2b9ae87961308ff117365c351dd88861b59b259 100644 (file)
@@ -294,6 +294,8 @@ _cmake_modify-cmakelists() {
 cmake_src_prepare() {
        debug-print-function ${FUNCNAME} "$@"
 
+       pushd "${S}" > /dev/null || die
+
        default_src_prepare
        _cmake_check_build_dir
 
@@ -327,6 +329,8 @@ cmake_src_prepare() {
        # Remove dangerous things.
        _cmake_modify-cmakelists
 
+       popd > /dev/null || die
+
        # make ${S} read-only in order to detect broken build-systems
        if [[ ${CMAKE_QA_SRC_DIR_READONLY} && ! ${CMAKE_IN_SOURCE_BUILD} ]]; then
                chmod -R a-w "${S}"