Gentoo Archives: gentoo-dev

From: Michael Orlitzky <mjo@g.o>
To: gentoo-dev@l.g.o
Cc: a.m@××××××××.hu
Subject: [gentoo-dev] Re: [PATCH] netsurf.eclass: remove EROOT from PREFIX
Date: Tue, 16 Jun 2020 15:23:54
Message-Id: 857910b8-7335-0ae9-2b43-03bb89543213@gentoo.org
1 On 2020-06-14 16:30, a.m@××××××××.hu wrote:
2 >
3 > Suggested fix for: https://bugs.gentoo.org/show_bug.cgi?id=489542
4 > Bug 489542 - netsurf.eclass should not include EROOT in PREFIX
5 >
6
7 Well, I've applied this as well as some other fixes for the eclass, only
8 to find that the problem has been relocated from netsurf.eclass into
9 /usr/share/netsurf-buildsystem/gentoo-helpers.sh (which it looks like is
10 just an out-of-tree eclass?).
11
12 There are only two ebuilds left in the tree using netsurf.eclass:
13
14 * dev-libs/libparserutils-0.2.3 (superseded by v0.2.4-r1)
15 * net-libs/libhubbub-0.3.3 (superseded by v0.3.6)
16
17 The first one needs a stabilization, but then the old versions can be
18 removed and netsurf.eclass can be last-rited. That leaves us with a
19 similar problem in gentoo-helpers.sh, which does...
20
21 NSSHARED="${EROOT}"/usr/share/netsurf-buildsystem
22 LIBDIR="$(get_libdir)"
23 PREFIX="${EROOT}/usr"
24
25 Digging into the netsurf buildsystem it looks like PREFIX is already
26 pre/appended to the uses of NSSHARED and DESTDIR. So I think we should
27 have instead,
28
29 LIBDIR="$(get_libdir)"
30 PREFIX="${EPREFIX}/usr"
31
32 and then the ebuilds themselves need to be fixed. For example,
33
34 _emake TARGET=framebuffer DESTDIR="${ED}" install
35
36 should have DESTDIR="${D}" instead, because the buildsystem already
37 installs to $(DESTDIR)$(PREFIX). As it is, you're getting the "E" twice.
38
39 Removing the EROOT (as in the proposed patch) would also fix this, but
40 the standard pattern for ebuilds is to use the "E" variables at
41 configure-time, and only $D at install-time.