out-of-source.eclass: A new eclass to help with out-of-source builds
authorMichał Górny <mgorny@gentoo.org>
Sat, 12 Aug 2017 22:15:48 +0000 (00:15 +0200)
committerMichał Górny <mgorny@gentoo.org>
Mon, 20 Nov 2017 17:34:02 +0000 (18:34 +0100)
commit333acdfca16e2dfef81f65ddc6fce8e91405b8ac
tree74b931ffe21f429947783f41699ef108abf67870
parent3f117c251ede0064de4320050bd9e272da5065a3
out-of-source.eclass: A new eclass to help with out-of-source builds

The out-of-source.eclass is a simple multilib-minimal-style wrapper
to perform out of source builds of autotools (and other) packages. It is
mostly derived from the function served in the past by autotools-utils
since a number of developers found it useful. However, in order to avoid
the mistakes of autotools-utils, it is meant to be focused on a single
feature and have a better API.

This eclass has two use cases:

1. Ensuring that packages are tested with out-of-source builds.

2. Improving consistency between multilib and non-multilib packages.

In the most basic form, it just redefines the phases from src_configure()
to src_install() with out-of-source wrappers. However, each phase can
be overriden using my_src_*() sub-phase that is run inside build dir
(alike multilib_src_*() in multilib-minimal). There is also
my_src_install_all() for the trailing source-dir actions.
eclass/out-of-source.eclass [new file with mode: 0644]