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

Contents of /eclass/multilib-minimal.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Mon Jun 17 19:13:17 2013 UTC (13 months, 1 week ago) by pacho
Branch: MAIN
Changes since 1.3: +3 -3 lines
Allow eapi4 (#473610)

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.3 2013/05/04 20:06:42 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=4 is required for meaningful MULTILIB_USEDEP.
27 case ${EAPI:-0} in
28 4|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 will not work here as it will
88 # break handling of DOCS wrt #468092
89 # so we split up the emake and doc-install part
90 # this is synced with __eapi4_src_install
91 if [[ -f Makefile || -f GNUmakefile || -f makefile ]] ; then
92 emake DESTDIR="${D}" install
93 fi
94 fi
95 multilib_prepare_wrappers
96 multilib_check_headers
97 popd >/dev/null || die
98 }
99 multilib_foreach_abi multilib-minimal_abi_src_install
100 multilib_install_wrappers
101
102 if declare -f multilib_src_install_all >/dev/null ; then
103 multilib_src_install_all
104 fi
105
106 # this is synced with __eapi4_src_install
107 if ! declare -p DOCS &>/dev/null ; then
108 local d
109 for d in README* ChangeLog AUTHORS NEWS TODO CHANGES \
110 THANKS BUGS FAQ CREDITS CHANGELOG ; do
111 [[ -s "${d}" ]] && dodoc "${d}"
112 done
113 elif [[ $(declare -p DOCS) == "declare -a "* ]] ; then
114 dodoc "${DOCS[@]}"
115 else
116 dodoc ${DOCS}
117 fi
118 }

  ViewVC Help
Powered by ViewVC 1.1.20