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

Contents of /eclass/cmake-multilib.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Fri Sep 6 17:11:52 2013 UTC (7 months, 1 week ago) by axs
Branch: MAIN
Changes since 1.2: +3 -1 lines
added multilib_*_wrappers calls to cmake-multilib.eclass

1 mgorny 1.1 # Copyright 1999-2013 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 axs 1.3 # $Header: /var/cvsroot/gentoo-x86/eclass/cmake-multilib.eclass,v 1.2 2013/04/13 19:15:04 xmw Exp $
4 mgorny 1.1
5     # @ECLASS: cmake-multilib.eclass
6     # @MAINTAINER:
7     # Michał Górny <mgorny@gentoo.org>
8     # @BLURB: cmake-utils wrapper for multilib builds
9     # @DESCRIPTION:
10     # The cmake-multilib.eclass is a cmake-utils.eclass(5) wrapper
11     # introducing support for building for more than one ABI (multilib).
12     #
13     # Inheriting this eclass sets IUSE and exports cmake-utils phase
14     # function wrappers which build the package for each supported ABI
15     # if the appropriate flag is enabled.
16     #
17     # Note that the multilib support requires out-of-source builds to be
18     # enabled. Thus, it is impossible to use CMAKE_IN_SOURCE_BUILD with
19     # it.
20    
21     # EAPI=5 is required for meaningful MULTILIB_USEDEP.
22     case ${EAPI:-0} in
23     5) ;;
24     *) die "EAPI=${EAPI} is not supported" ;;
25     esac
26    
27     if [[ ${CMAKE_IN_SOURCE_BUILD} ]]; then
28     die "${ECLASS}: multilib support requires out-of-source builds."
29     fi
30    
31     inherit cmake-utils multilib-build
32    
33     EXPORT_FUNCTIONS src_configure src_compile src_test src_install
34    
35     cmake-multilib_src_configure() {
36 xmw 1.2 multilib_parallel_foreach_abi cmake-utils_src_configure "${@}"
37 mgorny 1.1 }
38    
39     cmake-multilib_src_compile() {
40 xmw 1.2 multilib_foreach_abi cmake-utils_src_compile "${@}"
41 mgorny 1.1 }
42    
43     cmake-multilib_src_test() {
44 xmw 1.2 multilib_foreach_abi cmake-utils_src_test "${@}"
45 mgorny 1.1 }
46    
47     cmake-multilib_src_install() {
48     cmake-multilib_secure_install() {
49 xmw 1.2 cmake-utils_src_install "${@}"
50 mgorny 1.1
51     # Make sure all headers are the same for each ABI.
52 axs 1.3 multilib_prepare_wrappers
53 mgorny 1.1 multilib_check_headers
54     }
55    
56 xmw 1.2 multilib_foreach_abi cmake-multilib_secure_install "${@}"
57 axs 1.3 multilib_install_wrappers
58 mgorny 1.1 }

  ViewVC Help
Powered by ViewVC 1.1.20