• [PATCH v2 3/4] cmake.eclass: Enable CMAKE_INSTALL_ALWAYS

    From Andreas Sturmlechner@21:1/5 to All on Wed Sep 1 19:59:50 2021
    Bug: https://bugs.gentoo.org/735820
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
    ---
    eclass/cmake.eclass | 5 +++++
    1 file changed, 5 insertions(+)

    diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass
    index 7a8059ba071..4203b9364cc 100644
    --- a/eclass/cmake.eclass
    +++ b/eclass/cmake.eclass
    @@ -535,6 +535,11 @@ cmake_src_configure() {
    echo 'set(CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" FORCE)' >> "${common_config}" || die
    fi

    + # See bug 735820
    + if [[ ${EAPI} != 7 ]]; then
    + echo 'set(CMAKE_INSTALL_ALWAYS 1)' >> "${common_config}" || die + fi
    +
    # Wipe the default optimization flags out of CMake
    if [[ ${CMAKE_BUILD_TYPE} != Gentoo ]]; then
    cat >> ${common_config} <<- _EOF_ || die
    --
    2.33.0


    -----BEGIN PGP SIGNATURE-----

    iQGTBAABCgB9FiEEexlipVqzuLtTjHMOREsPlv/SLMsFAmEvv5ZfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDdC MTk2MkE1NUFCM0I4QkI1MzhDNzMwRTQ0NEIwRjk2RkZEMjJDQ0IACgkQREsPlv/S LMtWawf8C+p+fqwX/pW6t5NPfKPpc6lBxZWm7MvlZBH8XxlwNXa0tmGyU8PdY1XB D7ToZiATHwP1H3yXfAI5QZVNrbZSnpDRC92/8qqA175C/
  • From Andreas Sturmlechner@21:1/5 to All on Wed Sep 1 20:00:50 2021
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
    ---
    eclass/cmake.eclass | 11 ++++++++---
    1 file changed, 8 insertions(+), 3 deletions(-)

    diff --git a/eclass/cmake.eclass b/eclass/cmake.eclass
    index 4203b9364cc..42a6f95201a 100644
    --- a/eclass/cmake.eclass
    +++ b/eclass/cmake.eclass
    @@ -42,14 +42,19 @@ inherit flag-o-matic multiprocessing ninja-utils toolchain-funcs xdg-utils
    # Eclass can use different cmake binary than the one provided in by system.
    : ${CMAKE_BINARY:=cmake}

    +[[ ${EAPI} == 7 ]] && : ${CMAKE_BUILD_TYPE:=Gentoo}
    # @ECLASS-VARIABLE: CMAKE_BUILD_TYPE
    # @DESCRIPTION:
    # Set to override default CMAKE_BUILD_TYPE. Only useful for packages
    # known to make use of "if (CMAKE_BUILD_TYPE MATCHES xxx)".
    # If about to be set - needs to be set before invoking cmake_src_configure.
    -# You usually do *NOT* want nor need to set it as it pulls CMake default
    -# build-type specific compiler flags overriding make.conf.
    -: ${CMAKE_BUILD_TYPE:=Gentoo}
    +#
    +# The default is RelWithDebInfo as that is least likely to append undesirable +