diff options
author | Gregory M. Tuner <gmt@be-evil.net> | 2014-01-19 03:12:17 -0800 |
---|---|---|
committer | Gregory M. Tuner <gmt@be-evil.net> | 2014-01-19 03:12:17 -0800 |
commit | 83899b142b4771b760de80a5ec439e4cd36a7d0a (patch) | |
tree | 6610e7b31ebd69ce7e616478285cb2de1da2af34 /eclass/multilib-minimal.eclass | |
parent | media-libs/libquicktime: multilib-utize (diff) | |
download | gmt-83899b142b4771b760de80a5ec439e4cd36a7d0a.tar.gz gmt-83899b142b4771b760de80a5ec439e4cd36a7d0a.tar.bz2 gmt-83899b142b4771b760de80a5ec439e4cd36a7d0a.zip |
eclass/multilib-minimal: argument parsing, remove deprecated features, in-source-doc edits
Signed-off-by: Gregory M. Tuner <gmt@be-evil.net>
Diffstat (limited to 'eclass/multilib-minimal.eclass')
-rw-r--r-- | eclass/multilib-minimal.eclass | 80 |
1 files changed, 31 insertions, 49 deletions
diff --git a/eclass/multilib-minimal.eclass b/eclass/multilib-minimal.eclass index 50b3015..ba3ee40 100644 --- a/eclass/multilib-minimal.eclass +++ b/eclass/multilib-minimal.eclass @@ -90,36 +90,24 @@ # as out-of-tree builds will not be building in the same directory as # the configure script. # -# Non-abi-specific functionality is accomodated by an additional -# set of callbacks, the multilib_<phase>_all functions. -# -# multilib_<phase>_all is called once only, after the per-ABI -# multilib_src_<phase> functions complete, with BUILD_DIR and -# the current working directory set to the same values as they -# were when multilib-minimal_<phase> was invoked. -# mutilib_src_configure is an exception; it runs before the -# per-ABI configure steps. Consumers may also implement their -# own phase functions, and invoke multilib-minimal_<phase> -# directly; doing so is mostly equivalent to -# implementing multilib_src_<phase>_all, although it may result -# in more confusing code. +# Non-abi-specific installation functionality is accomodated by an +# additional 'bonus' callback: multilib_src_install_all. +# multilib_src_install_all is called once only, after the per-ABI +# multilib_src_install functions complete, with BUILD_DIR and +# the current working directory unchanged from that of the calling +# scope. It is also perfectly acceptable -- and, indeed, slightly +# more powerful, to implement src_install, and call +# multilib-minimal_src_install from there -- the two approaches +# are roughly identical. # # EAPI >= 4 is required by multilib minimial, as without it, # the ${MULTILIB_USEDEP} variable cannot be correctly implemented. # -# Note: inheritance order matters when inheriting from multiple -# eclasses. In particular, it is important to understand that the -# first inherited eclass on the list is the one whose phase -# functions get wired up to the defaults; if it does not provide -# an implementation, then the next (in a depthwise-recursive manner) is -# afforded the opportunity, and so-forth, down the line. Therefore, -# if you inherit both from a framework eclass and multilib-minimal, -# and multilib-minimal comes after the framework eclass on the -# inheritance list, you will get the framework eclass phase-function -# implementations, if present, possibly making your inheritance -# from multilib-minimal, and any implementations of the -# multilib_<phase> callbacks, into a noop. For this reason, -# it is often best to put multilib-minimal first on the inherits list. +# Note: always put multilib-minimal last on the inherits list, +# unless you have a really, really good reason not to. No magic +# will happen if some other ebuild overrides multilib-minimal's +# phase functions and that can result in a big, ugly mess for your +# ebuild. case ${EAPI:-0} in 4|5) ;; @@ -207,21 +195,20 @@ multilib-minimal_src_configure() { mkdir -p "${BUILD_DIR}" || die pushd "${BUILD_DIR}" >/dev/null || die if declare -f multilib_src_configure >/dev/null ; then - multilib_src_configure + multilib_src_configure "$@" else - default_src_configure + # like default_src_configure but pass arguments + if [[ -x ${ECONF_SOURCE:-.}/configure ]] ; then + econf "$@" + fi fi popd >/dev/null || die } - if declare -f multilib_src_configure_all > /dev/null ; then - multilib_src_configure_all - fi - if has src_configure ${MULTILIB_PARALLEL_PHASES} ; then - multilib_parallel_foreach_abi multilib-minimal_abi_src_configure + multilib_parallel_foreach_abi multilib-minimal_abi_src_configure "$@" else - multilib_foreach_abi multilib-minimal_abi_src_configure + multilib_foreach_abi multilib-minimal_abi_src_configure "$@" fi } @@ -233,21 +220,20 @@ multilib-minimal_src_compile() { pushd "${BUILD_DIR}" >/dev/null || die if declare -f multilib_src_compile >/dev/null ; then - multilib_src_compile + multilib_src_compile "$@" else - default_src_compile + # like __eapi2_src_compile, but with argument passing... + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then + emake "$@" || die "emake failed" + fi fi popd >/dev/null || die } if has src_compile ${MULTILIB_PARALLEL_PHASES} ; then - multilib_parallel_foreach_abi multilib-minimal_abi_src_compile + multilib_parallel_foreach_abi multilib-minimal_abi_src_compile "$@" else - multilib_foreach_abi multilib-minimal_abi_src_compile - fi - - if declare -f multilib_src_compile_all > /dev/null ; then - multilib_src_compile_all + multilib_foreach_abi multilib-minimal_abi_src_compile "$@" fi } @@ -271,10 +257,6 @@ multilib-minimal_src_test() { else multilib_foreach_abi multilib-minimal_abi_src_test fi - - if declare -f multilib_src_test_all >/dev/null ; then - multilib_src_test_all - fi } multilib-minimal_src_install() { @@ -285,14 +267,14 @@ multilib-minimal_src_install() { pushd "${BUILD_DIR}" >/dev/null || die if declare -f multilib_src_install >/dev/null ; then - multilib_src_install + multilib_src_install "$@" else # default_src_install will not work here as it will # break handling of DOCS wrt #468092 # so we split up the emake and doc-install part # this is synced with __eapi4_src_install if [[ -f Makefile || -f GNUmakefile || -f makefile ]] ; then - emake DESTDIR="${D}" install + emake DESTDIR="${D}" install "$@" fi fi @@ -305,7 +287,7 @@ multilib-minimal_src_install() { fi popd >/dev/null || die } - multilib_foreach_abi multilib-minimal_abi_src_install + multilib_foreach_abi multilib-minimal_abi_src_install "$@" [[ ${MULTILIB_INSECURE_INSTALL} ]] || multilib_install_wrappers |