Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 602470 Details for
Bug 704524
cmake.eclass: Use current working directory instead of ${S} when initializing ${CMAKE_USE_DIR} and ${BUILD_DIR}
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
cmake.eclass.patch (text/plain), 4.17 KB, created by
Arfrever Frehtes Taifersar Arahesis
on 2020-01-04 03:59:49 UTC
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Arfrever Frehtes Taifersar Arahesis
Created:
2020-01-04 03:59:49 UTC
Size:
4.17 KB
patch
obsolete
>From 31e034d87b244b380bd91d46119c4e0a1dba0a09 Mon Sep 17 00:00:00 2001 >From: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> >Date: Sat, 4 Jan 2020 03:56:36 +0000 >Subject: [PATCH] cmake.eclass: Use current working directory instead of ${S} > when initializing ${CMAKE_USE_DIR} and ${BUILD_DIR}. > >Closes: https://bugs.gentoo.org/704524 >Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> >--- > eclass/cmake.eclass | 34 +++++++++++++++++----------------- > 1 file changed, 17 insertions(+), 17 deletions(-) > >diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass >index b2b9ae87961..faa71c38106 100644 >--- a/eclass/cmake.eclass >+++ b/eclass/cmake.eclass >@@ -1,4 +1,4 @@ >-# Copyright 1999-2019 Gentoo Authors >+# Copyright 1999-2020 Gentoo Authors > # Distributed under the terms of the GNU General Public License v2 > > # @ECLASS: cmake.eclass >@@ -25,8 +25,7 @@ _CMAKE_ECLASS=1 > # Build directory where all cmake processed files should be generated. > # For in-source build it's fixed to ${CMAKE_USE_DIR}. > # For out-of-source build it can be overridden, by default it uses >-# ${WORKDIR}/${P}_build. >-: ${BUILD_DIR:=${WORKDIR}/${P}_build} >+# ${CMAKE_USE_DIR}_build. > > # @ECLASS-VARIABLE: CMAKE_BINARY > # @DESCRIPTION: >@@ -57,8 +56,8 @@ _CMAKE_ECLASS=1 > > # @ECLASS-VARIABLE: CMAKE_REMOVE_MODULES_LIST > # @DESCRIPTION: >-# Array of CMake modules that will be removed in $S during src_prepare, >-# in order to force packages to use the system version. >+# Array of CMake modules that will be removed in ${CMAKE_USE_DIR} during >+# src_prepare, in order to force packages to use the system version. > # Set to "none" to disable removing modules entirely. > : ${CMAKE_REMOVE_MODULES_LIST:=FindBLAS FindLAPACK} > >@@ -66,7 +65,7 @@ _CMAKE_ECLASS=1 > # @DESCRIPTION: > # Sets the directory where we are working with cmake, for example when > # application uses autotools and only one plugin needs to be done by cmake. >-# By default it uses ${S}. >+# By default it uses current working directory. > > # @ECLASS-VARIABLE: CMAKE_VERBOSE > # @DESCRIPTION: >@@ -90,7 +89,7 @@ _CMAKE_ECLASS=1 > # @ECLASS-VARIABLE: CMAKE_QA_SRC_DIR_READONLY > # @DEFAULT_UNSET > # @DESCRIPTION: >-# After running cmake_src_prepare, sets ${S} to read-only. This is >+# After running cmake_src_prepare, sets ${CMAKE_USE_DIR} to read-only. This is > # a user flag and should under _no circumstances_ be set in the ebuild. > # Helps in improving QA of build systems that write to source tree. > >@@ -137,14 +136,18 @@ _cmake_banned_func() { > > # Determine using IN or OUT source build > _cmake_check_build_dir() { >- : ${CMAKE_USE_DIR:=${S}} >+ : ${CMAKE_USE_DIR:=$(pwd)} > if [[ -n ${CMAKE_IN_SOURCE_BUILD} ]]; then > # we build in source dir > BUILD_DIR="${CMAKE_USE_DIR}" >+ else >+ : ${BUILD_DIR:=${CMAKE_USE_DIR}_build} > fi > >+ einfo "Source directory (CMAKE_USE_DIR): \"${CMAKE_USE_DIR}\"" >+ einfo "Build directory (BUILD_DIR): \"${BUILD_DIR}\"" >+ > mkdir -p "${BUILD_DIR}" || die >- einfo "Working in BUILD_DIR: \"$BUILD_DIR\"" > } > > # @FUNCTION: cmake_comment_add_subdirectory >@@ -294,10 +297,9 @@ _cmake_modify-cmakelists() { > cmake_src_prepare() { > debug-print-function ${FUNCNAME} "$@" > >- pushd "${S}" > /dev/null || die >+ _cmake_check_build_dir > > default_src_prepare >- _cmake_check_build_dir > > # check if CMakeLists.txt exist and if no then die > if [[ ! -e ${CMAKE_USE_DIR}/CMakeLists.txt ]] ; then >@@ -323,17 +325,15 @@ cmake_src_prepare() { > > local name > for name in "${modules_list[@]}" ; do >- find "${S}" -name ${name}.cmake -exec rm -v {} + || die >+ find -name "${name}.cmake" -exec rm -v {} + || die > done > > # Remove dangerous things. > _cmake_modify-cmakelists > >- popd > /dev/null || die >- >- # make ${S} read-only in order to detect broken build-systems >+ # Make ${CMAKE_USE_DIR} 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}" >+ chmod -R a-w "${CMAKE_USE_DIR}" > fi > > _CMAKE_SRC_PREPARE_HAS_RUN=1 >@@ -634,7 +634,7 @@ cmake_src_install() { > die "died running ${CMAKE_MAKEFILE_GENERATOR} install" > popd > /dev/null || die > >- pushd "${S}" > /dev/null || die >+ pushd "${CMAKE_USE_DIR}" > /dev/null || die > einstalldocs > popd > /dev/null || die > } >-- >2.24.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 704524
:
602312
| 602470