public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] cmake-utils.eclass: Override CMAKE_INSTALL_DOCDIR in EAPI 7
@ 2018-03-29 19:14 Michał Górny
  2018-04-02 14:13 ` David Seifert
  0 siblings, 1 reply; 3+ messages in thread
From: Michał Górny @ 2018-03-29 19:14 UTC (permalink / raw)
  To: gentoo-dev; +Cc: Michał Górny

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
-- 
2.17.0.rc1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [gentoo-dev] [PATCH] cmake-utils.eclass: Override CMAKE_INSTALL_DOCDIR in EAPI 7
  2018-03-29 19:14 [gentoo-dev] [PATCH] cmake-utils.eclass: Override CMAKE_INSTALL_DOCDIR in EAPI 7 Michał Górny
@ 2018-04-02 14:13 ` David Seifert
  2018-04-02 20:26   ` Michał Górny
  0 siblings, 1 reply; 3+ messages in thread
From: David Seifert @ 2018-04-02 14:13 UTC (permalink / raw)
  To: gentoo-dev; +Cc: Michał Górny

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [gentoo-dev] [PATCH] cmake-utils.eclass: Override CMAKE_INSTALL_DOCDIR in EAPI 7
  2018-04-02 14:13 ` David Seifert
@ 2018-04-02 20:26   ` Michał Górny
  0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2018-04-02 20:26 UTC (permalink / raw)
  To: gentoo-dev

W dniu pon, 02.04.2018 o godzinie 16∶13 +0200, użytkownik David Seifert
napisał:
> 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.
> 

I was actually thinking about it (and few other things). I've went with
full path for two reasons:

a. that's what PMS does for econf,

b. and more importantly, it means that when people need to override
install prefix (e.g. install to / or /opt/foo), we will still use
the correct docdir as defined by Gentoo policy.

-- 
Best regards,
Michał Górny



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-04-02 20:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-29 19:14 [gentoo-dev] [PATCH] cmake-utils.eclass: Override CMAKE_INSTALL_DOCDIR in EAPI 7 Michał Górny
2018-04-02 14:13 ` David Seifert
2018-04-02 20:26   ` Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox