Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 771876 - cmake.eclass: documentation suggest to use $(cmake_use_with openconnect)
Summary: cmake.eclass: documentation suggest to use $(cmake_use_with openconnect)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-21 11:40 UTC by Joonas Niilola
Modified: 2021-02-21 13:17 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joonas Niilola gentoo-dev 2021-02-21 11:40:42 UTC
Hey, 

cmake.eclass https://devmanual.gentoo.org/eclass-reference/cmake.eclass/index.html says to use $(cmake_use_with openconnect) but in the eclass code it states:
# Banned. Use -DWITH_FOO=$(usex foo) instead.
Comment 1 Andreas Sturmlechner gentoo-dev 2021-02-21 11:43:26 UTC
Outdated example code is outdated, yes.
Comment 2 Andreas Sturmlechner gentoo-dev 2021-02-21 11:49:16 UTC
Suggestion:

> @@ -362,11 +362,11 @@ cmake_src_prepare() {
>  # @DEFAULT_UNSET
>  # @DESCRIPTION:
>  # Optional cmake defines as a bash array. Should be defined before calling
> -# src_configure.
> +# cmake_src_configure.
>  # @CODE
>  # src_configure() {
>  #      local mycmakeargs=(
> -#              $(cmake_use_with openconnect)
> +#              $(cmake_use_find_package foo LibFoo)
>  #      )
>  #
>  #      cmake_src_configure
Comment 4 Larry the Git Cow gentoo-dev 2021-02-21 12:33:27 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/kde.git/commit/?id=47658a3692438894c64329fcfd33ae25ebe4ad74

commit 47658a3692438894c64329fcfd33ae25ebe4ad74
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-02-21 12:30:54 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-02-21 12:33:01 +0000

    cmake.eclass: Merge mycmakeargs description into cmake_src_configure()
    
    Makes it a part of cmake_src_configure() rather than oddly appearing
    under FUNCTIONS.
    
    Bug: https://bugs.gentoo.org/771876
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 eclass/cmake.eclass | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)
Comment 5 Larry the Git Cow gentoo-dev 2021-02-21 13:17:43 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1699972024a11b679220d75b43f884f8f58d813

commit c1699972024a11b679220d75b43f884f8f58d813
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-02-21 11:47:04 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-02-21 13:17:36 +0000

    cmake.eclass: Merge mycmakeargs description into cmake_src_configure()
    
    Fix outdated mycmakeargs documentation (use of banned function in EAPI-7)
    Make it a part of phase function desc than instead of appearing under FUNCTIONS.
    
    Reported-by: Joonas Niilola <juippis@gentoo.org>
    Closes: https://bugs.gentoo.org/771876
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 eclass/cmake.eclass | 19 +++++++------------
 1 file changed, 7 insertions(+), 12 deletions(-)