Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: Mike Gilbert <floppym@g.o>
Cc: Gentoo Dev <gentoo-dev@l.g.o>
Subject: Re: [gentoo-dev] [PATCH 1/7] xorg-2.eclass: drop autotools-utils
Date: Sun, 17 Apr 2016 16:25:31
Message-Id: 20160417182329.23417ff2.mgorny@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH 1/7] xorg-2.eclass: drop autotools-utils by Mike Gilbert
1 On Sun, 17 Apr 2016 10:45:08 -0400
2 Mike Gilbert <floppym@g.o> wrote:
3
4 > On Sun, Apr 17, 2016 at 10:31 AM, Ian Stakenvicius <axs@g.o> wrote:
5 > >
6 > >
7 > > Sent from an iPhone, sorry for the HTML...
8 > >
9 > >> On Apr 17, 2016, at 10:13 AM, Mike Gilbert <floppym@g.o> wrote:
10 > >>
11 > >> @@ -487,10 +497,17 @@ xorg-2_src_configure() {
12 > >> xorg-2_src_compile() {
13 > >> debug-print-function ${FUNCNAME} "$@"
14 > >>
15 > >> + local makeargs=( "$@" )
16 > >> +
17 > >> if [[ ${XORG_MULTILIB} == yes ]]; then
18 > >> - autotools-multilib_src_compile "$@"
19 > >> + if ! declare -f multilib_src_compile >/dev/null; then
20 > >> + multilib_src_compile() {
21 > >> + emake "${makeargs[@]}"
22 > >> + }
23 > >> + fi
24 > >> + multilib-minimal_src_compile
25 > >> else
26 > >> - autotools-utils_src_compile "$@"
27 > >> + emake "${makeargs[@]}"
28 > >> fi
29 > >> }
30 > >
31 > > Does the src_compile code need to be as complex as this? Why not just a 'if $XORG_MULTILIB ; then multilib-minimal_src_compile "$@"; else emake "$@"; fi '?
32 > >
33 > > ...or even 'default' instead of emake...?
34 >
35 > multilib-mininmal_src_compile and default_src_comple do not provide
36 > any method to pass arguments to emake. If I recall correctly, there is
37 > at least one ebuild that needs to do so.
38
39 I'd say the EAPI approach (employed by multilib-minimal as well) would
40 be to redefine multilib_src_compile() in that ebuild rather than
41 complexifying the generic case.
42
43 --
44 Best regards,
45 Michał Górny
46 <http://dev.gentoo.org/~mgorny/>