1 |
W dniu pon, 02.04.2018 o godzinie 16∶13 +0200, użytkownik David Seifert |
2 |
napisał: |
3 |
> On Thu, 2018-03-29 at 21:14 +0200, Michał Górny wrote: |
4 |
> > Pass the correct docdir for GNUInstallDirs in EAPIs starting with 7. |
5 |
> > We do not need add it retroactively to avoid breaking something |
6 |
> > accidentally. |
7 |
> > --- |
8 |
> > eclass/cmake-utils.eclass | 6 ++++++ |
9 |
> > 1 file changed, 6 insertions(+) |
10 |
> > |
11 |
> > diff --git a/eclass/cmake-utils.eclass b/eclass/cmake-utils.eclass |
12 |
> > index 3302f27608b3..b21822fc03e9 100644 |
13 |
> > --- a/eclass/cmake-utils.eclass |
14 |
> > +++ b/eclass/cmake-utils.eclass |
15 |
> > @@ -614,6 +614,12 @@ cmake-utils_src_configure() { |
16 |
> > _EOF_ |
17 |
> > [[ "${NOCOLOR}" = true || "${NOCOLOR}" = yes ]] && echo 'SET |
18 |
> > (CMAKE_COLOR_MAKEFILE OFF CACHE BOOL "pretty colors during make" |
19 |
> > FORCE)' >> "${common_config}" |
20 |
> > |
21 |
> > + if [[ ${EAPI} != [56] ]]; then |
22 |
> > + cat >> "${common_config}" <<- _EOF_ || die |
23 |
> > + SET (CMAKE_INSTALL_DOCDIR |
24 |
> > "${EPREFIX}/usr/share/doc/${PF}" CACHE PATH "") |
25 |
> > + _EOF_ |
26 |
> > + fi |
27 |
> > + |
28 |
> > # Wipe the default optimization flags out of CMake |
29 |
> > if [[ ${CMAKE_BUILD_TYPE} != Gentoo && ${EAPI} != 5 ]]; then |
30 |
> > cat >> ${common_config} <<- _EOF_ || die |
31 |
> |
32 |
> Consider whether adding the full absolute path is the way we want to |
33 |
> go. Setting CMAKE_INSTALL_DOCDIR to "share/doc/${PF}" should suffice. |
34 |
> |
35 |
|
36 |
I was actually thinking about it (and few other things). I've went with |
37 |
full path for two reasons: |
38 |
|
39 |
a. that's what PMS does for econf, |
40 |
|
41 |
b. and more importantly, it means that when people need to override |
42 |
install prefix (e.g. install to / or /opt/foo), we will still use |
43 |
the correct docdir as defined by Gentoo policy. |
44 |
|
45 |
-- |
46 |
Best regards, |
47 |
Michał Górny |