config.setcpv: fix bug #522362

Fix config.setcpv to regenerate USE settings in order to account for
package.env USE settings from the previous package instance.

X-Gentoo-Bug: 522362
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=522362
Acked-by: Alexander Berntsen <bernalex@gentoo.org>
Acked-by: Brian Dolbec <dolsen@gentoo.org>
Run distcc-pump server throughout src_configure() to src_install()

Start distcc-pump server in all phases throughout src_configure() to
src_install() rather than in src_compile() alone. Since each of those
phases may involve some compilations, we should try to take full
advantage of distcc in all of them. Moreover, this silences distcc
warnings about being unable to connect to the server when compiling.

Fixes: https://bugs.gentoo.org/show_bug.cgi?id=507482
Output uniform status message before and after src_test()

Output the status messages before and after running src_test()
unconditionally, alike it is done for other src_* phase functions,
rather than in EAPI-default src_test() function. This fixes the issue of
test phase output lacking delimitation whenever a custom src_test()
function was used.
repoman: Do not check for indirect inherits of deprecated eclasses

Complain only about deprecated eclasses that are inherited directly.
Checking indirectly inherited eclasses is pointless since the ebuild
maintainer can't really do anything about it --- it is up to
the maintainer of one of the directly inherited eclasses.
econf: Replace unnecessary 'case' statements with 'if's

Replace the 'case' statements used to match 'configure' output with
simpler pattern-matching 'if's.

Acked-by: Alexander Berntsen <bernalex@gentoo.org>
econf: Add EAPI-conditional arguments via array

Use a dedicated array variable to add EAPI-conditional arguments to
the configure script instead of prepending them to the command
parameters.
Fix off-by-one error in supported EAPI list

Fix the off-by-one error in construction of supported EAPI list that
resulted in EAPI 5 being considered unsupported.
Make eapi_is_supported() reuse _supported_eapis list

Make the eapi_is_supported() function use the generated list of
supported EAPIs rather than partial lists and integer comparison.
Rewrite default ebuild phase setting code

Replace the ebuild phase setting code for EAPI 2 and newer with a
simpler approach; first set proper default_* functions, and call them
within the phase. Disallow calling default_* for other phase functions
than the one being run.
Apply 'nonfatal' to helpers only

Make 'nonfatal' modifier affect helpers only rather than disabling 'die'
completely. This improves the PMS conformance.
Support EAPI=6_pre1 for testing EAPI6 features
Add tentative support for EAPI6 --docdir and --htmldir

Pass --docdir and --htmldir to configure scripts that support it.
Add tentative support for EAPI6 get_libdir()

Add get_libdir() function to obtain the basename of libdir using
the same algorithm that econf uses.
Add tentative support for EAPI6 einstalldocs function

Add the einstalldocs function to conveniently install documentation
using the default patterns or DOCS and HTML_DOCS variables.
Add tentative support for EAPI6 eapply function

Add the eapply patch applying function.
Add tentative support for EAPI6 eapply_user function

Add support for the user patch applying function.
Enable tentative EAPI6 failglob in global scope

Enable failglob in global scope to catch unintended globbing attempts
including unescaped special uses of '*'.
Enable tentative support for EAPI6 profile-level directories

Enable the support for package.* and use.* directories on profile and
repository level.
Add tentative EAPI6 .txz unpack support

Support unpacking .txz-suffixed archives.
Add tentative EAPI6 absolute path support to unpack()

Add support for absolute paths in unpack(). Allow subdirectory-level
relative paths not to start with './'.