1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 # @ECLASS: multilib-minimal.eclass
7 # Julian Ospald <hasufell@gentoo.org>
8 # @BLURB: wrapper for multilib builds providing convenient multilib_src_* functions
11 # src_configure, src_compile, src_test and src_install are exported.
13 # Use multilib_src_* instead of src_* which runs this phase for
16 # multilib-minimal should _always_ go last in inherit order!
18 # If you want to use in-source builds, then you must run
19 # multilib_copy_sources at the end of src_prepare!
20 # Also make sure to set correct variables such as
23 # If you need generic install rules, use multilib_src_install_all function.
26 # EAPI=4 is required for meaningful MULTILIB_USEDEP.
29 *) die "EAPI=${EAPI} is not supported" ;;
33 inherit eutils multilib-build
35 EXPORT_FUNCTIONS src_configure src_compile src_test src_install
38 multilib-minimal_src_configure() {
39 debug-print-function ${FUNCNAME} "$@"
41 multilib-minimal_abi_src_configure() {
42 debug-print-function ${FUNCNAME} "$@"
44 mkdir -p "${BUILD_DIR}" || die
45 pushd "${BUILD_DIR}" >/dev/null || die
46 if declare -f multilib_src_configure >/dev/null ; then
47 multilib_src_configure
51 popd >/dev/null || die
54 multilib_foreach_abi multilib-minimal_abi_src_configure
57 multilib-minimal_src_compile() {
58 debug-print-function ${FUNCNAME} "$@"
60 multilib-minimal_abi_src_compile() {
61 debug-print-function ${FUNCNAME} "$@"
63 pushd "${BUILD_DIR}" >/dev/null || die
64 if declare -f multilib_src_compile >/dev/null ; then
69 popd >/dev/null || die
72 multilib_foreach_abi multilib-minimal_abi_src_compile
75 multilib-minimal_src_test() {
76 debug-print-function ${FUNCNAME} "$@"
78 multilib-minimal_abi_src_test() {
79 debug-print-function ${FUNCNAME} "$@"
81 pushd "${BUILD_DIR}" >/dev/null || die
82 if declare -f multilib_src_test >/dev/null ; then
87 popd >/dev/null || die
90 multilib_foreach_abi multilib-minimal_abi_src_test
93 multilib-minimal_src_install() {
94 debug-print-function ${FUNCNAME} "$@"
96 multilib-minimal_abi_src_install() {
97 debug-print-function ${FUNCNAME} "$@"
99 pushd "${BUILD_DIR}" >/dev/null || die
100 if declare -f multilib_src_install >/dev/null ; then
103 # default_src_install will not work here as it will
104 # break handling of DOCS wrt #468092
105 # so we split up the emake and doc-install part
106 # this is synced with __eapi4_src_install
107 if [[ -f Makefile || -f GNUmakefile || -f makefile ]] ; then
108 emake DESTDIR="${D}" install
112 multilib_prepare_wrappers
113 multilib_check_headers
114 popd >/dev/null || die
116 multilib_foreach_abi multilib-minimal_abi_src_install
117 multilib_install_wrappers
119 if declare -f multilib_src_install_all >/dev/null ; then
120 multilib_src_install_all