Gentoo Archives: gentoo-dev

From: Michael Palimaka <kensington@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: cmake-utils.eclass: two improvements
Date: Sun, 26 Jul 2015 15:26:18
Message-Id: mp2u6a$i8p$1@ger.gmane.org
In Reply to: [gentoo-dev] cmake-utils.eclass: two improvements by Andrew Savchenko
1 On 26/07/15 19:48, Andrew Savchenko wrote:
2 > Hello all,
3 >
4 > I propose two improvements to cmake-utils eclass:
5 >
6 > 1. Set default documentation directory
7 >
8 > cmake allows to specify default docs installation directory
9 > (analogue of --docdir for configure script), but cmake-utils.eclass
10 > does nothing in this regard and many ebuilds in tree contain the
11 > same duplicated code:
12 >
13 > -DCMAKE_INSTALL_DOCDIR=/usr/share/doc/${PF}
14 >
15 > I propose to add this to the eclass, thus ebuilds can be
16 > simplified. See attached patch.
17
18 I count four packages using this option, with three different values
19 being passed. Use of CMAKE_INSTALL_DOCDIR is not standardised, and may
20 behave unpredictably between different packages.
21
22 >
23 > 2. Disable rpath for non-prefix builds
24 >
25 > cmake allows to disable RPATH linking (enabled by default), this
26 > leads to insecure rpath warning during install phase checks, logs
27 > show that build directory (-Wl,-rpath /var/tmp/portage/...) is
28 > added to linker options.
29 >
30 > Many ebuilds fix this by adding one of the following or similar
31 > options:
32 > -DCMAKE_SKIP_RPATH=ON
33 > -DENABLE_RPATH=OFF
34 > -DCMAKE_BUILD_WITH_INSTALL_RPATH=OFF
35
36 This is usually a workaround for an underlying bug. Plus, this will
37 break any package that legitimately uses rpath.