On Thu, 2018-03-29 at 21:14 +0200, Michał Górny wrote:
> Pass the correct docdir for GNUInstallDirs in EAPIs starting with 7.
> We do not need add it retroactively to avoid breaking something
> accidentally.
> ---
>  eclass/cmake-utils.eclass | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass
> index 3302f27608b3..b21822fc03e9 100644
> --- a/eclass/cmake-utils.eclass
> +++ b/eclass/cmake-utils.eclass
> @@ -614,6 +614,12 @@ cmake-utils_src_configure() {
>       _EOF_
>       [[ "${NOCOLOR}" = true || "${NOCOLOR}" = yes ]] && echo 'SET
> (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make"
> FORCE)' >> "${common_config}"
>  
> +     if [[ ${EAPI} != [56] ]]; then
> +             cat >> "${common_config}" <<- _EOF_ || die
> +                     SET (CMAKE_INSTALL_DOCDIR
> "${EPREFIX}/usr/share/doc/${PF}" CACHE PATH "")
> +             _EOF_
> +     fi
> +
>       # Wipe the default optimization flags out of CMake
>       if [[ ${CMAKE_BUILD_TYPE} != Gentoo && ${EAPI} != 5 ]]; then
>               cat >> ${common_config} <<- _EOF_ || die

Consider whether adding the full absolute path is the way we want to
go. Setting CMAKE_INSTALL_DOCDIR to "share/doc/${PF}" should suffice.

Reply via email to