/[gentoo-x86]/eclass/multilib-minimal.eclass
Gentoo

Contents of /eclass/multilib-minimal.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Sun Apr 7 16:56:14 2013 UTC (15 months ago) by mgorny
Branch: MAIN
Changes since 1.1: +3 -1 lines
Move header wrapping to multilib-build. Use the new code in autotools-multilib and multilib-minimal.

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/multilib-minimal.eclass,v 1.1 2013/03/09 20:33:29 hasufell Exp $
4
5 # @ECLASS: multilib-minimal.eclass
6 # @MAINTAINER:
7 # Julian Ospald <hasufell@gentoo.org>
8 # @BLURB: wrapper for multilib builds providing convenient multilib_src_* functions
9 # @DESCRIPTION:
10 #
11 # src_configure, src_compile, src_test and src_install are exported.
12 #
13 # Use multilib_src_* instead of src_* which runs this phase for
14 # all enabled ABIs.
15 #
16 # multilib-minimal should _always_ go last in inherit order!
17 #
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
21 # ECONF_SOURCE=${S}
22 #
23 # If you need generic install rules, use multilib_src_install_all function.
24
25
26 # EAPI=5 is required for meaningful MULTILIB_USEDEP.
27 case ${EAPI:-0} in
28 5) ;;
29 *) die "EAPI=${EAPI} is not supported" ;;
30 esac
31
32
33 inherit multilib-build
34
35 EXPORT_FUNCTIONS src_configure src_compile src_test src_install
36
37
38 multilib-minimal_src_configure() {
39 multilib-minimal_abi_src_configure() {
40 mkdir -p "${BUILD_DIR}" || die
41 pushd "${BUILD_DIR}" >/dev/null || die
42 if declare -f multilib_src_configure >/dev/null ; then
43 multilib_src_configure
44 else
45 default_src_configure
46 fi
47 popd >/dev/null || die
48 }
49
50 multilib_foreach_abi multilib-minimal_abi_src_configure
51 }
52
53 multilib-minimal_src_compile() {
54 multilib-minimal_abi_src_compile() {
55 pushd "${BUILD_DIR}" >/dev/null || die
56 if declare -f multilib_src_compile >/dev/null ; then
57 multilib_src_compile
58 else
59 default_src_compile
60 fi
61 popd >/dev/null || die
62 }
63
64 multilib_foreach_abi multilib-minimal_abi_src_compile
65 }
66
67 multilib-minimal_src_test() {
68 multilib-minimal_abi_src_test() {
69 pushd "${BUILD_DIR}" >/dev/null || die
70 if declare -f multilib_src_test >/dev/null ; then
71 multilib_src_test
72 else
73 default_src_test
74 fi
75 popd >/dev/null || die
76 }
77
78 multilib_foreach_abi multilib-minimal_abi_src_test
79 }
80
81 multilib-minimal_src_install() {
82 multilib-minimal_abi_src_install() {
83 pushd "${BUILD_DIR}" >/dev/null || die
84 if declare -f multilib_src_install >/dev/null ; then
85 multilib_src_install
86 else
87 default_src_install
88 fi
89 multilib_prepare_wrappers
90 multilib_check_headers
91 popd >/dev/null || die
92 }
93 multilib_foreach_abi multilib-minimal_abi_src_install
94 multilib_install_wrappers
95
96 if declare -f multilib_src_install_all >/dev/null ; then
97 multilib_src_install_all
98 fi
99 }

  ViewVC Help
Powered by ViewVC 1.1.20