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

Contents of /eclass/autotools-multilib.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.22 - (hide annotations) (download)
Wed Apr 30 18:17:19 2014 UTC (4 years, 6 months ago) by mgorny
Branch: MAIN
Changes since 1.21: +9 -15 lines
Update the doc and make it simpler.

1 mgorny 1.20 # Copyright 1999-2014 Gentoo Foundation
2 mgorny 1.1 # Distributed under the terms of the GNU General Public License v2
3 mgorny 1.22 # $Header: /var/cvsroot/gentoo-x86/eclass/autotools-multilib.eclass,v 1.21 2014/04/03 22:09:36 mgorny Exp $
4 mgorny 1.1
5     # @ECLASS: autotools-multilib.eclass
6     # @MAINTAINER:
7 mgorny 1.21 # gx86-multilib team <multilib@gentoo.org>
8     # @AUTHOR:
9     # Author: Michał Górny <mgorny@gentoo.org>
10 mgorny 1.1 # @BLURB: autotools-utils wrapper for multilib builds
11     # @DESCRIPTION:
12 mgorny 1.22 # The autotools-multilib.eclass provides a glue between
13     # autotools-utils.eclass(5) and multilib-minimal.eclass(5), aiming
14     # to provide a convenient way to build packages using autotools
15     # for multiple ABIs.
16 mgorny 1.1 #
17 mgorny 1.22 # Inheriting this eclass sets IUSE and exports default multilib_src_*()
18     # sub-phases that call autotools-utils phase functions for each ABI
19     # enabled. The multilib_src_*() functions can be defined in ebuild just
20     # like in multilib-minimal.
21 mgorny 1.1
22 mgorny 1.16 # EAPI=4 is required for meaningful MULTILIB_USEDEP.
23 mgorny 1.1 case ${EAPI:-0} in
24 mgorny 1.16 4|5) ;;
25 mgorny 1.1 *) die "EAPI=${EAPI} is not supported" ;;
26     esac
27    
28 mgorny 1.18 inherit autotools-utils eutils multilib-build multilib-minimal
29 mgorny 1.1
30 mgorny 1.12 EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install
31    
32 mgorny 1.18 # bug #485046
33     _autotools-multilib_fix_multilib_minimal() {
34     src_conf=$(declare -f multilib-minimal_src_configure)
35     src_conf=${src_conf/multilib_foreach_abi/multilib_parallel_foreach_abi}
36     eval "${src_conf}"
37     }
38     _autotools-multilib_fix_multilib_minimal
39    
40     # Note: _at_args[@] passing is a backwards compatibility measure.
41     # Don't use it in new packages.
42    
43 mgorny 1.12 autotools-multilib_src_prepare() {
44     autotools-utils_src_prepare "${@}"
45 mgorny 1.19
46     [[ ${AUTOTOOLS_IN_SOURCE_BUILD} ]] && multilib_copy_sources
47 mgorny 1.12 }
48 mgorny 1.1
49 mgorny 1.18 multilib_src_configure() {
50 mgorny 1.19 [[ ${AUTOTOOLS_IN_SOURCE_BUILD} ]] && local ECONF_SOURCE=${BUILD_DIR}
51 mgorny 1.18 autotools-utils_src_configure "${_at_args[@]}"
52     }
53    
54 mgorny 1.1 autotools-multilib_src_configure() {
55 mgorny 1.18 local _at_args=( "${@}" )
56    
57     multilib-minimal_src_configure
58     }
59    
60     multilib_src_compile() {
61     emake "${_at_args[@]}"
62 mgorny 1.1 }
63    
64     autotools-multilib_src_compile() {
65 mgorny 1.18 local _at_args=( "${@}" )
66    
67     multilib-minimal_src_compile
68     }
69    
70     multilib_src_test() {
71     autotools-utils_src_test "${_at_args[@]}"
72 mgorny 1.1 }
73    
74     autotools-multilib_src_test() {
75 mgorny 1.18 local _at_args=( "${@}" )
76    
77     multilib-minimal_src_test
78 mgorny 1.1 }
79    
80 mgorny 1.18 multilib_src_install() {
81     emake DESTDIR="${D}" "${_at_args[@]}" install
82     }
83    
84     multilib_src_install_all() {
85     einstalldocs
86 mgorny 1.8
87 mgorny 1.18 # Remove libtool files and unnecessary static libs
88     local prune_ltfiles=${AUTOTOOLS_PRUNE_LIBTOOL_FILES}
89     if [[ ${prune_ltfiles} != none ]]; then
90     prune_libtool_files ${prune_ltfiles:+--${prune_ltfiles}}
91     fi
92     }
93 mgorny 1.8
94 mgorny 1.18 autotools-multilib_src_install() {
95     local _at_args=( "${@}" )
96 mgorny 1.13
97 mgorny 1.18 multilib-minimal_src_install
98 mgorny 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20