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

Contents of /eclass/multilib-minimal.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (hide annotations) (download)
Fri May 2 16:16:37 2014 UTC (6 months, 4 weeks ago) by mgorny
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +2 -2 lines
Run multilib_src_configure() in parallel. Bug #485046.

1 mgorny 1.8 # Copyright 1999-2014 Gentoo Foundation
2 hasufell 1.1 # Distributed under the terms of the GNU General Public License v2
3 mgorny 1.9 # $Header: /var/cvsroot/gentoo-x86/eclass/multilib-minimal.eclass,v 1.8 2014/04/29 20:54:54 mgorny Exp $
4 hasufell 1.1
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 pacho 1.4 # EAPI=4 is required for meaningful MULTILIB_USEDEP.
27 hasufell 1.1 case ${EAPI:-0} in
28 pacho 1.4 4|5) ;;
29 hasufell 1.1 *) die "EAPI=${EAPI} is not supported" ;;
30     esac
31    
32    
33 hasufell 1.6 inherit eutils multilib-build
34 hasufell 1.1
35     EXPORT_FUNCTIONS src_configure src_compile src_test src_install
36    
37    
38     multilib-minimal_src_configure() {
39 hasufell 1.7 debug-print-function ${FUNCNAME} "$@"
40    
41 hasufell 1.1 multilib-minimal_abi_src_configure() {
42 hasufell 1.7 debug-print-function ${FUNCNAME} "$@"
43    
44 hasufell 1.1 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
48     else
49     default_src_configure
50     fi
51     popd >/dev/null || die
52     }
53    
54 mgorny 1.9 multilib_parallel_foreach_abi multilib-minimal_abi_src_configure
55 hasufell 1.1 }
56    
57     multilib-minimal_src_compile() {
58 hasufell 1.7 debug-print-function ${FUNCNAME} "$@"
59    
60 hasufell 1.1 multilib-minimal_abi_src_compile() {
61 hasufell 1.7 debug-print-function ${FUNCNAME} "$@"
62    
63 hasufell 1.1 pushd "${BUILD_DIR}" >/dev/null || die
64     if declare -f multilib_src_compile >/dev/null ; then
65     multilib_src_compile
66     else
67     default_src_compile
68     fi
69     popd >/dev/null || die
70     }
71    
72     multilib_foreach_abi multilib-minimal_abi_src_compile
73     }
74    
75     multilib-minimal_src_test() {
76 hasufell 1.7 debug-print-function ${FUNCNAME} "$@"
77    
78 hasufell 1.1 multilib-minimal_abi_src_test() {
79 hasufell 1.7 debug-print-function ${FUNCNAME} "$@"
80    
81 hasufell 1.1 pushd "${BUILD_DIR}" >/dev/null || die
82     if declare -f multilib_src_test >/dev/null ; then
83     multilib_src_test
84     else
85     default_src_test
86     fi
87     popd >/dev/null || die
88     }
89    
90     multilib_foreach_abi multilib-minimal_abi_src_test
91     }
92    
93     multilib-minimal_src_install() {
94 hasufell 1.7 debug-print-function ${FUNCNAME} "$@"
95    
96 hasufell 1.1 multilib-minimal_abi_src_install() {
97 hasufell 1.7 debug-print-function ${FUNCNAME} "$@"
98    
99 hasufell 1.1 pushd "${BUILD_DIR}" >/dev/null || die
100     if declare -f multilib_src_install >/dev/null ; then
101     multilib_src_install
102     else
103 hasufell 1.3 # 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
109     fi
110 hasufell 1.1 fi
111 mgorny 1.8
112     multilib_prepare_wrappers
113     multilib_check_headers
114 hasufell 1.1 popd >/dev/null || die
115     }
116     multilib_foreach_abi multilib-minimal_abi_src_install
117 mgorny 1.2 multilib_install_wrappers
118 hasufell 1.1
119     if declare -f multilib_src_install_all >/dev/null ; then
120     multilib_src_install_all
121 hasufell 1.3 else
122 hasufell 1.6 einstalldocs
123 hasufell 1.3 fi
124 hasufell 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20