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

Contents of /eclass/multilib-minimal.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Fri Jun 28 12:42:48 2013 UTC (14 months, 3 weeks ago) by mgorny
Branch: MAIN
Changes since 1.4: +6 -3 lines
Disable trying (and failing) to wrap headers when multilib is disabled, bug #474920.

1 hasufell 1.1 # Copyright 1999-2013 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 mgorny 1.5 # $Header: /var/cvsroot/gentoo-x86/eclass/multilib-minimal.eclass,v 1.4 2013/06/17 19:13:17 pacho 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     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 hasufell 1.3 # 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 hasufell 1.1 fi
95 mgorny 1.5 # Do multilib magic only when >1 ABI is used.
96     if [[ ${#MULTIBUILD_VARIANTS[@]} -gt 1 ]]; then
97     multilib_prepare_wrappers
98     multilib_check_headers
99     fi
100 hasufell 1.1 popd >/dev/null || die
101     }
102     multilib_foreach_abi multilib-minimal_abi_src_install
103 mgorny 1.2 multilib_install_wrappers
104 hasufell 1.1
105     if declare -f multilib_src_install_all >/dev/null ; then
106     multilib_src_install_all
107     fi
108 hasufell 1.3
109     # this is synced with __eapi4_src_install
110     if ! declare -p DOCS &>/dev/null ; then
111     local d
112     for d in README* ChangeLog AUTHORS NEWS TODO CHANGES \
113     THANKS BUGS FAQ CREDITS CHANGELOG ; do
114     [[ -s "${d}" ]] && dodoc "${d}"
115     done
116     elif [[ $(declare -p DOCS) == "declare -a "* ]] ; then
117     dodoc "${DOCS[@]}"
118     else
119     dodoc ${DOCS}
120     fi
121 hasufell 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20